Conditional probability with tree diagrams (IB Math AI SL)
Updated October 2026
Quick answer: P(A | B) = P(A ∩ B) ÷ P(B): the probability of A once you know B has happened. On a tree diagram, divide the probability of the one path you want by the total probability of every path that gives B.
P(A|B) = P(A ∩ B)/P(B) — but SL AI expects you to build the tree diagram and read off the answer, not manipulate the formula abstractly.
Practise Conditional probability with tree diagrams with AI marking
Open the full SL AI engine — every question in this unit is worked through with instant AI-graded feedback on your handwritten workings.
P(A | B) = P(A ∩ B) ÷ P(B). Knowing B shrinks the sample space to B.
On a tree, multiply along the branches for 'and'; add the probabilities of whole paths for 'or'.
For a 'given' question that runs backwards (the first stage given the second), divide the one matching path by the sum of all paths that give the second-stage outcome.
In a two-way table, read a conditional probability from the row or column total of the given event, not from the grand total.
A and B are independent if P(A | B) = P(A), which is the same as P(A ∩ B) = P(A) × P(B).
Worked example
2% of people have a condition. A test is positive for 95% of people who have it and for 8% of people who do not. Find the probability that a randomly chosen person tests positive, and the probability that a person who tests positive has the condition.
Tree: condition (0.02) then positive (0.95); no condition (0.98) then positive (0.08).
5 quick questions on conditional probability. No sign-in needed.
\(P(A) = \frac{2}{5}\), \(P(B \mid A) = \frac{1}{2}\) and \(P(B \mid A') = \frac{1}{3}\). Find \(P(A \mid B)\).
In a class of \(45\), \(20\) study French, \(18\) study Spanish and \(6\) study both. A student is chosen at random. Find the probability that they study neither.
Two fair six-sided dice are rolled. Find the probability that the total is \(9\).
\(P(A) = \frac{1}{4}\), \(P(B \mid A) = \frac{9}{10}\) and \(P(B \mid A') = \frac{1}{10}\). Find \(P(A \mid B)\).
In a class of \(30\), \(18\) study French, \(12\) study Spanish and \(5\) study both. A student is chosen at random. Find the probability that they study neither.
How do you do conditional probability on a tree diagram?
Multiply along each path. Then P(first outcome | second outcome) is the probability of the path with both, divided by the sum of every path that ends in the second outcome.
Where can I practise conditional probability with tree diagrams questions?
On the Probability questions page: 60 exam-style SL AI questions with full mark schemes, plus free step-by-step worked examples.
Can I use my calculator for conditional probability with tree diagrams?
Yes: a GDC is allowed on every SL AI paper, so practise the calculator method as well as the working.