All guides

Bayes' Theorem for Beginners: Why Accurate Tests Still Mislead

Updating, not replacing

Bayes' theorem is a rule for revising a probability when new evidence arrives. It combines a prior, what you believed before the evidence, with the likelihood of the evidence under each possibility, and returns a posterior, what you should believe now. The formula divides the probability of the evidence if the thing is true by the probability of the evidence in total. Nothing in it is mysterious; it is careful bookkeeping of proportions. Its power is that it forces the base rate into the open, and the base rate is the number our instincts most often ignore. Written as odds, the rule becomes almost mechanical: posterior odds equal prior odds times the likelihood ratio, so each piece of evidence multiplies your odds by a factor that measures how diagnostic it really is.

The medical test paradox

Imagine a condition affecting 1 person in 100, and a test that catches 99 percent of true cases while wrongly flagging 5 percent of healthy people. Test 10,000 people: about 99 of the 100 true cases are caught, but 5 percent of the 9,900 healthy people, roughly 495, also test positive. Of the roughly 594 positives, only 99 are real, so a positive result means about a 17 percent chance of actually having the condition. The test is excellent; the condition is rare; rarity wins. This is not a trick but the arithmetic of screening, and it is why doctors confirm screening positives with a second, different test. The same arithmetic governs airport security, fraud alerts and drug testing: when the target is rare, most alarms are false, however good the detector.

Bayes at work everywhere

Spam filters are Bayes in production: a message starts with a prior chance of being spam, and each suspicious word updates it. Weather forecasts, fraud detection, search ranking and courtroom arguments about evidence all run on the same update rule, well or badly. The practical habit Bayes teaches is to always ask two questions before trusting a striking result: how common was this before the evidence, and how often does this evidence appear when nothing is going on? The calculator below lets you test any screening scenario with your own three numbers. Once the base-rate habit forms, headlines about miracle tests and shocking studies read differently: the question is never just how accurate the test is, but what the answer was before the test was run.

Try it with your own numbers

The free calculators that go with this guide:

Run a Bayes calculation