Updating beliefs with evidence
Bayes’ theorem tells you how to revise the probability of a hypothesis when new evidence arrives. It combines what you believed before (the prior) with how likely the evidence is if the hypothesis is true or false.
The formula
P(A | B) = P(B | A) × P(A) ÷ P(B)
with P(B) = P(B | A) × P(A) + P(B | not A) × P(not A).
- P(A): prior probability of the hypothesis.
- P(B | A): probability of the evidence if A is true.
- P(B | not A): probability of the evidence if A is false.
- P(A | B): posterior probability, after seeing the evidence.
Worked example: a screening test
A disease affects 1% of people. A test detects it 90% of the time and gives a false positive 9% of the time in healthy people. You test positive. What is the chance you have the disease?
- P(B) = 0.90 × 0.01 + 0.09 × 0.99 = 0.009 + 0.0891 = 9.81%.
- P(A | B) = 0.009 ÷ 0.0981 ≈ 9.2%.
Despite the positive test, the chance of disease is only about 9%. Out of 1,000 people, 9 sick people test positive, but so do 89 healthy ones.
The same example as counts
| Test positive | Test negative | Total | |
|---|---|---|---|
| Sick | 9 | 1 | 10 |
| Healthy | 89 | 901 | 990 |
| Total | 98 | 902 | 1,000 |
Thinking in natural frequencies like this makes Bayes’ theorem much easier to grasp, and studies show doctors and patients reason better with counts than with percentages.
The likelihood ratio
The ratio P(B | A) ÷ P(B | not A), here 0.90 ÷ 0.09 = 10, measures how strongly the evidence favors A. In odds form:
posterior odds = prior odds × likelihood ratio
Prior odds of 1 to 99 times 10 give posterior odds of 10 to 99, or about 9.2%.
Common mistakes
- Base rate neglect: ignoring the prior and treating P(B | A) as if it were P(A | B). This is the classic error behind overconfident readings of tests, alarms and forensic evidence.
- The prosecutor’s fallacy: confusing “the chance of this evidence if the defendant is innocent” with “the chance the defendant is innocent given the evidence”.
- Overconfident priors: a prior of 0 or 100% can never be changed by evidence.
Applying it again
After a second independent test, the posterior from the first becomes the new prior. Two positive results raise the probability far more than one, which is why confirmatory testing is standard practice.