Conditional probability
Reduced sample spaces, the formula P(A | B) = P(A ∩ B) / P(B), the general product rule, independence, and two-way tables.
New information changes probabilities. If you know a die landed on a prime, the chance it's odd is no longer $\tfrac12$. Conditional probability is the precise way to update a probability once you know something has happened.
A reduced sample space
$P(A \mid B)$ is read "the probability of $A$ given $B$". Once you know $B$ happened, the outcomes outside $B$ are gone. $B$ becomes the new sample space, and only the part of $A$ inside $B$ still counts.
For the die: given a prime, the sample space shrinks to $\{2, 3, 5\}$, and the odd ones are $\{3, 5\}$. So $P(\text{odd} \mid \text{prime}) = \dfrac23$.
The second form is the product rule for stages that are not independent. It is exactly what you did along the branches of a tree in 14F: the second branch's probability is a conditional probability.
Two dice are rolled and the sum is $9$. Find the probability that at least one die shows a $6$.
Two-way tables
A two-way table makes conditional probability a matter of choosing the right row or column. "Given" tells you which row or column becomes the whole.
| Plays sport | No sport | Total | |
|---|---|---|---|
| Year 11 | 36 | 24 | 60 |
| Year 12 | 28 | 32 | 60 |
| Total | 64 | 56 | 120 |
A student is chosen at random from those in the table. Find (a) $P(\text{sport} \mid \text{Year 11})$ (b) $P(\text{Year 11} \mid \text{sport})$.
Reversing a tree
In 14F Example 2, $3\%$ have a condition, the test is positive for $90\%$ of those with it and $8\%$ of those without, and $P(+) = 0.1046$. Find the probability that a person who tests positive actually has the condition.
Independence
To test, calculate both sides of $P(A \cap B) = P(A) \times P(B)$. Equal means independent. For the die with $A = $ even and $B = \{1, 2, 3, 4\}$: $P(A \cap B) = P(\{2, 4\}) = \dfrac13$ and $P(A)P(B) = \dfrac12 \times \dfrac23 = \dfrac13$. They are independent.
Your turn
$P(A) = 0.5$, $P(B) = 0.4$ and $P(A \cup B) = 0.7$. Find $P(A \mid B)$, and decide whether $A$ and $B$ are independent.
Show the working
$P(A \cap B) = 0.5 + 0.4 - 0.7 = 0.2$. Then $P(A \mid B) = \dfrac{0.2}{0.4} = 0.5$. Since $P(A \mid B) = P(A) = 0.5$, they are independent. (Check: $0.5 \times 0.4 = 0.2$.)
$P(A \mid B) =$
Divide by the probability of the event you are given, $B$.
$P(A \cap B) = 0.12$ and $P(B) = 0.4$. Find $P(A \mid B)$.
$\dfrac{0.12}{0.4} = 0.3$.
A die is rolled and shows a prime number. The probability that it is odd is:
The reduced sample space is $\{2, 3, 5\}$, and $3$ and $5$ are odd: $\dfrac23$.
Two dice are rolled and the sum is $8$. Find the probability that it was a double.
Sum $8$: $(2, 6), (3, 5), (4, 4), (5, 3), (6, 2)$. Only $(4, 4)$ is a double: $\dfrac15 = 0.2$.
Using the two-way table in this section, find $P(\text{sport} \mid \text{Year 12})$, correct to 3 decimal places.
Year 12 row: $\dfrac{28}{60} \approx 0.467$.
Using the same table, find $P(\text{Year 12} \mid \text{no sport})$, correct to 3 decimal places.
No sport column, total $56$: $\dfrac{32}{56} \approx 0.571$.
Events $A$ and $B$ are independent exactly when:
Independence means $P(A \mid B) = P(A)$, which rearranges to $P(A \cap B) = P(A)P(B)$. $P(A \cap B) = 0$ is mutually exclusive, a different idea.
$A$ and $B$ are independent, with $P(A) = 0.5$ and $P(B) = 0.4$. Find $P(A \cup B)$.
Independent, so $P(A \cap B) = 0.5 \times 0.4 = 0.2$. Then $P(A \cup B) = 0.5 + 0.4 - 0.2 = 0.7$.
Exam style: $2\%$ of people have a condition. A test is positive for $95\%$ of those with it and $10\%$ of those without. Find the probability that a person who tests positive has the condition, correct to 3 decimal places.
$P(C \cap +) = 0.02 \times 0.95 = 0.019$ and $P(+) = 0.019 + 0.98 \times 0.1 = 0.117$. So $P(C \mid +) = \dfrac{0.019}{0.117} \approx 0.162$.
Exam style: $P(A) = 0.3$, $P(B \mid A) = 0.5$ and $P(B \mid \overline{A}) = 0.2$. Find $P(A \mid B)$, correct to 3 decimal places.
$P(A \cap B) = 0.3 \times 0.5 = 0.15$. $P(\overline{A} \cap B) = 0.7 \times 0.2 = 0.14$. So $P(B) = 0.29$ and $P(A \mid B) = \dfrac{0.15}{0.29} \approx 0.517$.
Coaching Centre