Conditional Probability
A medical test comes back positive. What is the actual probability you have the disease? With a 99% accurate test for a rare condition, a positive result is only 50% reliable. The key is $P(A \mid B)$, the probability of an event given another has occurred. By the end of this lesson you will solve these counterintuitive problems with the formula, tree diagrams, and two-way tables.
Practise this lesson
Three printable worksheets that build from foundations to mastery, or build your own from any module’s questions.
If $P(A \mid B) = P(A)$, what does this tell us about the relationship between events $A$ and $B$? Make a prediction before reading onno formula needed yet.
Every conditional probability question this year lives inside one formula. Lock it in now, the rest of this lesson is learning to recognise when and how to use it.
Conditional probability restricts the sample space. Dividing by $P(B)$ re-normalises so probabilities still sum to 1 within the smaller world where $B$ has occurred. The multiplication rule rearranges the same equation.
Key facts
- $P(A \mid B) = \dfrac{P(A \cap B)}{P(B)}$
- $P(A \cap B) = P(B) \times P(A \mid B)$
- Independence means $P(A \mid B) = P(A)$
Concepts
- Conditional probability restricts the sample space to event $B$
- Tree diagrams encode conditional probabilities on branches
- Two-way tables organise joint and marginal probabilities
Skills
- Calculate conditional probabilities from two-way tables
- Build and use tree diagrams for multi-stage experiments
- Apply the total probability formula
The conditional probability of $A$ given $B$, written $P(A \mid B)$, is the probability that $A$ occurs assuming $B$ has already occurred.
Why divide by $P(B)$? Because we restrict our attention to only those outcomes where $B$ happened. Within this smaller universe, the fraction that also satisfies $A$ is $P(A \cap B) / P(B)$.
Example. In a class, 30% of students play basketball and 20% play both basketball and tennis. If you select a basketball player at random, what is $P(\text{tennis} \mid \text{basketball})$?
$$P(\text{tennis} \mid \text{basketball}) = \frac{P(\text{both})}{P(\text{basketball})} = \frac{0.20}{0.30} = \frac{2}{3}$$
Two-thirds of basketball players also play tennis. Notice how the conditional probability ($\frac{2}{3}$) is very different from the unconditional probability of playing tennis (which would be lower).
Multiply along branches to find joint probabilities. $P(B \mid A)$ is the probability of $B$ given $A$ has occurred.
Conditional probability: $P(A \mid B) = \dfrac{P(A \cap B)}{P(B)}$, dividing by $P(B)$ restricts the sample space to $B$; Multiplication rule: $P(A \cap B) = P(B) \times P(A \mid B)$, multiply along tree branches
Pause, copy the conditional probability formula $P(A \mid B) = \frac{P(A \cap B)}{P(B)}$ (dividing by $P(B)$ restricts the sample space) and the tree-branch rule: multiply probabilities along branches into your book.
Did you get this? True or false: $P(A \mid B) = \dfrac{P(A \cap B)}{P(B)}$, where $P(B) > 0$.
Worked examples · 3 in a row, reveal as you go
If $P(A \cap B) = 0.2$ and $P(B) = 0.5$, find $P(A \mid B)$.
A company sources components from two suppliers: 60% from Supplier X (4% defective) and 40% from Supplier Y (2% defective). (a) Find $P(\text{defective})$. (b) Find $P(\text{from X} \mid \text{defective})$.
200 students were surveyed on part-time work and sport. From the table: 45 work and play sport, 80 work total, 115 play sport total. Find $P(\text{work} \mid \text{sport})$ and $P(\text{sport} \mid \text{work})$.
Quick check: A school has 40% instrument players. Of these, 25% sing in choir. Of non-players, 10% sing. What is $P(\text{choir})$?
Common errors · the traps that cost marks
Fill in the blank: In the law of total probability, $P(A) = P(B) \times P(A \mid B) + P(B') \times P(A \mid \underline{\hspace{60px}})$.
Match each expression to its meaning:
Drill activities
$P(A \cap B) = 0.12$, $P(B) = 0.4$. Find $P(A \mid B)$.
A bag has 5 red and 5 blue marbles. Two drawn without replacement. Given first is red, find $P(\text{second red})$.
100 people: 30 have a passport, 20 have both passport and licence, 60 have a licence. Find $P(\text{passport} \mid \text{licence})$.
Factory: three machines produce 50%, 30%, 20% of output with defect rates 2%, 3%, 5%. Find $P(\text{defective})$.
Drug test: 95% accurate, 5% of athletes use drug. Find $P(\text{user} \mid \text{positive})$.
Earlier you were asked: if $P(A \mid B) = P(A)$, what does this tell us? It means knowing $B$ occurred does not change the probability of $A$. This is the definition of independence: $A$ and $B$ are independent if and only if $P(A \mid B) = P(A)$, equivalently, $P(A \cap B) = P(A) \times P(B)$. $B$ gives us no information about $A$.
Pick your answer, then rate your confidencethat tells the system what to drill next. Each retry pulls a fresh mix from the bank.
Q1. In a school, 40% of students play a musical instrument. Of those who play an instrument, 25% also sing in the choir. Of those who do not play an instrument, 10% sing in the choir. (a) Draw a tree diagram. (b) Find the probability that a randomly selected student sings in the choir. (c) Given that a student sings in the choir, find the probability they play an instrument. (3 marks)
Q2. A survey of 500 people on diet and exercise:
| Regular Exercise | Irregular Exercise | Total | |
|---|---|---|---|
| Healthy Diet | 120 | 80 | 200 |
| Unhealthy Diet | 90 | 210 | 300 |
| Total | 210 | 290 | 500 |
(a) Find $P(\text{healthy diet} \mid \text{regular exercise})$. (b) Find $P(\text{regular exercise} \mid \text{healthy diet})$. (c) Determine whether diet and exercise are independent, justifying with calculations. (3 marks)
Q3. A disease affects 2% of a population. A test has a 98% true positive rate and a 3% false positive rate. (a) In a population of 10 000, construct a two-way table showing expected numbers of true positives, false positives, true negatives, and false negatives. (b) Calculate $P(\text{disease} \mid \text{positive})$. (c) A politician claims: "This test is 98% accurate, so if you test positive, you almost certainly have the disease." Analyse this claim mathematically and explain why it is misleading. (3 marks)
Comprehensive answers (click to reveal)
Drill 1: $0.3$ · 2: $\frac{4}{9}$ · 3: $\frac{1}{3}$ · 4: $0.029$ · 5: $0.5$
Q1 (3 marks): (a) Tree: Instrument (0.4) → Choir (0.25), No choir (0.75); No instrument (0.6) → Choir (0.10), No choir (0.90) [0.5]. (b) $P(\text{choir}) = 0.4 \times 0.25 + 0.6 \times 0.10 = 0.10 + 0.06 = 0.16$ [1]. (c) $P(\text{instrument} \mid \text{choir}) = \frac{0.10}{0.16} = \frac{5}{8} = 0.625$ [1.5].
Q2 (3 marks): (a) $P(\text{healthy} \mid \text{regular}) = \frac{120}{210} = \frac{4}{7} \approx 0.571$ [0.5]. (b) $P(\text{regular} \mid \text{healthy}) = \frac{120}{200} = 0.6$ [0.5]. (c) $P(\text{healthy}) \times P(\text{regular}) = 0.4 \times 0.42 = 0.168$. But $P(\text{healthy} \cap \text{regular}) = \frac{120}{500} = 0.24$. Since $0.24 \neq 0.168$, not independent [2].
Q3 (3 marks): (a) Disease+: 200 people; TP = 196, FN = 4. Disease−: 9 800; FP = 294, TN = 9 506 [0.5]. (b) $P(\text{disease} \mid \text{positive}) = \frac{196}{490} = 0.4 = 40\%$ [1]. (c) The claim confuses $P(\text{positive} \mid \text{disease}) = 0.98$ with $P(\text{disease} \mid \text{positive}) = 0.40$. Prevalence matters: in a low-prevalence population, false positives from the healthy majority outnumber true positives from the sick minority. The public needs to know the base rate (prevalence) to correctly interpret any test result [1.5].
Five timed questions. Beat the boss to bank a tier, gold (90% + speed), silver (75%), or bronze (50%). Replays welcome.
Climb platforms by answering conditional probability questions. Lighter alternative to the boss.
Mark lesson as complete
Tick when you've finished the practice and review.