This note covers conditional probability, the probability of one event given that another has happened, and the idea of independent events. These ideas are used to read tables and tree diagrams, and to judge whether two things really affect each other, as in medicine, weather and quality control.
Key ideas
Conditional probability. The notation \(P(A \mid B)\) means "the probability of \(A\), given that \(B\) has happened". Knowing that \(B\) has happened shrinks the set of possible outcomes to \(B\) alone. So we ask what fraction of \(B\) is also in \(A\):
\[ P(A \mid B) = \frac{P(A \cap B)}{P(B)}, \qquad P(B) \gt 0. \]Rearranging gives the multiplication rule: \(P(A \cap B) = P(B)\,P(A \mid B)\). This is exactly what you do when you multiply along the branches of a tree diagram.
Order matters. \(P(A \mid B)\) and \(P(B \mid A)\) are usually different. For example, the probability that a person who owns a bike is a student is not the same as the probability that a student owns a bike.
Ways to find conditional probabilities.
- Two-way table: the "given" event picks the row or column you restrict to. The total of that row or column is the denominator.
- Venn diagram: divide the overlap by the whole circle of the given event.
- Tree diagram: second-stage branches show conditional probabilities. To find \(P(A \mid B)\) when the tree is arranged the other way round, compute \(P(A \cap B)\) from the tree and divide by \(P(B)\).
Independent events. Events \(A\) and \(B\) are independent if knowing that one has happened does not change the probability of the other. The tests are equivalent:
- \(P(A \cap B) = P(A)\,P(B)\)
- \(P(A \mid B) = P(A)\)
- \(P(A \mid B) = P(A \mid B')\)
You can use any one of these tests. In practice, work out \(P(A \cap B)\) and compare it with \(P(A) \times P(B)\).
Independent is not the same as mutually exclusive. Mutually exclusive events cannot happen together, so \(P(A \cap B) = 0\). If both events have non-zero probability, mutually exclusive events are never independent, because one happening makes the other impossible.
Definitions and formulae
| Term or formula | Meaning / when to use |
|---|---|
| \(P(A \mid B) = \dfrac{P(A \cap B)}{P(B)}\) | Probability of \(A\) given \(B\). Divide by the probability of the given event. |
| \(P(A \cap B) = P(B)\,P(A \mid B)\) | Multiplication rule. Used for multiplying along tree branches. |
| \(P(A \cap B) = P(A)\,P(B)\) | Test for, and meaning of, independent events. |
| \(P(A \mid B) = P(A) = P(A \mid B')\) | Another form of independence: the condition makes no difference. |
| \(P(A \cup B) = P(A) + P(B) - P(A \cap B)\) | Used with the tests above when the union is given instead of the intersection. |
| Mutually exclusive | \(P(A \cap B) = 0\). Not the same as independent. |
Worked examples
Example 1 In a school of 200 students, some cycle to school. The table shows the numbers.
Boys: 36 cycle, 54 do not (90 in total).
Girls: 22 cycle, 88 do not (110 in total).
A student is chosen at random. Find (a) \(P(\text{cycles})\), (b) \(P(\text{girl} \mid \text{cycles})\), (c) \(P(\text{cycles} \mid \text{girl})\). (d) Are "girl" and "cycles" independent?
The total who cycle is \(36 + 22 = 58\).
(a) \(P(\text{cycles}) = \dfrac{58}{200} = 0.29\).
(b) Restrict to those who cycle: 58 students, of whom 22 are girls. \(P(\text{girl} \mid \text{cycles}) = \dfrac{22}{58} = \dfrac{11}{29} \approx 0.379\).
(c) Restrict to the girls: 110 students, of whom 22 cycle. \(P(\text{cycles} \mid \text{girl}) = \dfrac{22}{110} = 0.2\).
(d) For independence we would need \(P(\text{cycles} \mid \text{girl}) = P(\text{cycles})\). But \(0.2 \ne 0.29\), so the events are not independent.
Answer: (a) 0.29; (b) 0.379; (c) 0.2; (d) not independent.
Example 2 The probability of rain on a given morning is 0.3. If it rains, the probability that a commuter train is late is 0.4. If it does not rain, the probability it is late is 0.1. Find the probability that the train is late, and the probability it rained given that the train was late.
Let \(R\) be "rain" and \(L\) be "late". Then \(P(R) = 0.3\), \(P(R') = 0.7\), \(P(L \mid R) = 0.4\), \(P(L \mid R') = 0.1\).
Multiply along the branches: \(P(R \cap L) = 0.3 \times 0.4 = 0.12\) and \(P(R' \cap L) = 0.7 \times 0.1 = 0.07\).
The train can be late in either way, so \(P(L) = 0.12 + 0.07 = 0.19\).
Now use the conditional formula: \(P(R \mid L) = \dfrac{P(R \cap L)}{P(L)} = \dfrac{0.12}{0.19} = 0.6315\dots\).
Answer: \(P(L) = 0.19\); \(P(R \mid L) = 0.632\) (3 s.f.).
Example 3 For events \(A\) and \(B\), \(P(A) = 0.4\), \(P(B) = 0.3\) and \(P(A \cup B) = 0.58\). (a) Find \(P(A \cap B)\). (b) Show that \(A\) and \(B\) are independent. (c) Write down \(P(A \mid B)\).
(a) Rearrange \(P(A \cup B) = P(A) + P(B) - P(A \cap B)\): \(P(A \cap B) = 0.4 + 0.3 - 0.58 = 0.12\).
(b) \(P(A) \times P(B) = 0.4 \times 0.3 = 0.12\). This equals \(P(A \cap B)\), so the events are independent.
(c) For independent events \(P(A \mid B) = P(A) = 0.4\). Check: \(\dfrac{0.12}{0.3} = 0.4\).
Answer: (a) 0.12; (b) shown, since \(0.4 \times 0.3 = 0.12\); (c) 0.4.
Common errors
- Common error: dividing by the wrong total. In \(P(A \mid B)\) the denominator is \(P(B)\), the probability of the event that is given.
- Common error: assuming \(P(A \mid B) = P(B \mid A)\).
- Common error: saying events are independent because they "seem unrelated", instead of checking \(P(A \cap B) = P(A)P(B)\) with the numbers.
- Common error: confusing mutually exclusive with independent. Mutually exclusive events with non-zero probabilities are never independent.
- Common error: using \(P(A \cap B) = P(A)P(B)\) to find an intersection when independence has not been stated or shown.
Exam tip: To show independence, write the equation \(P(A \cap B) = P(A)P(B)\), evaluate both sides, and state a conclusion in a sentence. A single line of numbers with no conclusion is incomplete.
Check yourself
- \(P(A) = 0.6\), \(P(B) = 0.5\), \(P(A \cap B) = 0.3\). Find \(P(A \mid B)\) and say whether \(A\) and \(B\) are independent.
Answer
\(P(A \mid B) = \dfrac{0.3}{0.5} = 0.6 = P(A)\), so the events are independent. (Check: \(0.6 \times 0.5 = 0.3\).) - \(P(A \mid B) = 0.2\) and \(P(B) = 0.5\). Find \(P(A \cap B)\).
Answer
\(P(A \cap B) = P(B)P(A \mid B) = 0.5 \times 0.2 = 0.1\). - \(A\) and \(B\) are mutually exclusive with \(P(A) = 0.3\) and \(P(B) = 0.4\). Are they independent?
Answer
No. \(P(A \cap B) = 0\), but \(P(A)P(B) = 0.12\). These are not equal. - Two cards are drawn from a standard pack of 52 without replacement. Find the probability that the second is an ace, given that the first was an ace.
Answer
After one ace is removed, 3 aces remain among 51 cards. The probability is \(\dfrac{3}{51} = \dfrac{1}{17} \approx 0.0588\).