Conditional probability — narrowing the sample space
A conditional probability asks "given that one event has happened, what's the probability of another?". Notation: P(A | B) reads "the probability of A given B".
The formula
P(A | B) = P(A and B) / P(B)
Equivalently: P(A | B) is the proportion of B that's also in A.
Three diagrams, three views
Two-way tables
The tea/coffee example from P1:
| Cake | No cake | Total | |
|---|---|---|---|
| Tea | 16 | 24 | 40 |
| Coffee | 12 | 28 | 40 |
| Total | 28 | 52 | 80 |
P(cake | tea) = 16 / 40 = 2/5. P(tea | cake) = 16 / 28 = 4/7.
The denominator is the given group's total.
Tree diagrams
If a tree shows PB, then a conditional branch P(A | B) gives: P(A and B) = PB × P(A | B). To go the other way, divide.
Venn diagrams
P(A | B) = (count in A ∩ B) / (count in B).
Independence and conditional probability
If A and B are independent: P(A | B) = PA. The conditional probability equals the unconditional one.
If A and B are mutually exclusive: P(A | B) = 0 (you can't have A if you have B).
✦Worked example— Worked example — selection
A class has 30 students: 18 girls, 12 boys. 12 girls study Spanish; 7 boys study Spanish.
P(boy | Spanish) = (boys studying Spanish) / (total Spanish students) = 7 / (12 + 7) = 7/19.
Tree-based conditional reasoning
Sometimes you're given P(A and B) and want P(A | B).
Example: of all customers, P(buys coffee and cake) = 0.20; P(buys coffee) = 0.50. P(buys cake | bought coffee) = 0.20 / 0.50 = 0.4.
Bayes-style flipped probabilities (Higher)
When you know P(A | B) and want P(B | A):
P(B | A) = P(A | B) × P(B) / P(A)
In words: weighting the conditional by the probability of B and dividing by the unconditional A.
Worked example: 1% of a population has a disease. A test has P(positive | disease) = 0.95 and P(positive | no disease) = 0.05.
- P(positive) = 0.01 × 0.95 + 0.99 × 0.05 = 0.0095 + 0.0495 = 0.059.
- P(disease | positive) = (0.01 × 0.95) / 0.059 ≈ 0.161 (16.1%).
This is the famous "false-positive paradox": even with a 95% sensitive test, a positive result on a rare disease is more often a false positive than a true positive.
⚠Common mistakes— Common mistakes (examiner traps)
- Wrong denominator. P(A | B) divides by |B| or PB, not by the grand total.
- Confusing P(A and B) with P(A | B). Different operations: ∩ vs |.
- Treating P(A | B) and P(B | A) as the same. They're usually NOT equal.
- Forgetting that draws without replacement are conditional — always update the denominator.
- Adding instead of multiplying PB × P(A | B) when finding P(A and B) on a tree.
➜Try this— Quick check
A bag has 5 red and 7 blue balls. Two are drawn without replacement. P(second is red | first was red) = ?
After drawing a red, 4 red and 7 blue remain (11 total). P = 4/11.
AI-generated · claude-opus-4-7 · v3-deep-probability