Conditional Probability
Every question with a fully worked solution.
- Conditional Probability - Video - Conditional Probability formula Watch
Theory
Conditional probability \(P(A|B)\) is the probability that \(A\) occurs, given that \(B\) has occurred. This Year 11 Mathematics Advanced page shows how to restrict the sample space to the given event, use the formula \(P(A|B)=\dfrac{P(A\cap B)}{P(B)}\), read conditional probabilities from two-way tables, Venn diagrams and tree diagrams, and reverse a conditional probability, such as finding the probability it rained given that someone was late.
\(P(A|B)\) is read "the probability of \(A\) given \(B\)". It is the conditional probability that \(A\) occurs, given that \(B\) has occurred. The event after the bar is the one you already know about.
Knowing that \(B\) has occurred restricts the sample space to \(B\): outcomes outside \(B\) can no longer happen. When the outcomes are equally likely, count only inside \(B\):
Here \(|B|\) is the number of outcomes in \(B\). For example, a fair die shows an odd number, so \(B=\{1,3,5\}\). Given this, the probability that it shows a \(5\) is \(\dfrac{1}{3}\), not \(\dfrac{1}{6}\).
Dividing the top and bottom by \(|S|\) turns each count into a probability, which gives the general conditional probability formula \(P(A|B)=\dfrac{P(A\cap B)}{P(B)}\), for \(P(B)\neq 0\). Rearranged, it is the multiplication rule \(P(A\cap B)=P(A|B)\times P(B)\).
In a two-way table the given event is one row or one column: use that row or column total, not the grand total. In a Venn diagram the given event is a set of regions; for \(A'\) it is every region outside \(A\), including the region outside both circles. In a tree diagram the second-stage branches are already conditional probabilities, such as \(P(L|R)\).
Order matters. \(P(A|B)\) divides by \(P(B)\), while \(P(B|A)\) divides by \(P(A)\), and the two are usually different.
Equally likely outcomes (restrict the sample space to \(B\)):
The conditional probability formula, for \(P(B)\neq 0\) and \(P(A)\neq 0\):
The multiplication rule (multiply along a tree path):
Tools you will often need first:
The pieces of a two-way table:
| \(A\) | \(A'\) | Total | |
|---|---|---|---|
| \(B\) | \(|A\cap B|\) | \(|A'\cap B|\) | \(|B|\) |
| \(B'\) | \(|A\cap B'|\) | \(|A'\cap B'|\) | \(|B'|\) |
| Total | \(|A|\) | \(|A'|\) | \(|S|\) |
How to find \(P(A|B)\)
- Identify the given event: the one after the bar. It becomes the new sample space.
- Find its size or probability: \(|B|\) from a row or column total or from the Venn regions, or \(P(B)\). Use \(1-P(B')\), the addition rule or the sum of tree paths if \(P(B)\) is not given directly.
- Find the overlap \(|A\cap B|\) or \(P(A\cap B)\).
- Divide the overlap by the given event, then simplify the fraction or write the decimal as asked.
Using a tree diagram
- Multiply along each branch to get the probability of each path, such as \(P(R\cap L)\).
- Add the paths that end in the given event to get its probability.
- Divide the path you want by that total.
Completing a two-way table
- Fill the gaps using row totals, column totals and the grand total.
- Restrict to the row or column of the given event and divide by its total.
(ii) Two fair dice are rolled. Given that the sum is \(10\), find the probability that both dice show the same number.
(i) Let \(B\) = multiple of \(4\) and \(A\) = greater than \(10\). Restrict the sample space to \(B\):
\(B=\{4,8,12,16,20\}\), so \(|B|=5\). \(A\cap B=\{12,16,20\}\), so \(|A\cap B|=3\).
| \(P(A|B)\) | \(=\) | \(\dfrac{|A\cap B|}{|B|}\) |
| \(\) | \(=\) | \(\mathbf{\dfrac{3}{5}}\) |
(ii) Restrict to the outcomes with sum \(10\):
\(B=\{(4,6),(5,5),(6,4)\}\), so \(|B|=3\). Only \((5,5)\) is a double, so \(|A\cap B|=1\).
| \(P(A|B)\) | \(=\) | \(\mathbf{\dfrac{1}{3}}\) |
Without the condition, \(P(\text{double})=\dfrac{6}{36}=\dfrac{1}{6}\). Knowing the sum changes the probability.
(i) \(P(A\cap B)\)
(ii) \(P(B|A)\)
(iii) \(P(A|B)\)
Find \(P(A)\) using the complement: \(P(A)=1-0.4=0.6\).
(i) Use the addition rule:
| \(P(A\cup B)\) | \(=\) | \(P(A)+P(B)-P(A\cap B)\) |
| \(0.8\) | \(=\) | \(0.6+0.5-P(A\cap B)\) |
| \(P(A\cap B)\) | \(=\) | \(\mathbf{0.3}\) |
(ii) Given \(A\), divide by \(P(A)\):
| \(P(B|A)\) | \(=\) | \(\dfrac{P(A\cap B)}{P(A)}\) |
| \(\) | \(=\) | \(\dfrac{0.3}{0.6}\) |
| \(\) | \(=\) | \(\mathbf{0.5}\) |
(iii) Given \(B\), divide by \(P(B)\):
| \(P(A|B)\) | \(=\) | \(\dfrac{P(A\cap B)}{P(B)}\) |
| \(\) | \(=\) | \(\dfrac{0.3}{0.5}\) |
| \(\) | \(=\) | \(\mathbf{0.6}\) |
The same overlap gives different answers: \(P(B|A)\neq P(A|B)\).
(i) Complete a two-way table.
(ii) Find \(P(D|C)\).
(iii) Find \(P(D'|C')\).
Give fraction answers in simplest form.
(i) \(P(C|D)=\dfrac{|D\cap C|}{|D|}\), so
| \(|D\cap C|\) | \(=\) | \(0.25\times 24\) |
| \(\) | \(=\) | \(6\) |
Fill the rest from the totals: \(24-6=18\), \(16-6=10\), \(60-24=36\), \(36-10=26\), \(60-16=44\).
| \(C\) | \(C'\) | Total | |
|---|---|---|---|
| \(D\) | \(6\) | \(18\) | \(24\) |
| \(D'\) | \(10\) | \(26\) | \(36\) |
| Total | \(16\) | \(44\) | \(60\) |
(ii) Restrict to column \(C\) (\(16\) people):
| \(P(D|C)\) | \(=\) | \(\dfrac{6}{16}\) |
| \(\) | \(=\) | \(\mathbf{\dfrac{3}{8}}\) |
(iii) Restrict to column \(C'\) (\(44\) people), of whom \(26\) are in \(D'\):
| \(P(D'|C')\) | \(=\) | \(\dfrac{26}{44}\) |
| \(\) | \(=\) | \(\mathbf{\dfrac{13}{22}}\) |
(i) Find the probability that a randomly chosen student is late, as a decimal.
(ii) Given that a student is late, find the probability that they caught the bus, as a fraction in simplest form and correct to \(3\) decimal places.
Let \(B\) = catches the bus and \(L\) = late. The branches after \(B\) are \(P(L|B)=0.1\) and \(P(L|B')=0.04\).
(i) Multiply along the two paths ending in \(L\), then add:
| \(P(B\cap L)\) | \(=\) | \(0.7\times 0.1=0.07\) |
| \(P(B'\cap L)\) | \(=\) | \(0.3\times 0.04=0.012\) |
| \(P(L)\) | \(=\) | \(0.07+0.012\) |
| \(\) | \(=\) | \(\mathbf{0.082}\) |
(ii) Divide the bus path by \(P(L)\):
| \(P(B|L)\) | \(=\) | \(\dfrac{P(B\cap L)}{P(L)}\) |
| \(\) | \(=\) | \(\dfrac{0.07}{0.082}\) |
| \(\) | \(=\) | \(\mathbf{\dfrac{35}{41}}\) |
| \(\) | \(\approx\) | \(\mathbf{0.854}\) |
The tree gave \(P(L|B)=0.1\); the question asked for the reverse, \(P(B|L)\), which is much larger.
Common pitfalls
Frequently asked questions
What does P(A|B) mean?
It is the probability that \(A\) occurs, given that \(B\) has occurred. It is read "the probability of \(A\) given \(B\)".
How do you calculate conditional probability?
Use \(P(A|B)=\dfrac{P(A\cap B)}{P(B)}\). With equally likely outcomes, count instead: \(P(A|B)=\dfrac{|A\cap B|}{|B|}\), the number of outcomes in both divided by the number in \(B\).
Is P(A|B) the same as P(B|A)?
Usually not. Both have \(P(A\cap B)\) on top, but \(P(A|B)\) divides by \(P(B)\) and \(P(B|A)\) divides by \(P(A)\). They are equal only when \(P(A)=P(B)\) or when \(P(A\cap B)=0\).
How do you find conditional probability from a two-way table?
Find the row or column of the given event. Divide the cell you want by that row or column total, not by the grand total.
How do you work backwards on a tree diagram?
Multiply along each path, add the paths that end in the given event, then divide the path you want by that total. For example \(P(R|L)=\dfrac{P(R\cap L)}{P(R\cap L)+P(R'\cap L)}\).
What is the difference between P(A|B) and P(A and B)?
\(P(A\cap B)\) is the probability that both happen, out of the whole sample space. \(P(A|B)\) is out of \(B\) only, so it is \(P(A\cap B)\) divided by \(P(B)\) and is never smaller than \(P(A\cap B)\).