Conditional probability and Bayes' theorem
IB Mathematics: Analysis and Approaches HLΒ· Topic 4.4 ProbabilityΒ· 20 min read
1. Conditional Probability: Definition & Basic Rulesβ β ββββ± 5 min
Conditional Probability
The probability of event occurring, given that event is already known to have occurred. It restricts the sample space to only outcomes where occurs.
Example:
Probability the second card drawn from a deck is an ace, given the first card drawn was an ace.
From the definition, the core formula for conditional probability is derived directly from the joint probability of and :
A bag contains 5 red marbles and 3 blue marbles. Two marbles are drawn without replacement. What is the probability the second marble is red, given the first was blue?
- 1
Define events: ,
- 2
Calculate joint and marginal probabilities:
- 3
- 4
Apply the conditional probability formula:
- 5
2. Tree Diagrams & Law of Total Probabilityβ β ββββ± 6 min
β Calculator OK
Tree diagrams are ideal for sequential probability problems. Each branch is labeled with the conditional probability of that step given all prior steps. The law of total probability lets us calculate the total probability of an outcome from all possible paths.
Multiply probabilities along each path to get joint probabilities
Add joint probabilities for all paths that lead to the outcome you want
Confirm the sum of all joint probabilities equals 1
Two machines produce widgets: Machine A makes 60% of widgets, 2% defective. Machine B makes 40% of widgets, 5% defective. What is the probability a randomly selected widget is defective?
- 1
Define events: , ,
- 2
Label tree branches with given conditional probabilities: ,
- 3
Apply the law of total probability:
- 4
3. Bayes' Theorem for Two Eventsβ β β βββ± 7 min
Bayes' Theorem
A formula to reverse conditional probability, calculating the posterior probability of a prior event given an observed outcome, from known prior and conditional probabilities.
A disease affects 1% of a population. A test for the disease returns positive for 95% of people with the disease, and positive for 10% of people without the disease. What is the probability a person who tests positive actually has the disease?
- 1
Define events: , . Given: , ,
- 2
Calculate total probability of testing positive:
- 3
- 4
Apply Bayes' theorem:
- 5
4. Extended Bayes' Theorem for Multiple Eventsβ β β βββ± 6 min
β Calculator OK
For mutually exclusive, exhaustive events , Bayes' theorem extends directly to calculate the posterior probability of any individual event:
Three boxes have counters: Box 1: 1 red, 2 blue; Box 2: 2 red, 1 blue; Box 3: 3 red, 6 blue. A box is chosen uniformly at random, then a counter drawn is red. What is the probability the counter came from Box 2?
- 1
Define events: , . Given:
- 2
Conditional probabilities: , ,
- 3
Calculate denominator (total probability of red):
- 4
- 5
Apply extended Bayes' theorem:
- 6
5. Common Pitfalls
Wrong move:
Dividing by instead of in
Why:
Mixing up which event is the given event that restricts the sample space
Correct move:
Always remember: the denominator is the probability of the event you already know has occurred,
Wrong move:
Leaving probabilities unchanged for sampling without replacement on tree diagrams
Why:
Treating dependent draws as independent, leading to incorrect joint probabilities
Correct move:
Adjust counts and probabilities for each subsequent branch after drawing without replacement
Wrong move:
Assuming without applying Bayes' theorem
Why:
Base rate neglect and confusion about the direction of conditional probability
Correct move:
Always explicitly apply Bayes' theorem when reversing the direction of conditional probability
Wrong move:
Using extended Bayes' theorem with non-exhaustive or overlapping events
Why:
The denominator of Bayes' theorem relies on all possible outcomes being included and non-overlapping
Correct move:
Confirm all events are mutually exclusive and cover the entire sample space before calculation
6. Quick Reference Cheatsheet
Concept | Formula | Common Use Case |
|---|---|---|
Conditional Probability | Find probability of A given B occurred | |
Law of Total Probability | Calculate total P(A) from two cases | |
Bayes' Theorem (2 events) | Reverse conditional probability | |
Extended Bayes (n events) | Multiple competing prior events |
7. Frequently Asked
When should I use Bayes' theorem instead of basic conditional probability?
Use basic conditional probability when you know the event you are conditioning on, and need the probability of the outcome. Use Bayes' theorem when you have the reverse: you know the outcome, and need the probability of a prior event that led to it.
When this came up on past exams
AI-estimated based on syllabus patterns β cross-check with official past papers for accuracy. Use only as revision-focus signals.
- 2021 Β· 1
Bayes' theorem with tree diagram
- 2022 Β· 2
False positive probability calculation
- 2023 Β· 1
Conditional probability multiple events
What's Next
Conditional probability and Bayes' theorem are foundational for nearly all advanced topics in statistics and probability, including discrete probability distributions, expected values, and statistical inference. This topic appears regularly in both Paper 1 and Paper 2 of IB AA HL exams, often combined with tree diagrams or binomial probability concepts. Mastery of these ideas also prepares you for university-level study of statistics, data science, and quantitative fields.
