Conditional probability, explained with examples
Conditional probability is the probability of an event given that another event has happened. Knowing extra information changes the probabilities, sometimes dramatically, and this idea runs through AP Statistics, A level Maths and everyday decisions.
On this page
What “given” means
P(A | B) is read “the probability of A given B”. It means: out of the cases where B happens, what fraction also have A? Knowing B has happened shrinks the set of possibilities you are looking at. For example, the probability that a randomly chosen person is over 190 cm tall is small, but the probability that a person is over 190 cm tall given that they play professional basketball is much larger.
The formula
P(A | B) = P(A and B) / P(B)
Divide the probability of both events by the probability of the event you are told has happened. Rearranging gives the general multiplication rule: P(A and B) = P(B) × P(A | B), which is exactly what you do when multiplying along the branches of a tree diagram.
Using a two-way table
Two-way tables make conditional probability almost automatic: restrict your attention to the row or column for the given event, and use its total as the denominator.
Example 1: a two-way table
A survey of 200 students records whether they play a sport and whether they passed a fitness test. Sport and passed: 72; sport and failed: 18; no sport and passed: 55; no sport and failed: 55. Find P(passed | plays sport) and P(plays sport | passed).
- 90 students play sport, and 72 of them passed: P(passed | sport) = 72/90 = 0.80.
- 127 students passed, and 72 of them play sport: P(sport | passed) = 72/127 ≈ 0.567.
- These are different. P(A | B) and P(B | A) are not the same in general, and confusing them is one of the most common errors in probability.
Example 2: using the formula
P(A) = 0.5, P(B) = 0.4 and P(A and B) = 0.1. Find P(A | B) and P(B | A).
- P(A | B) = 0.1/0.4 = 0.25.
- P(B | A) = 0.1/0.5 = 0.2.
Example 3: drawing without replacement
Two cards are drawn from a standard deck without replacement. Find the probability that both are hearts.
- P(first heart) = 13/52. Given that, P(second heart) = 12/51.
- P(both) = 13/52 × 12/51 = 1/17 ≈ 0.0588, using the general multiplication rule.
Independence
Events A and B are independent if knowing one happened does not change the probability of the other:
P(A | B) = P(A), or equivalently P(A and B) = P(A) × P(B).
To check independence on the AP exam, compare P(A | B) with P(A) using numbers, and state the conclusion. In Example 1, P(passed) = 127/200 = 0.635, but P(passed | sport) = 0.80. They are different, so passing and playing sport are not independent.
Do not confuse independent with mutually exclusive. Mutually exclusive events cannot happen together, so P(A and B) = 0. If two events with non-zero probabilities are mutually exclusive, they cannot be independent, because knowing one happened tells you the other did not.
Example 4: testing independence
P(A) = 0.3, P(B) = 0.6 and P(A and B) = 0.18. Are A and B independent?
- P(A) × P(B) = 0.3 × 0.6 = 0.18 = P(A and B).
- Yes, A and B are independent.
The addition rule
Conditional probability questions often sit alongside the general addition rule: P(A or B) = P(A) + P(B) − P(A and B). The subtraction stops outcomes in both events being counted twice. Using Example 1, P(sport or passed) = 90/200 + 127/200 − 72/200 = 145/200 = 0.725. For mutually exclusive events, P(A and B) = 0, and the rule reduces to simple addition. On a Venn diagram, the subtraction removes the overlap that would otherwise be counted twice.
A surprising example: medical tests
Conditional probability explains a result that surprises most people, including many doctors.
Example 5: a positive test
A disease affects 1% of a population. A test correctly gives a positive result for 95% of people who have it, and wrongly gives a positive result for 5% of people who do not. A person tests positive. What is the probability they have the disease?
- Imagine 10,000 people. 100 have the disease, and 95 of them test positive. 9900 do not, and 5% of them, 495 people, also test positive.
- Total positives: 95 + 495 = 590. Of these, 95 have the disease.
- P(disease | positive) = 95/590 ≈ 0.161, only about 16%. Because the disease is rare, most positive results are false alarms. This is why positive screening tests are usually followed by a second test.
Working with a large imaginary group, called a natural frequency approach, is often clearer than using the formula directly, and it works well on exam questions too. Choose a group size, such as 10,000, that makes every count a whole number, then fill in a two-way table or tree with counts instead of probabilities.
Tree diagrams
On a tree diagram, the second set of branches already shows conditional probabilities: each one is the probability of the second event given the first. Multiply along the branches for “and”, add the end results for “or”, and for a “given” question working backwards, divide the relevant branch total by the total probability of the given event, exactly as in Example 5.
Common mistakes
- Confusing P(A | B) with P(B | A).
- Using the whole total instead of the given group's total as the denominator.
- Treating mutually exclusive as the same as independent.
- Claiming independence without comparing numbers.
Practice questions
Try each one before opening the answer.
Q1. P(A and B) = 0.12 and P(B) = 0.3. Find P(A | B).
Show answer
Q2. A bag has 4 red and 6 blue balls. Two are drawn without replacement. Find P(second red | first red).
Show answer
Q3. P(A) = 0.5, P(B) = 0.2, P(A and B) = 0.15. Are A and B independent?
Show answer
Q4. Of 60 students, 25 take French, and 10 of those also take Spanish. Find P(Spanish | French).
Show answer
Frequently asked questions
Is conditional probability on the AP Statistics exam?
Yes. It is part of Unit 4, probability, and appears in multiple-choice and free-response questions, often with two-way tables or tree diagrams.
Is conditional probability in GCSE or A level Maths?
GCSE Higher covers conditional probability with tree diagrams, Venn diagrams and two-way tables. A level Maths uses the formula P(A | B) = P(A ∩ B)/P(B) and tests for independence.
Key takeaways
- P(A | B) = P(A and B)/P(B).
- In a two-way table, use the given group's total as the denominator.
- P(A | B) is usually different from P(B | A).
- Independent: P(A | B) = P(A), or P(A and B) = P(A)P(B).
- For rare conditions, most positive tests can be false positives.