Lesson 4 of 8 · 15 min

Conditional probability

Recognise when a probability is conditional, restrict the sample space to the given event, and calculate P(A | B) from two-way tables, Venn diagrams and the formula.

What you will be able to do

  • Recognise language that signals a conditional probability: given, if, of those who, among.
  • Calculate P(A∣B)P(A \mid B) by restricting the sample space to BB.
  • Use P(A∣B)=P(A∩B)P(B)P(A \mid B) = \dfrac{P(A \cap B)}{P(B)} and its rearrangement P(A∩B)=P(A∣B)P(B)P(A \cap B) = P(A \mid B)P(B).

A Year 11 student at a Logan school is chosen at random. What is the chance they catch the bus to school? Now suppose you are told they live more than 5 km from school. Your answer should go up. New information changes probabilities, and conditional probability is how you measure the change.

A survey of 200 Year 11 students. BB: catches the bus. FF: lives more than 5 km from school.
StudentsMore than 5 km (FF)5 km or less (F′F')Total
Catches the bus (BB)542680
Does not catch the bus (B′B')18102120
Total72128200

For a student chosen from all 200, P(B)=80200=25P(B) = \frac{80}{200} = \frac{2}{5}.

Now you are told the student lives more than 5 km away. Only the 72 students in the FF column are still possible, so the sample space shrinks to them. Of those 72, 54 catch the bus:

P(B∣F)=5472=34.P(B \mid F) = \frac{54}{72} = \frac{3}{4}.

P(B∣F)P(B \mid F) is read "the probability of BB given FF". Knowing FF raised the probability of BB from 25\frac{2}{5} to 34\frac{3}{4}.

Definition

Conditional probability

P(A∣B)P(A \mid B) is the probability that AA occurs, given that BB has occurred. The condition BB becomes the new sample space.

With equally likely outcomes or counts, P(A∣B)=n(A∩B)n(B)P(A \mid B) = \dfrac{n(A \cap B)}{n(B)}. In general,

P(A∣B)=P(A∩B)P(B),P(B)>0.P(A \mid B) = \frac{P(A \cap B)}{P(B)}, \qquad P(B) > 0.

Using the survey table, find the probability that a student lives more than 5 km from school, given that they catch the bus. Give your answer as a fraction.

Reads asYour answer shows here as maths.
Language that signals a conditional probability
The question says…Write it as
the probability a student catches the bus, given that they live more than 5 km awayP(B∣F)P(B \mid F)
if a student lives more than 5 km away, the probability they catch the busP(B∣F)P(B \mid F)
of the students who catch the bus, the proportion who live more than 5 km awayP(F∣B)P(F \mid B)
among bus travellers, the percentage who live more than 5 km awayP(F∣B)P(F \mid B)
the probability a student lives more than 5 km away and catches the busP(F∩B)P(F \cap B), which is not conditional

A news report says: "65% of the people who tested positive had symptoms." Let SS be the event that a person has symptoms and TT the event that a person tests positive. Which probability is 0.65?

Choose one answer
Interactive

Restricting to the condition

Given BB, only the BB circle counts, so P(A∣B)=P(A∩B)P(B)=0.20.4=0.5P(A \mid B) = \frac{P(A \cap B)}{P(B)} = \frac{0.2}{0.4} = 0.5. Given AA instead, P(B∣A)=0.20.5=0.4P(B \mid A) = \frac{0.2}{0.5} = 0.4. Same overlap, different condition, different answer.

Common mistake

Two ways to get conditional probability wrong

Swapping the condition. P(A∣B)P(A \mid B) and P(B∣A)P(B \mid A) have the same numerator, P(A∩B)P(A \cap B), but different denominators. In the survey, P(B∣F)=0.75P(B \mid F) = 0.75 but P(F∣B)=0.675P(F \mid B) = 0.675.

Dividing by everything. The denominator is the probability (or count) of the condition, not 1 or the grand total. 54200\frac{54}{200} answers "lives far away and catches the bus", not "catches the bus given lives far away".

Worked example

Conditional probabilities from a two-way table

  • Simple familiar
  • Technology free

A Brisbane café recorded 150 orders one Saturday morning, noting whether each order included a coffee (CC) and whether it included food (FF).

OrdersFood (FF)No food (F′F')Total
Coffee (CC)484290
No coffee (C′C')273360
Total7575150

An order is chosen at random. Find:

(a) P(F∣C)P(F \mid C) (b) P(C∣F)P(C \mid F) (c) P(F∣C′)P(F \mid C')

4 steps

Try it yourself first, then check the working one step at a time.

Method

  1. Find the row or column of the condition.

  2. Divide the count in the overlap by the total of that row or column.

Watch out for

  • Dividing by the grand total: 48150\frac{48}{150} is P(F∩C)P(F \cap C).

  • Mixing up (a) and (b): the same 48 is divided by different totals.

Multiply both sides of the definition by P(B)P(B) and you get the form the syllabus uses, the multiplication rule. It says the probability that both events happen is the probability of the first, times the probability of the second given the first. It drives every tree diagram in the next lesson.

Multiplication rule
P(A∩B)=P(A∣B) P(B)P(A \cap B) = P(A \mid B)\,P(B)

For events AA and BB, P(A∣B)=0.35P(A \mid B) = 0.35 and P(B)=0.6P(B) = 0.6. Find P(A∩B)P(A \cap B).

Worked example

Conditional probability from given probabilities

  • Complex familiar
  • Technology free

For events AA and BB, P(A)=0.5P(A) = 0.5, P(B)=0.4P(B) = 0.4 and P(A∣B)=0.3P(A \mid B) = 0.3. Find:

(a) P(A∩B)P(A \cap B) (b) P(B∣A)P(B \mid A) (c) P(A∪B)P(A \cup B) (d) P(A∣B′)P(A \mid B')

5 steps

Try it yourself first, then check the working one step at a time.

Method

  1. P(A∩B)=P(A∣B) P(B)P(A \cap B) = P(A \mid B)\,P(B)

  2. P(B∣A)=P(A∩B)P(A)P(B \mid A) = \dfrac{P(A \cap B)}{P(A)}: same numerator, new denominator.

  3. For a condition like B′B', find P(A∩B′)=P(A)−P(A∩B)P(A \cap B') = P(A) - P(A \cap B) first.

Watch out for

  • Assuming P(B∣A)=P(A∣B)=0.3P(B \mid A) = P(A \mid B) = 0.3.

  • Using P(A∣B′)=1−P(A∣B)=0.7P(A \mid B') = 1 - P(A \mid B) = 0.7: the condition changed, so the complement rule doesn't apply this way.

Exam tip

Write the statement first

Before substituting, write the probability you want in notation, for example "P(F∣B)=P(F∩B)P(B)P(F \mid B) = \frac{P(F \cap B)}{P(B)}". It forces you to decide which event is the condition, and markers give credit for it.

Summary

  • P(A∣B)P(A \mid B) is the probability of AA given that BB has occurred: BB becomes the sample space.

  • P(A∣B)=P(A∩B)P(B)P(A \mid B) = \dfrac{P(A \cap B)}{P(B)}; with counts, n(A∩B)n(B)\dfrac{n(A \cap B)}{n(B)}.

  • "Given", "if", "of those who" and "among" signal the condition.

  • P(A∣B)P(A \mid B) and P(B∣A)P(B \mid A) are usually different.

  • The multiplication rule: P(A∩B)=P(A∣B) P(B)P(A \cap B) = P(A \mid B)\,P(B).

Finished the lesson?

Try the 3 quick checks above and the lesson completes itself, or mark it complete now.

Lesson 4 of 80% read

Save your progress with a free account