16.2 Conditional Probability and Independence
SL 4.6 SL 4.11
- the rule for combined events, \(\mathrm{P}(A \cup B) = \mathrm{P}(A) + \mathrm{P}(B) - \mathrm{P}(A \cap B)\), and the special case of mutually exclusive events
- what conditional probability \(\mathrm{P}(A \mid B)\) means, and how to find it from a table or from the formula
- what independent events are, and how to test for independence
- the difference between “mutually exclusive” and “independent”
Combined events
In Section 16.1 we counted \(n(A \cup B) = n(A) + n(B) - n(A \cap B)\). Dividing by \(n(U)\) gives the same rule for probabilities. It works for any events, not only equally likely outcomes.
Combined events In the formula booklet
\[ \mathrm{P}(A \cup B) = \mathrm{P}(A) + \mathrm{P}(B) - \mathrm{P}(A \cap B) \]
If \(A\) and \(B\) are mutually exclusive, then \(\mathrm{P}(A \cap B) = 0\) and
\[ \mathrm{P}(A \cup B) = \mathrm{P}(A) + \mathrm{P}(B) . \]
- \(A\), \(B\): two events
- \(A \cup B\): the event “\(A\) or \(B\) (or both)”
- \(A \cap B\): the event “\(A\) and \(B\)” (both happen)
Remember that “\(A\) or \(B\)” in mathematics means \(A\) or \(B\) or both (the “or” is not exclusive).
Example 1 For two events, \(\mathrm{P}(A) = 0.45\), \(\mathrm{P}(B) = 0.3\) and \(\mathrm{P}(A \cup B) = 0.6\).
(a) Find \(\mathrm{P}(A \cap B)\).
(b) Are \(A\) and \(B\) mutually exclusive? Give a reason.
(c) Find \(\mathrm{P}(A' \cap B')\).
(a) \(0.6 = 0.45 + 0.3 - \mathrm{P}(A \cap B)\), so \(\mathrm{P}(A \cap B) = 0.15\).
(b) No, because \(\mathrm{P}(A \cap B) = 0.15 \neq 0\).
(c) “Neither \(A\) nor \(B\)” is the complement of \(A \cup B\): \(\;\mathrm{P}(A' \cap B') = 1 - 0.6 = 0.4\).
Conditional probability
Often we already know that something has happened, and this changes the probability of another event. For example, the probability that a student plays in the school orchestra is different from the probability that a student plays in the orchestra given that the student studies music.
The probability of \(A\) given that \(B\) has happened is written \(\mathrm{P}(A \mid B)\). Knowing \(B\) has happened shrinks the sample space to \(B\).
Example 2 The 600 students in a school’s Grades 11 and 12 each choose one activity. They are also either day students or boarders.
| Day | Boarding | Total | |
|---|---|---|---|
| Music | 60 | 90 | 150 |
| Sport | 150 | 210 | 360 |
| Drama | 40 | 50 | 90 |
| Total | 250 | 350 | 600 |
A student is chosen at random. Find the probability that the student
(a) chose Music, \(\qquad\) (b) is a boarder.
Now you are told that the chosen student is a boarder. Find the probability that the student
(c) chose Music, \(\qquad\) (d) did not choose Music.
(a) \(\mathrm{P}(M) = \dfrac{150}{600} = \dfrac{1}{4}\).
(b) \(\mathrm{P}(B) = \dfrac{350}{600} = \dfrac{7}{12}\).
(c) Only the Boarding column matters now: \(350\) students, of whom \(90\) chose Music.
\[ \mathrm{P}(M \mid B) = \frac{90}{350} = \frac{9}{35} . \]
(d) \(\mathrm{P}(M' \mid B) = 1 - \dfrac{9}{35} = \dfrac{26}{35}\) (or \(\dfrac{210 + 50}{350}\)).
In part (c), \(\dfrac{90}{350} = \dfrac{\frac{90}{600}}{\frac{350}{600}} = \dfrac{\mathrm{P}(M \cap B)}{\mathrm{P}(B)}\). This gives the general definition.
Conditional probability Partly in the formula booklet
If \(\mathrm{P}(B) \neq 0\), the probability of \(A\) given \(B\) is
\[ \mathrm{P}(A \mid B) = \frac{\mathrm{P}(A \cap B)}{\mathrm{P}(B)} . \]
In the booklet
Rearranged: \(\;\mathrm{P}(A \cap B) = \mathrm{P}(B)\,\mathrm{P}(A \mid B) = \mathrm{P}(A)\,\mathrm{P}(B \mid A)\).
- \(A\), \(B\): two events
- \(\mathrm{P}(A \mid B)\): the probability of \(A\) given that \(B\) has happened
- \(A \cap B\): the event “\(A\) and \(B\)” (both happen)
Notes:
- In general \(\mathrm{P}(A \mid B) \neq \mathrm{P}(A)\), and \(\mathrm{P}(A \mid B) \neq \mathrm{P}(B \mid A)\).
- The complement rule works inside a condition: \(\mathrm{P}(A' \mid B) = 1 - \mathrm{P}(A \mid B)\), as in (d) above.
- If \(A\) and \(B\) are mutually exclusive, \(\mathrm{P}(A \cap B) = 0\), so \(\mathrm{P}(A \mid B) = \mathrm{P}(B \mid A) = 0\).
Example 3 A class takes two quizzes. \(30\%\) of the class pass both quizzes, and \(48\%\) pass the first quiz. What percentage of the students who passed the first quiz also passed the second?
Let \(F\) = “passes the first quiz” and \(S\) = “passes the second quiz”.
\[ \mathrm{P}(S \mid F) = \frac{\mathrm{P}(S \cap F)}{\mathrm{P}(F)} = \frac{0.30}{0.48} = 0.625 . \]
So \(62.5\%\) of those who passed the first quiz also passed the second.
Example 4 Two fair spinners are each numbered \(1, 2, 3, 4, 5\). Both are spun and the score is the sum of the two numbers. Find the probability that
(a) the score is odd, given that at least one spinner shows a \(2\),
(b) at least one spinner shows a \(2\), given that the score is odd.
There are \(5 \times 5 = 25\) equally likely outcomes. Let \(T\) = “at least one 2” and \(D\) = “score is odd”.
(a) \(T\) has \(9\) outcomes: \((2,1), (2,2), \ldots, (2,5)\) and \((1,2), (3,2), (4,2), (5,2)\). The score is odd when the other number is odd: \((2,1), (2,3), (2,5), (1,2), (3,2), (5,2)\), which is \(6\) outcomes.
\[ \mathrm{P}(D \mid T) = \frac{6}{9} = \frac{2}{3} . \]
(b) The score is odd when one number is odd and the other is even: \(3 \times 2 + 2 \times 3 = 12\) outcomes. Of these, \(6\) contain a \(2\) (from part (a)).
\[ \mathrm{P}(T \mid D) = \frac{6}{12} = \frac{1}{2} . \]
Notice \(\mathrm{P}(D \mid T) \neq \mathrm{P}(T \mid D)\).
Independent events
Two events are independent if one happening does not change the probability of the other.
- Roll a red die and a blue die. “Red shows 5” and “blue shows 2” are independent: the dice do not affect each other.
- Take two cards from a pack. \(A\) = “first card is a spade”, \(B\) = “second card is a diamond”. With replacement (the first card is put back and the pack is shuffled), the second draw is exactly like the first, so \(A\) and \(B\) are independent. Without replacement, the pack has changed after the first draw, so \(A\) and \(B\) are not independent: \(\mathrm{P}(B \mid A) = \frac{13}{51}\) but \(\mathrm{P}(B \mid A') = \frac{12}{51}\).
If \(A\) and \(B\) are independent, knowing \(B\) tells us nothing about \(A\), so \(\mathrm{P}(A \mid B) = \mathrm{P}(A)\). Put this into \(\mathrm{P}(A \cap B) = \mathrm{P}(B)\,\mathrm{P}(A \mid B)\):
Independent events Partly in the formula booklet
\(A\) and \(B\) are independent \(\iff\) \(\mathrm{P}(A \cap B) = \mathrm{P}(A)\,\mathrm{P}(B)\). In the booklet
Equivalently: \(\mathrm{P}(A \mid B) = \mathrm{P}(A) = \mathrm{P}(A \mid B')\).
- \(A\), \(B\): two events
- \(A \cap B\): the event “\(A\) and \(B\)” (both happen)
- \(\mathrm{P}(A \mid B)\): the probability of \(A\) given that \(B\) has happened
- \(B'\): the complement of \(B\) (“not \(B\)”)
To test whether two events are independent, calculate \(\mathrm{P}(A)\,\mathrm{P}(B)\) and compare it with \(\mathrm{P}(A \cap B)\) (or compare \(\mathrm{P}(A \mid B)\) with \(\mathrm{P}(A)\)). If they are not equal, the events are not independent.
Notes:
- If \(A\) and \(B\) are independent, then so are \(A\) and \(B'\), \(A'\) and \(B\), and \(A'\) and \(B'\).
- Mutually exclusive and independent are very different ideas.
| Mutually exclusive | Independent | |
|---|---|---|
| Meaning | cannot happen together | one does not affect the other |
| Test | \(\mathrm{P}(A \cap B) = 0\) | \(\mathrm{P}(A \cap B) = \mathrm{P}(A)\,\mathrm{P}(B)\) |
If \(\mathrm{P}(A) > 0\) and \(\mathrm{P}(B) > 0\) and the events are mutually exclusive, then knowing \(B\) happened tells you that \(A\) did not happen. So they are not independent. Events can be both mutually exclusive and independent only when \(\mathrm{P}(A) = 0\) or \(\mathrm{P}(B) = 0\).
Example 5 The table shows the probabilities that Kenji and Leila pass their Chemistry and Economics exams.
| Chemistry | Economics | |
|---|---|---|
| Kenji | \(\frac{2}{3}\) | \(\frac{3}{5}\) |
| Leila | \(\frac{4}{5}\) | \(\frac{1}{2}\) |
All results are independent. Find the probability that
(a) Kenji passes both exams,
(b) Leila passes Chemistry only,
(c) each of them passes exactly one exam.
(a) \(\dfrac{2}{3} \times \dfrac{3}{5} = \dfrac{2}{5}\).
(b) Pass Chemistry and fail Economics: \(\dfrac{4}{5} \times \left(1 - \dfrac{1}{2}\right) = \dfrac{2}{5}\).
(c) Kenji passes exactly one: \(\dfrac{2}{3} \times \dfrac{2}{5} + \dfrac{1}{3} \times \dfrac{3}{5} = \dfrac{4}{15} + \dfrac{3}{15} = \dfrac{7}{15}\).
Leila passes exactly one: \(\dfrac{4}{5} \times \dfrac{1}{2} + \dfrac{1}{5} \times \dfrac{1}{2} = \dfrac{1}{2}\).
Kenji and Leila are independent, so \(\;\mathrm{P} = \dfrac{7}{15} \times \dfrac{1}{2} = \dfrac{7}{30}\).
Example 6 Two fair six-sided dice are rolled. The events \(A\), \(B\) and \(C\) are
- \(A\): the sum of the scores is at most \(4\),
- \(B\): at least one score is \(5\) or more,
- \(C\): the sum of the scores is a multiple of \(3\).
Giving clear reasons, find which two of these events are
(a) mutually exclusive,
(b) independent.
Use the 36 outcomes (see the sum table in Section 16.1).
- \(A = \{(1,1), (1,2), (2,1), (1,3), (3,1), (2,2)\}\), so \(\mathrm{P}(A) = \dfrac{6}{36} = \dfrac{1}{6}\).
- \(B'\) = both scores at most 4: \(16\) outcomes, so \(\mathrm{P}(B) = \dfrac{20}{36} = \dfrac{5}{9}\).
- Sums \(3, 6, 9, 12\) occur \(2 + 5 + 4 + 1 = 12\) times, so \(\mathrm{P}(C) = \dfrac{12}{36} = \dfrac{1}{3}\).
(a) If the sum is at most 4, both scores are at most 3, so neither is 5 or more. \(A \cap B = \varnothing\): \(A\) and \(B\) are mutually exclusive. (\(A \cap C = \{(1,2), (2,1)\}\) and \(B \cap C \ni (6,6)\) are not empty, so no other pair is.)
(b) \(A \cap C = \{(1,2), (2,1)\}\), so \(\mathrm{P}(A \cap C) = \dfrac{2}{36} = \dfrac{1}{18}\), and \(\mathrm{P}(A)\,\mathrm{P}(C) = \dfrac{1}{6} \times \dfrac{1}{3} = \dfrac{1}{18}\). Equal, so \(A\) and \(C\) are independent.
Check the others: \(B \cap C = \{(1,5), (5,1), (3,6), (6,3), (4,5), (5,4), (6,6)\}\), so \(\mathrm{P}(B \cap C) = \dfrac{7}{36}\), but \(\mathrm{P}(B)\,\mathrm{P}(C) = \dfrac{5}{9} \times \dfrac{1}{3} = \dfrac{5}{27} \neq \dfrac{7}{36}\). And \(A\), \(B\) are mutually exclusive with non-zero probabilities, so they are not independent.
Common errors
| ✗ Wrong | ✓ Right | Why |
|---|---|---|
| \(\mathrm{P}(A \cup B) = \mathrm{P}(A) + \mathrm{P}(B)\) always | Subtract \(\mathrm{P}(A \cap B)\) | Adding only works for mutually exclusive events. |
| \(\mathrm{P}(A \cap B) = \mathrm{P}(A)\,\mathrm{P}(B)\) always | Only for independent events | In general \(\mathrm{P}(A \cap B) = \mathrm{P}(B)\,\mathrm{P}(A \mid B)\). |
| \(\mathrm{P}(A \mid B) = \dfrac{\mathrm{P}(A \cap B)}{\mathrm{P}(A)}\) | Divide by \(\mathrm{P}(B)\) | Divide by the probability of the event you are given. |
| “Mutually exclusive, so independent” | Usually not independent | If one happens, the other cannot: that is a strong dependence. |
| In a table, \(\mathrm{P}(M \mid B) = \frac{90}{600}\) | \(\frac{90}{350}\) | Given \(B\), the sample space is only the \(B\) column. |
Exercises
1 \(\mathrm{P}(A) = 0.5\), \(\mathrm{P}(B) = 0.4\) and \(\mathrm{P}(A \cap B) = 0.15\). Find
(a) \(\mathrm{P}(A \cup B)\),
(b) \(\mathrm{P}(A \mid B)\),
(c) \(\mathrm{P}(B \mid A)\).
(a) \(0.5 + 0.4 - 0.15 = 0.75\).
(b) \(\dfrac{0.15}{0.4} = 0.375\).
(c) \(\dfrac{0.15}{0.5} = 0.3\).
2 \(A\) and \(B\) are mutually exclusive, with \(\mathrm{P}(A) = 0.25\) and \(\mathrm{P}(B) = 0.6\). Find
(a) \(\mathrm{P}(A \cup B)\),
(b) \(\mathrm{P}(A' \cap B')\),
(c) \(\mathrm{P}(A \mid B)\).
(a) \(0.25 + 0.6 = 0.85\).
(b) \(1 - 0.85 = 0.15\).
(c) \(\mathrm{P}(A \cap B) = 0\), so \(\mathrm{P}(A \mid B) = 0\).
3 \(A\) and \(B\) are independent, with \(\mathrm{P}(A) = 0.3\) and \(\mathrm{P}(B) = 0.6\). Find
(a) \(\mathrm{P}(A \cap B)\),
(b) \(\mathrm{P}(A \cup B)\),
(c) \(\mathrm{P}(A' \cap B)\).
(a) \(0.3 \times 0.6 = 0.18\). \(\quad\) (b) \(0.3 + 0.6 - 0.18 = 0.72\).
(c) \(A'\) and \(B\) are also independent: \(0.7 \times 0.6 = 0.42\).
4 \(\mathrm{P}(A) = 0.4\), \(\mathrm{P}(B) = 0.5\) and \(\mathrm{P}(A \cup B) = 0.7\). Show that \(A\) and \(B\) are independent.
\(\mathrm{P}(A \cap B) = 0.4 + 0.5 - 0.7 = 0.2\), and \(\mathrm{P}(A)\,\mathrm{P}(B) = 0.4 \times 0.5 = 0.2\).
These are equal, so \(A\) and \(B\) are independent.
5 80 tourists were asked whether they prefer a beach holiday or a city holiday.
| European | Asian | Total | |
|---|---|---|---|
| Beach | 18 | 22 | 40 |
| City | 14 | 26 | 40 |
| Total | 32 | 48 | 80 |
One tourist is chosen at random. Find
(a) \(\mathrm{P}(\text{beach})\),
(b) \(\mathrm{P}(\text{beach} \mid \text{Asian})\),
(c) \(\mathrm{P}(\text{European} \mid \text{city})\).
(d) Are the events “prefers beach” and “Asian” independent? Give a reason.
(a) \(\dfrac{40}{80} = \dfrac{1}{2}\).
(b) \(\dfrac{22}{48} = \dfrac{11}{24}\).
(c) \(\dfrac{14}{40} = \dfrac{7}{20}\).
(d) \(\mathrm{P}(\text{beach} \mid \text{Asian}) = \dfrac{11}{24} \neq \dfrac{1}{2} = \mathrm{P}(\text{beach})\), so they are not independent.
6 \(\mathrm{P}(A) = 0.6\), \(\mathrm{P}(B \mid A) = 0.35\) and \(\mathrm{P}(B) = 0.4\). Find
(a) \(\mathrm{P}(A \cap B)\), \(\;\)
(b) \(\mathrm{P}(A \mid B)\).
(a) \(\mathrm{P}(A \cap B) = \mathrm{P}(A)\,\mathrm{P}(B \mid A) = 0.6 \times 0.35 = 0.21\).
(b) \(\mathrm{P}(A \mid B) = \dfrac{0.21}{0.4} = 0.525\).
7 Two fair six-sided dice are rolled. Find the probability that
(a) the sum is \(10\), given that at least one die shows a \(5\),
(b) at least one die shows a \(5\), given that the sum is \(10\).
(a) “At least one 5” has \(11\) outcomes. Only \((5,5)\) has sum \(10\). \(\;\mathrm{P} = \dfrac{1}{11}\).
(b) Sum \(10\): \((4,6), (5,5), (6,4)\). Only \((5,5)\) has a 5. \(\;\mathrm{P} = \dfrac{1}{3}\).
8 Amir and Bea each shoot once at a target, independently. The probability that Amir hits is \(0.7\) and that Bea hits is \(0.6\). Find the probability that
(a) both hit,
(b) exactly one hits,
(c) at least one hits.
(a) \(0.7 \times 0.6 = 0.42\).
(b) \(0.7 \times 0.4 + 0.3 \times 0.6 = 0.28 + 0.18 = 0.46\).
(c) \(1 - \mathrm{P}(\text{both miss}) = 1 - 0.3 \times 0.4 = 0.88\).
9 \(A\) and \(B\) are independent events with \(\mathrm{P}(A) = x\), \(\mathrm{P}(B) = 0.3\) and \(\mathrm{P}(A \cup B) = 0.58\). Find \(x\).
\(\mathrm{P}(A \cup B) = x + 0.3 - 0.3x = 0.58\), so \(0.7x = 0.28\) and \(x = 0.4\).
10 A fair coin is tossed and a fair six-sided die is rolled. \(A\) is the event “the coin shows heads” and \(B\) is the event “the die shows an even number”. Show that \(A\) and \(B\) are independent but not mutually exclusive.
There are \(12\) equally likely outcomes. \(A \cap B = \{\text{H}2, \text{H}4, \text{H}6\}\), so \(\mathrm{P}(A \cap B) = \dfrac{3}{12} = \dfrac{1}{4}\).
\(\mathrm{P}(A)\,\mathrm{P}(B) = \dfrac{1}{2} \times \dfrac{1}{2} = \dfrac{1}{4}\): equal, so independent.
\(\mathrm{P}(A \cap B) \neq 0\), so they are not mutually exclusive.