12.2 Conditional probability and the conditional probability formula — Learn
Prerequisites: the addition and multiplication rules from Section 12.1, reading a two-way table, and the tree diagrams of GCSE probability.
By the end of this section you can: write and interpret a conditional probability ; use the formula in both directions; use a tree diagram to multiply along a path and add across paths; test independence with a conditional probability; and work backwards from a result to the probability of its cause.
1. What a conditional probability means
A conditional probability is the probability of one event when you already know that another event has happened. It is written
which is read as "the probability of given ".
The condition changes the sample space. Once you know that has happened, the only outcomes that matter are the ones inside . You are looking at the part of that lies inside .
2. The conditional probability formula
For two events and , with ,
The numerator is the probability of both events. The denominator is the probability of the condition. Dividing restricts the calculation to the part of the sample space where is true.
Rearranging the formula gives the multiplication rule for conditional probability:
The rule is symmetric. From you also get
Example 1. A college has 200 students. Of these, 120 study Mathematics, 80 study Physics, and 50 study both. A student is chosen at random. Find .
The condition is "studies Mathematics", so the sample space becomes those 120 students. Inside that group, 50 study Physics:
The formula gives the same value, because both probabilities are read over the same total of 200:
Example 2. Use the same college. Find .
Now the sample space is the 80 students who study Physics, and 50 of them study Mathematics:
The two answers and are different. The order of the condition matters.
3. Conditional probability and independence
If two events are independent, knowing that one has happened does not change the probability of the other. For independent events with ,
Substituting this into the formula recovers the multiplication rule for independent events:
So the three statements below say the same thing:
- and are independent;
- ;
- , when .
Example 3. For two events and , , and . Find and test independence.
This equals , so the events are independent.
4. Tree diagrams
A tree diagram shows a sequence of events. Each branch is labelled with a probability. The two rules are:
- multiply along a path, to find the probability of the events on that path;
- add across the paths, when several paths lead to the same event.
The probability on a second-stage branch is conditional on the first stage. When items are drawn without replacement, the denominator decreases.
Example 4. A bag contains 5 red counters and 3 blue counters. Two counters are taken at random, one after the other, without replacement. Find the probability that the first counter is red and the second is blue.
The first counter is red with probability . After a red counter is taken, 7 counters remain and 4 of them are red, so the second is blue with probability . Multiply along the branch:
Example 5. Use the same bag. Find the probability that the second counter is red.
The second counter is red on two paths: red then red, and blue then red. Find each path, then add:
The second draw has the same chance as the first. Adding the paths is also called the law of total probability.
5. Working backwards: from a result to its cause
Some questions give a result and ask for the probability of its cause. A tree diagram handles these cleanly.
- Draw the tree with the cause on the first branch.
- Multiply to find the probability of each path that gives the result.
- Add those path probabilities to find the probability of the result.
- Divide the path you want by that total.
Example 6. On any morning, the probability of a fire in a warehouse is . A detector sounds when there is a fire with probability , and it sounds when there is no fire with probability . Find the probability that there is a fire, given that the detector sounds.
Let be a fire and let be an alarm. The detector sounds on two paths.
Add the two paths to find the probability of an alarm:
Now divide the fire path by the total:
So fewer than 1 alarm in 20 is a real fire. The detector is reliable, and yet most alarms are false. The reason is the base rate: fires are rare, so the small false-alarm rate is applied to a huge number of quiet mornings.
6. Venn diagrams and two-way tables
Conditional probability can be read from any clear picture of the sample space.
A Venn diagram shows the whole sample space as a rectangle and the events as circles. is the part of inside , divided by the whole of .
A two-way table gives the counts directly. Read the row or column named in the condition as the new total, then read the cell you need.
All three methods, the formula, the tree and the table, agree. Choose the method that shows the numbers best.
7. Try it: how a reliable alarm can still be wrong
Predict first. The figure shows the warehouse tree. Before you move a control, predict what happens to when the false-alarm rate rises. Write down whether it rises, falls or stays the same, and why.
Test. Move the false-alarm rate up and down, and watch . Then change the base rate and watch the same number.
Explain. Write two sentences. The first explains why a higher false-alarm rate lowers . The second explains why the base rate affects the answer even when the detector does not change.
Watch out. The biggest error in this section is swapping the condition: is not the same as .
In the warehouse, , but . The first says the detector usually works. The second says most alarms are false. Both are true.
Re-check: name the group that comes after the word "given". That group is the denominator of the fraction.
Progress check
Return to the warehouse table from Section 12.1.
| Alarm sounds | Alarm does not sound | Total | |
|---|---|---|---|
| Fire | 95 | 5 | 100 |
| No fire | 1998 | 97902 | 99900 |
| Total | 2093 | 97907 | 100000 |
- Find .
- Find .
- Use the formula to find .
- Find from the fire row.
- Explain why the answers to questions 3 and 4 are so different, and which one the site manager needs.
You should now be able to
- write and interpret a conditional probability ;
- use ;
- use ;
- test independence with ;
- multiply along a tree-diagram path and add across paths;
- find a conditional probability from a two-way table or a Venn diagram;
- work backwards from a result to the probability of its cause.