STEM-TutorLearn • Practice • ExcelBook Free DemoFree demo

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
  1. What “given” means
  2. The formula
  3. Using a two-way table
  4. Independence
  5. The addition rule
  6. A surprising example: medical tests
  7. Tree diagrams
  8. Common mistakes
  9. Practice questions
  10. Frequently asked questions
  11. Key takeaways
  12. Related guides

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).

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).

Example 3: drawing without replacement

Two cards are drawn from a standard deck without replacement. Find the probability that both are hearts.

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?

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?

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

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
0.4.

Q2. A bag has 4 red and 6 blue balls. Two are drawn without replacement. Find P(second red | first red).

Show answer
3/9 = 1/3.

Q3. P(A) = 0.5, P(B) = 0.2, P(A and B) = 0.15. Are A and B independent?

Show answer
0.5 × 0.2 = 0.10 ≠ 0.15, so no.

Q4. Of 60 students, 25 take French, and 10 of those also take Spanish. Find P(Spanish | French).

Show answer
10/25 = 0.4.

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