The probability of an event changes when new information becomes available.
Suppose a customer has a 40% chance of completing a purchase. If we learn that the customer has already added three items to the cart, that probability may change.
Conditional probability recalculates the chance of an event after a condition is known.
Key question
How should an existing probability be updated when new evidence arrives?
What is conditional probability?
P(A|B) is the probability of A among cases in which B has occurred. We restrict attention to B and then ask what proportion of those cases also belong to A.
Conditional probability
P(A|B) = P(A ∩ B) ÷ P(B)
| Event | Customers |
|---|---|
| At least three items in cart | 200 |
| Completed purchase among them | 120 |
| Conditional completion probability | 120/200 = 60% |
How does independence relate to conditioning?
When A and B are independent, learning B does not change the probability of A: P(A|B) = P(A).
Meaning of independence
With two fair coins, the first coin landing heads does not change the probability for the second coin.
Conversely
If P(A|B) differs from P(A), then B carries information about A.
What does Bayes’ theorem update?
Bayes’ theorem lets us calculate P(A|B) when P(B|A) is easier to specify.
Bayes’ theorem
P(A|B) = P(B|A)P(A) ÷ P(B)
Prior probability
How plausible the hypothesis was before the evidence
Likelihood
How likely the evidence is under each hypothesis
Posterior probability
The updated probability after seeing the evidence
The prior is the probability before evidence; the posterior is the updated probability after evidence.
Why do base rates matter?
Suppose prevalence is 1% and both sensitivity and specificity are 95%. The test sounds accurate, but true cases are so rare that false positives can outnumber true positives.
Base-rate neglect
“The test is 95% accurate” does not mean “a positive result implies a 95% chance of disease.”
Change the prior and test performance
Adjust prevalence, sensitivity, and specificity to see how the posterior probability changes.
Prior probability
5.0%
Sensitivity
90%
Specificity
95%
Posterior probability
48.6%
Among 1,000 cases
true positives ≈ 45, false positives ≈ 48
Key lesson
Bayes’ theorem combines new evidence with the probability that existed before the evidence.