Conditional Probability
What it means to find a probability “given” that something happened, the formula for P(A | B), the general multiplication rule, tree diagrams, and why P(A | B) and P(B | A) are different numbers.
A conditional probability is the probability of an event once you know that another event has happened. Knowing that narrows the possibilities: you only look at the outcomes where the given event happened, and ask what share of those are in your event. Turned around, the same idea gives the general multiplication rule for the probability that two events both happen.
1What “given” means
The probability that event \(A\) occurs given that event \(B\) has occurred is written \(P(A \mid B)\), read “the probability of \(A\) given \(B\).” The vertical bar means “given.”
| Passed quiz | Did not pass | Total | |
|---|---|---|---|
| Ate breakfast | 288 | 72 | 360 |
| Skipped breakfast | 156 | 84 | 240 |
| Total | 444 | 156 | 600 |
Breakfast and a quiz
Of 600 students, 360 ate breakfast and 288 of those passed a first-period quiz; of the 240 who skipped breakfast, 156 passed. One student is chosen at random. Find P(passed | ate breakfast) and P(passed | skipped breakfast).
- 1“Given ate breakfast” keeps only the 360 breakfast eaters: \(P(\text{pass} \mid \text{breakfast}) = \dfrac{288}{360} = 0.80\).
- 2“Given skipped breakfast” keeps only the 240 others: \(P(\text{pass} \mid \text{no breakfast}) = \dfrac{156}{240} = 0.65\).
2The formula
When the information comes as probabilities instead of counts, use
It is the same idea as the table: the joint probability, as a share of the probability of the given event. Check it with the breakfast data: \(P(\text{pass} \cap \text{breakfast}) = 288 \div 600 = 0.48\) and \(P(\text{breakfast}) = 360 \div 600 = 0.60\), so \(0.48 \div 0.60 = 0.80\), matching the count method.
From probabilities, not counts
For a randomly chosen student, P(A ∩ B) = 0.12 and P(B) = 0.40. Find P(A | B).
- 1\(P(A \mid B) = \dfrac{P(A \cap B)}{P(B)}\). The given event, \(B\), goes in the denominator.
- 2\(P(A \mid B) = \dfrac{0.12}{0.40} = 0.30\).
In \(P(A \mid B)\), the event after the bar, the one that is given, goes in the denominator. Dividing by \(P(A)\) instead gives \(P(B \mid A)\), a different number.
3The general multiplication rule
Rearranging the formula gives the general multiplication rule: the probability that \(A\) and \(B\) both occur is the probability of \(A\) times the conditional probability of \(B\) given \(A\).
A tree diagram organizes this. The first set of branches shows the first event; the branches after them show conditional probabilities given each first branch; and multiplying along a path gives the probability of that whole path.
Being late
30% of students ride the bus. Bus riders are late 20% of the time; other students are late 5% of the time. For a randomly chosen student on a random day, find P(bus ∩ late) and P(late).
- 1General multiplication rule: \(P(\text{bus} \cap \text{late}) = P(\text{bus}) \cdot P(\text{late} \mid \text{bus}) = 0.30 \times 0.20 = 0.06\).
- 2The other way to be late: \(P(\text{no bus} \cap \text{late}) = 0.70 \times 0.05 = 0.035\).
- 3Late happens on either path, and the paths do not overlap, so add them: \(P(\text{late}) = 0.06 + 0.035 = 0.095\).
The branches leaving any one point of a tree cover every possibility at that step, so they must add to 1: 0.30 + 0.70, then 0.20 + 0.80, then 0.05 + 0.95. If they do not, a branch is missing or a probability is wrong.
Two marbles
A bag holds 5 red and 3 blue marbles. Two are drawn without replacement. Find P(both red) and P(one of each color).
- 1Both red: \(\dfrac{5}{8} \times \dfrac{4}{7} = \dfrac{20}{56} \approx 0.357\). After a red is removed, 4 of the 7 left are red.
- 2One of each can happen as red then blue or blue then red: \(\dfrac{5}{8} \times \dfrac{3}{7} = \dfrac{15}{56}\) and \(\dfrac{3}{8} \times \dfrac{5}{7} = \dfrac{15}{56}\).
- 3Add the two orders: \(\dfrac{30}{56} \approx 0.536\).
Without replacement, the first draw changes the bag. The second probability must be conditional on what came out first: 4/7, not 5/8. Using the original 5/8 twice is only right when each marble is put back before the next draw.
4Turning the condition around
\(P(A \mid B)\) and \(P(B \mid A)\) are usually different. The chance a bus rider is late (0.20) is not the chance a late student rode the bus (about 0.632). To find the reversed probability, build the tree, find the joint probability and the total probability of the new given event, and divide.
Was a late student on the bus?
Using the tree in Figure 2, a student arrives late. What is the probability the student rode the bus?
- 1The given is now “late,” so it goes in the denominator: \(P(\text{bus} \mid \text{late}) = \dfrac{P(\text{bus} \cap \text{late})}{P(\text{late})}\).
- 2\(P(\text{bus} \mid \text{late}) = \dfrac{0.06}{0.095} \approx 0.632\).
- 3Only 30% of students ride the bus, but bus riders make up about 63% of the late students, because they are late far more often.
Name the given event in words: “Given that a student is late, the probability that the student rode the bus is about 0.632.” Saying the condition out loud is the best defense against flipping it.
Most students who passed ate breakfast? \(288 \div 444 \approx 0.649\). Most breakfast eaters passed? \(288 \div 360 = 0.80\). Both true, different numbers, different questions. Read which event is given before you divide.
5Quick reference
| Idea | Rule |
|---|---|
| Conditional probability | \(P(A \mid B) = \dfrac{P(A \cap B)}{P(B)}\) |
| From a two-way table | cell ÷ total of the given row or column |
| General multiplication rule | \(P(A \cap B) = P(A) \cdot P(B \mid A)\) |
| Tree diagram | Multiply along a path; add the paths that make up an event |
| Order matters | \(P(A \mid B)\) is usually not \(P(B \mid A)\) |