🎲 Conditional Probability

A Level Maths Year 2 Β· Statistics

Level 3 · Ages 17–18

← Back to topic overview
1 What Conditional Probability Means

In Year 1 you worked with Venn diagrams, mutually exclusive events and independent events (see Probability and Venn Diagrams). Year 2 adds the idea of a probability that is conditional on something you already know.

$\mathrm{P}(A \mid B)$ is read "the probability of $A$ given $B$". It is the probability that $A$ happens when we know that $B$ has happened. Knowing $B$ shrinks the sample space to $B$ alone.
Conditional probability
$\mathrm{P}(A \mid B) = \dfrac{\mathrm{P}(A \cap B)}{\mathrm{P}(B)}, \qquad \mathrm{P}(B) \neq 0$
$\mathrm{P}(A \mid B)$ is not $\mathrm{P}(B \mid A)$. The probability that a person is a footballer given that they are fit is small; the probability that they are fit given that they are a footballer is large. The event after the bar is the one you divide by.
NotationMeaning
$\mathrm{P}(A \cap B)$$A$ and $B$ both happen
$\mathrm{P}(A \cup B)$$A$ or $B$ or both happen
$\mathrm{P}(A')$$A$ does not happen; $\mathrm{P}(A') = 1 - \mathrm{P}(A)$
$\mathrm{P}(A \mid B)$$A$ happens, given that $B$ has happened
$\mathrm{P}(A \mid B')$$A$ happens, given that $B$ has not happened
2 Two-Way Tables

With a two-way table of frequencies, conditional probability is just "restrict to one row or column, then count".

Worked Example 1 β€” Reading conditional probabilities from a table

$120$ sixth-formers were asked how they travel to school.

BusCarWalkTotal
Year 1228181460
Year 1322241460
Total504228120

A student is chosen at random. Find (a) $\mathrm{P}(\text{Bus} \mid \text{Year 12})$, (b) $\mathrm{P}(\text{Year 12} \mid \text{Bus})$, (c) whether "walks" and "Year 13" are independent.

β‘ (a) Restrict to the Year 12 row ($60$ students): $\mathrm{P}(\text{Bus} \mid \text{Y12}) = \dfrac{28}{60} = \dfrac{7}{15}$.
β‘‘(b) Restrict to the Bus column ($50$ students): $\mathrm{P}(\text{Y12} \mid \text{Bus}) = \dfrac{28}{50} = \dfrac{14}{25}$.
β‘’(c) $\mathrm{P}(\text{Walk}) = \dfrac{28}{120} = \dfrac{7}{30}$ and $\mathrm{P}(\text{Walk} \mid \text{Y13}) = \dfrac{14}{60} = \dfrac{7}{30}$.
β‘£These are equal, so knowing a student is in Year 13 does not change the chance they walk: the events are independent.
Parts (a) and (b) have the same numerator $28$ but different denominators β€” the "given" event decides the denominator.
3 Venn Diagrams

Fill in a Venn diagram from the inside out: the intersection first, then the "only" regions, then the outside. Then $\mathrm{P}(A \mid B)$ is the overlap divided by the whole of circle $B$.

A B 0.35 0.15 0.25 0.25 ΞΎ
Worked Example 2 β€” Conditional probability from a Venn diagram

$\mathrm{P}(A) = 0.5$, $\mathrm{P}(B) = 0.4$ and $\mathrm{P}(A \cap B) = 0.15$. Find $\mathrm{P}(A \mid B)$, $\mathrm{P}(B \mid A)$, $\mathrm{P}(A \mid B')$ and $\mathrm{P}(B' \mid A')$.

β‘ Fill in: $A$ only $= 0.35$, $B$ only $= 0.25$, both $= 0.15$, neither $= 1 - 0.75 = 0.25$ (the diagram above).
β‘‘$\mathrm{P}(A \mid B) = \dfrac{0.15}{0.4} = 0.375$
β‘’$\mathrm{P}(B \mid A) = \dfrac{0.15}{0.5} = 0.3$
β‘£$\mathrm{P}(A \mid B') = \dfrac{\mathrm{P}(A \cap B')}{\mathrm{P}(B')} = \dfrac{0.35}{0.6} = \dfrac{7}{12}$
β‘€$\mathrm{P}(B' \mid A') = \dfrac{\mathrm{P}(\text{neither})}{\mathrm{P}(A')} = \dfrac{0.25}{0.5} = 0.5$
Worked Example 3 β€” Three sets

$60$ students were asked whether they play football ($F$), tennis ($T$) or swim ($S$). The Venn diagram regions are: $F$ only $12$, $T$ only $8$, $S$ only $10$, $F \cap T$ only $5$, $F \cap S$ only $6$, $T \cap S$ only $4$, all three $3$, none $12$. Find $\mathrm{P}(F \mid S)$ and $\mathrm{P}(T \mid F \cap S)$.

β‘ Total in $S$: $10 + 6 + 4 + 3 = 23$. Of these, in $F$: $6 + 3 = 9$.
β‘‘$\mathrm{P}(F \mid S) = \dfrac{9}{23}$
β‘’In $F \cap S$: $6 + 3 = 9$ students, of whom $3$ also play tennis.
β‘£$\mathrm{P}(T \mid F \cap S) = \dfrac{3}{9} = \dfrac{1}{3}$
4 Tree Diagrams and the Multiplication Rule

Rearranging the definition gives the rule you have used on tree diagrams since GCSE. The probabilities on the second set of branches are conditional probabilities.

Multiplication rule
$\mathrm{P}(A \cap B) = \mathrm{P}(A) \times \mathrm{P}(B \mid A)$
D Dβ€² + βˆ’ + βˆ’ 0.02 0.98 0.95 0.05 0.08 0.92 0.019 0.001 0.0784 0.9016
Worked Example 4 β€” Reversing the condition

$2\%$ of a population have a disease $D$. A test gives a positive result for $95\%$ of people with the disease and for $8\%$ of people without it. A person tests positive. Find the probability that they have the disease.

β‘ The tree gives $\mathrm{P}(D \cap +) = 0.02 \times 0.95 = 0.019$ and $\mathrm{P}(D' \cap +) = 0.98 \times 0.08 = 0.0784$.
β‘‘$\mathrm{P}(+) = 0.019 + 0.0784 = 0.0974$
β‘’$\mathrm{P}(D \mid +) = \dfrac{\mathrm{P}(D \cap +)}{\mathrm{P}(+)} = \dfrac{0.019}{0.0974} = 0.195$ (3 s.f.)
β‘£Only about $1$ in $5$ positive results comes from someone with the disease β€” because the disease is rare, false positives outnumber true ones.
Worked Example 5 β€” Without replacement

A bag holds $5$ red and $3$ blue counters. Two are taken without replacement. Find $\mathrm{P}(\text{first red} \mid \text{second red})$.

β‘ $\mathrm{P}(RR) = \dfrac{5}{8} \times \dfrac{4}{7} = \dfrac{20}{56} = \dfrac{5}{14}$
β‘‘$\mathrm{P}(\text{second red}) = \mathrm{P}(RR) + \mathrm{P}(BR) = \dfrac{20}{56} + \dfrac{3}{8} \times \dfrac{5}{7} = \dfrac{20}{56} + \dfrac{15}{56} = \dfrac{35}{56} = \dfrac{5}{8}$
β‘’$\mathrm{P}(\text{first red} \mid \text{second red}) = \dfrac{5/14}{5/8} = \dfrac{8}{14} = \dfrac{4}{7}$
By symmetry the answer equals $\mathrm{P}(\text{second red} \mid \text{first red}) = \dfrac{4}{7}$ β€” once you know one red is gone, $4$ of the remaining $7$ are red, whichever draw it was.
5 Independence
$A$ and $B$ are independent if knowing that $B$ has happened does not change the probability of $A$.
Tests for independence (any one is enough)
$\mathrm{P}(A \mid B) = \mathrm{P}(A)$  ·  $\mathrm{P}(B \mid A) = \mathrm{P}(B)$  ·  $\mathrm{P}(A \cap B) = \mathrm{P}(A)\,\mathrm{P}(B)$
Independent is not the same as mutually exclusive. Mutually exclusive means $\mathrm{P}(A \cap B) = 0$ β€” if one happens, the other cannot, so they are very much dependent (unless one of them has probability $0$).
Worked Example 6 β€” Testing for independence

$\mathrm{P}(A) = 0.4$, $\mathrm{P}(B) = 0.35$ and $\mathrm{P}(A \cup B) = 0.61$. Determine whether $A$ and $B$ are independent.

β‘ Addition rule: $\mathrm{P}(A \cap B) = 0.4 + 0.35 - 0.61 = 0.14$
β‘‘$\mathrm{P}(A)\,\mathrm{P}(B) = 0.4 \times 0.35 = 0.14$
β‘’They are equal, so $A$ and $B$ are independent. Equivalently $\mathrm{P}(A \mid B) = 0.14 / 0.35 = 0.4 = \mathrm{P}(A)$.
Worked Example 7 β€” An unknown conditional probability

$\mathrm{P}(A) = 0.3$, $\mathrm{P}(B \mid A) = 0.6$ and $\mathrm{P}(B) = 0.46$. Find $\mathrm{P}(B \mid A')$.

β‘ Let $\mathrm{P}(B \mid A') = x$. From the tree: $\mathrm{P}(B) = 0.3 \times 0.6 + 0.7x$.
β‘‘$0.18 + 0.7x = 0.46 \Rightarrow 0.7x = 0.28 \Rightarrow x = 0.4$
β‘’Since $\mathrm{P}(B \mid A) = 0.6 \neq 0.46 = \mathrm{P}(B)$, the events are not independent.
6 Modelling with Probability

The DfE content asks you to model with probability and to critique the assumptions made. Every probability calculation in context rests on assumptions β€” exam questions often ask you to name one and say whether it is reasonable.

AssumptionTypical critique
Events are independentRain today makes rain tomorrow more likely; a player who misses a penalty may lose confidence.
Probabilities stay constantA machine wears out; a learner improves with practice.
Probability estimated from data is exactRelative frequency from a small sample is only an estimate.
Outcomes are equally likelyA real die or spinner may be biased.
Worked Example 8 β€” Critiquing a model

From past records, the probability that a train is late on any day is $0.15$. A commuter models the probability that the train is late on both Monday and Tuesday as $0.15^2 = 0.0225$. Comment on this model.

β‘ The calculation assumes lateness on Monday and Tuesday is independent.
β‘‘This is doubtful: engineering works, bad weather or staff shortages often last several days, so $\mathrm{P}(\text{late Tue} \mid \text{late Mon})$ is probably greater than $0.15$.
β‘’The true probability is therefore likely to be higher than $0.0225$. Also $0.15$ is only an estimate from past data.
7 Quick Reference

Definition

$\mathrm{P}(A \mid B) = \dfrac{\mathrm{P}(A \cap B)}{\mathrm{P}(B)}$

Multiplication rule

$\mathrm{P}(A \cap B) = \mathrm{P}(A)\,\mathrm{P}(B \mid A)$

Addition rule

$\mathrm{P}(A \cup B) = \mathrm{P}(A) + \mathrm{P}(B) - \mathrm{P}(A \cap B)$

Independence

$\mathrm{P}(A \mid B) = \mathrm{P}(A)$, or $\mathrm{P}(A \cap B) = \mathrm{P}(A)\,\mathrm{P}(B)$.

Mutually exclusive

$\mathrm{P}(A \cap B) = 0$ β€” not the same as independent.

Two-way table

Restrict to the row or column of the "given" event.

Venn diagram

Fill in from the intersection outwards; divide by the given region.

Tree diagram

Second-level branches are conditional probabilities.

Reverse condition

$\mathrm{P}(A \mid B) = \dfrac{\mathrm{P}(A)\,\mathrm{P}(B \mid A)}{\mathrm{P}(B)}$

8 Practice Questions

Ten questions, from routine to exam-style. Work each one through before opening the solution.

Question 1

$\mathrm{P}(A) = 0.6$, $\mathrm{P}(B) = 0.5$ and $\mathrm{P}(A \cap B) = 0.2$. Find $\mathrm{P}(A \mid B)$ and $\mathrm{P}(B \mid A)$.

β–Ά Show solution

$\mathrm{P}(A \mid B) = \dfrac{0.2}{0.5} = 0.4$

$\mathrm{P}(B \mid A) = \dfrac{0.2}{0.6} = \dfrac{1}{3}$

Question 2

$80$ people were surveyed.

GlassesNo glassesTotal
Right-handed264268
Left-handed4812
Total305080

Find (a) $\mathrm{P}(\text{glasses} \mid \text{left-handed})$, (b) $\mathrm{P}(\text{left-handed} \mid \text{glasses})$, (c) whether being left-handed is independent of wearing glasses.

β–Ά Show solution

(a) $\dfrac{4}{12} = \dfrac{1}{3}$

(b) $\dfrac{4}{30} = \dfrac{2}{15}$

(c) $\mathrm{P}(\text{left}) = \dfrac{12}{80} = \dfrac{3}{20} = 0.15$, but $\mathrm{P}(\text{left} \mid \text{glasses}) = \dfrac{2}{15} \approx 0.133$. These differ, so the events are not independent (for this sample).

Question 3

$\mathrm{P}(A) = 0.25$, $\mathrm{P}(B) = 0.6$ and $\mathrm{P}(A \cap B) = 0.15$. Show that $A$ and $B$ are independent, and write down $\mathrm{P}(A \mid B')$.

β–Ά Show solution

$\mathrm{P}(A)\,\mathrm{P}(B) = 0.25 \times 0.6 = 0.15 = \mathrm{P}(A \cap B)$, so independent.

If $A$ and $B$ are independent, so are $A$ and $B'$. Hence $\mathrm{P}(A \mid B') = \mathrm{P}(A) = 0.25$.

Check: $\mathrm{P}(A \cap B') = 0.25 - 0.15 = 0.1$ and $\mathrm{P}(B') = 0.4$, giving $0.1 / 0.4 = 0.25$ βœ“

Question 4

The probability that it rains on a given day is $0.4$. If it rains, the probability that Sam is late for work is $0.3$; if it does not rain, it is $0.1$. Find the probability that Sam is late, and the probability that it rained given that Sam was late.

β–Ά Show solution

$\mathrm{P}(L) = 0.4 \times 0.3 + 0.6 \times 0.1 = 0.12 + 0.06 = 0.18$

$\mathrm{P}(R \mid L) = \dfrac{0.12}{0.18} = \dfrac{2}{3}$

Question 5

A box contains $4$ green and $6$ yellow counters. Two are taken at random without replacement. Find the probability that both are green, given that they are the same colour.

β–Ά Show solution

$\mathrm{P}(GG) = \dfrac{4}{10} \times \dfrac{3}{9} = \dfrac{12}{90}$,   $\mathrm{P}(YY) = \dfrac{6}{10} \times \dfrac{5}{9} = \dfrac{30}{90}$

$\mathrm{P}(\text{same}) = \dfrac{42}{90} = \dfrac{7}{15}$

$\mathrm{P}(GG \mid \text{same}) = \dfrac{12/90}{42/90} = \dfrac{12}{42} = \dfrac{2}{7}$

Question 6

$\mathrm{P}(A) = 0.45$, $\mathrm{P}(B) = 0.3$ and $\mathrm{P}(A \cup B) = 0.6$. Find (a) $\mathrm{P}(A \mid B)$, (b) $\mathrm{P}(B \mid A')$. (c) Are $A$ and $B$ independent?

β–Ά Show solution

$\mathrm{P}(A \cap B) = 0.45 + 0.3 - 0.6 = 0.15$

(a) $\mathrm{P}(A \mid B) = \dfrac{0.15}{0.3} = 0.5$

(b) $\mathrm{P}(B \cap A') = 0.3 - 0.15 = 0.15$ and $\mathrm{P}(A') = 0.55$, so $\mathrm{P}(B \mid A') = \dfrac{0.15}{0.55} = \dfrac{3}{11}$.

(c) $\mathrm{P}(A \mid B) = 0.5 \neq 0.45 = \mathrm{P}(A)$, so not independent.

Question 7

Using the football ($F$), tennis ($T$), swimming ($S$) data from Worked Example 3, find (a) the probability that a student plays exactly two sports, given that they play tennis, (b) $\mathrm{P}(F \mid T')$.

β–Ά Show solution

(a) Total in $T$: $8 + 5 + 4 + 3 = 20$. Exactly two sports within $T$: $5 + 4 = 9$. Probability $= \dfrac{9}{20}$.

(b) Not in $T$: $60 - 20 = 40$. Of these, in $F$: $12 + 6 = 18$. $\mathrm{P}(F \mid T') = \dfrac{18}{40} = \dfrac{9}{20}$.

Question 8

$\mathrm{P}(A) = 0.4$, $\mathrm{P}(B \mid A) = 0.25$ and $\mathrm{P}(B \mid A') = 0.5$. Find $\mathrm{P}(B)$ and $\mathrm{P}(A \mid B)$.

β–Ά Show solution

$\mathrm{P}(B) = 0.4 \times 0.25 + 0.6 \times 0.5 = 0.1 + 0.3 = 0.4$

$\mathrm{P}(A \mid B) = \dfrac{0.1}{0.4} = 0.25$

Question 9

$A$ and $B$ are independent, with $\mathrm{P}(B) = 0.3$ and $\mathrm{P}(A \cup B) = 0.58$. Find $\mathrm{P}(A)$.

β–Ά Show solution

Let $\mathrm{P}(A) = p$. Independence gives $\mathrm{P}(A \cap B) = 0.3p$.

$p + 0.3 - 0.3p = 0.58 \Rightarrow 0.7p = 0.28 \Rightarrow p = 0.4$

Question 10

A condition affects $1.5\%$ of adults. A screening test is positive for $90\%$ of adults with the condition and for $6\%$ of adults without it.

(a) Find the probability that a randomly chosen adult tests positive. (b) Given a positive result, find the probability that the adult has the condition. (c) Given a negative result, find the probability that the adult does not have the condition. (d) Anyone testing positive takes a second, identical test. Assuming the results are independent for a given person, find the probability that someone with two positive results has the condition. (e) Comment on the independence assumption.

β–Ά Show solution

(a) $\mathrm{P}(+) = 0.015 \times 0.9 + 0.985 \times 0.06 = 0.0135 + 0.0591 = 0.0726$

(b) $\mathrm{P}(C \mid +) = \dfrac{0.0135}{0.0726} = 0.186$ (3 s.f.)

(c) $\mathrm{P}(C' \cap -) = 0.985 \times 0.94 = 0.9259$ and $\mathrm{P}(-) = 1 - 0.0726 = 0.9274$, so $\mathrm{P}(C' \mid -) = \dfrac{0.9259}{0.9274} = 0.998$ (3 s.f.).

(d) $\mathrm{P}(C \cap {+}{+}) = 0.015 \times 0.9^2 = 0.01215$; $\mathrm{P}(C' \cap {+}{+}) = 0.985 \times 0.06^2 = 0.003546$.

$\mathrm{P}(C \mid {+}{+}) = \dfrac{0.01215}{0.01215 + 0.003546} = 0.774$ (3 s.f.)

(e) It may not be reasonable: whatever caused a false positive the first time (for example another medical condition) may well cause one again, so the two results for the same person are likely to be positively related. The true value of $\mathrm{P}(C \mid {+}{+})$ would then be lower than $0.774$.

Conditional Probability · A Level Maths Year 2 · Created with MathJax