Statistics · Conditional Probability · Year 2

Conditional Probability

What happened already changes what's likely next -- a vertical line and a restricted sample space make that precise.

8 min read 2 worked examples

When one event changes another's probability

The probability of an event can change depending on the outcome of a previous event. For example, the probability of being late for work may change depending on whether you oversleep or not.

Situations like this can be modelled using conditional probability. A vertical line is used to indicate conditional probabilities.

Notation

The probability that $B$ occurs given that $A$ has already occurred is written as $\mathrm{P}(B\mid A)$. Similarly, $\mathrm{P}(B\mid A')$ describes the probability of $B$ occurring given that $A$ has not occurred.

$\mathrm{P}(A\mid B) = \dfrac{\mathrm{P}(A\cap B)}{\mathrm{P}(B)}, \qquad \mathrm{P}(B)\neq 0$

Knowing that $B$ has happened shrinks the sample space down to just $B$ — $\mathrm{P}(A\mid B)$ asks what fraction of that smaller space is also inside $A$. This idea of shrinking the sample space is called a restricted sample space, and it's the key to solving most conditional probability problems without needing the formula at all.

Independent events

For independent events, $\mathrm{P}(A\mid B)=\mathrm{P}(A\mid B')=\mathrm{P}(A)$, and $\mathrm{P}(B\mid A)=\mathrm{P}(B\mid A')=\mathrm{P}(B)$. You can use this condition to determine independence: if conditioning on $A$ ever changes $B$'s probability, the events cannot be independent.

Worked example 1

Conditional probability from a two-way table
A gym has 90 members. Of these members, 34 attend only weights sessions ($W$) and 20 attend only cardio sessions ($C$). 16 members attend both weights and cardio sessions.

a Draw a two-way table to show this information.

$C$$C'$Total
$W$163450
$W'$202040
Total365490

The values in bold above are found from the totals: $16+34=50$ (row total), $90-50-20=20$ (the remaining members attend neither), and the column/grand totals follow the same way.

b Find: i $\mathrm{P}(W'\cap C')$   ii $\mathrm{P}(W\mid C)$   iii $\mathrm{P}(C\mid W')$

MethodRead straight off the table, restricting the sample space for the conditional parts
i
$\mathrm{P}(W'\cap C') = \dfrac{20}{90} = \dfrac{2}{9}$.
20 members attend neither, out of 90 total.
ii
$\mathrm{P}(W\mid C) = \dfrac{16}{36} = \dfrac{4}{9}$.
Given that $C$ is already true, restrict to the 36 cardio members; 16 of them also attend weights.
iii
$\mathrm{P}(C\mid W') = \dfrac{20}{40} = \dfrac{1}{2}$.
There are 20 cardio-only members out of the 40 members who do not attend weights.
▪ solved
Strategy — restrict the sample space for conditional parts

For $\mathrm{P}(W\mid C)$, don't divide by 90 — divide by the row or column total for the given condition ($36$, the total number of cardio members), not the grand total. This is exactly the restricted sample space idea: $C$ is now the entire world under consideration.

Worked example 2

Conditional probability from a sample-space diagram
Two students each sit a short quiz marked out of 6. Their marks are recorded as an ordered pair. Given that at least one of the two marks is a 5, find the probability that the two marks sum to 8.
Quiz 1 Quiz 2 1 2 3 4 5 6 1 2 3 4 5 6 2 3 4 5 6 7 3 4 5 6 7 8 4 5 6 7 8 9 5 6 7 8 9 10 6 7 8 9 10 11 7 8 9 10 11 12
Each point shows the total for that pair of marks. The eleven shaded points are the outcomes where at least one mark is 5 — the restricted sample space. Two of those eleven have a total of 8 (circled).
MethodRestrict to the outcomes with at least one 5, then find the fraction with sum 8
1
There are 11 outcomes with at least one mark of 5 — the restricted sample space.
These are the shaded points on the diagram.
2
Two of those eleven outcomes have a sum of 8.
The circled points.
3
$\mathrm{P}(\text{sum is }8\mid\text{one mark is 5}) = \dfrac{2}{11}$.
Restricted-space outcomes that qualify, over all restricted-space outcomes.
▪ solved

State one modelling assumption used in your calculations.

Each of the 36 mark-pairs is equally likely — that is, every mark from 1 to 6 is equally likely for each student.

Why this beats the formula here

Counting directly off the sample-space diagram is faster than computing $\mathrm{P}(\text{sum}=8\cap\text{one mark}=5)$ and $\mathrm{P}(\text{one mark}=5)$ separately and dividing — whenever every outcome is equally likely, a restricted sample space collapses to simple counting.

Check yourself

Of 40 sixth-formers, 22 have a part-time job and 15 volunteer regularly; 9 both work and volunteer. Draw a two-way table, then find $\mathrm{P}(\text{volunteers}\mid\text{has a job})$.

1
Job only: $22-9=13$. Volunteers only: $15-9=6$. Neither: $40-13-9-6=12$.
2
$\mathrm{P}(\text{volunteers}\mid\text{job}) = \dfrac{9}{22}$.
9 do both, out of 22 who have a job.