Conditional probability and Bayes' theorem (IB Math AA HL)
Updated October 2026
Quick answer: P(A | B) = P(A ∩ B) ÷ P(B). Bayes' theorem reverses a condition: if you know P(B | A) for each possible cause A, then P(A | B) is the probability of the path through A divided by the total probability of B. AA HL uses it with two or three causes.
P(A|B) = P(A∩B)/P(B). HL AA Paper 2 loves the disease-test problem: given a positive test, what's the probability of actually having the disease?
Practise Conditional probability and Bayes' theorem with AI marking
Open the full HL AA engine — every question in this unit is worked through with instant AI-graded feedback on your handwritten workings.
Draw a tree with the causes first (which machine, which bag) and the outcome second. Multiply along the branches.
Total probability: P(B) is the sum of the probabilities of every path that ends in B.
Bayes: P(Aᵢ | B) = P(Aᵢ)P(B | Aᵢ) ÷ P(B). The formula booklet gives it for two and for three events.
Independent events: P(A ∩ B) = P(A)P(B), which is the same as P(A | B) = P(A). Mutually exclusive events have P(A ∩ B) = 0. These are different ideas.
Without replacement, the probabilities on the second branches change; with replacement, they do not.
Worked example
Machines A, B and C make 50%, 30% and 20% of a factory's bolts. The proportions of faulty bolts are 2% from A, 3% from B and 6% from C. A bolt is chosen at random and is faulty. Find the probability that it was made by each machine.
Paths: A and faulty = 0.5 × 0.02 = 0.010; B and faulty = 0.3 × 0.03 = 0.009; C and faulty = 0.2 × 0.06 = 0.012.
Total: P(faulty) = 0.010 + 0.009 + 0.012 = 0.031.
P(A | faulty) = 0.010 ÷ 0.031 ≈ 0.323.
P(B | faulty) = 0.009 ÷ 0.031 ≈ 0.290.
P(C | faulty) = 0.012 ÷ 0.031 ≈ 0.387. C makes the fewest bolts but is the most likely source of a faulty one.
5 quick questions on conditional probability. No sign-in needed.
\(P(A) = \frac{3}{5}\), \(P(B \mid A) = \frac{2}{3}\) and \(P(B \mid A') = \frac{1}{2}\). Find \(P(A \mid B)\).
In a class of \(40\), \(25\) study French, \(20\) study Spanish and \(10\) study both. A student is chosen at random. Find the probability that they study neither.
The probability that it rains tomorrow is \(\frac{3}{8}\). Find the probability that it does not rain.
\(P(A) = \frac{1}{5}\), \(P(B \mid A) = \frac{3}{4}\) and \(P(B \mid A') = \frac{1}{8}\). Find \(P(A \mid B)\).
In a class of \(50\), \(32\) study French, \(15\) study Spanish and \(8\) study both. A student is chosen at random. Find the probability that they study neither.
It finds the probability of a cause given what you observed, when you know the probability of the observation for each cause. For example: given that a bolt is faulty, which machine most likely made it?
Where can I practise conditional probability and Bayes' theorem questions?
On the Conditional Probability questions page: 33 exam-style HL AA questions with full mark schemes, plus free step-by-step worked examples.
Can I use my calculator for conditional probability and Bayes' theorem?
In HL AA, Paper 1 is non-calculator and the other papers allow a GDC, so learn the exact method as well as the calculator one.