The Rare-Disease Test Puzzle
The classic interview puzzle where a 99%-accurate test for a rare condition still leaves most positive results wrong — a hands-on way to feel why base rates dominate accuracy.
Prerequisites: Bayes' Theorem, Conditional Probability
The problem. A disease affects 1 in 1,000 people. A test for it is 99% accurate: if you have the disease it comes back positive 99% of the time, and if you don't have it, it comes back negative 99% of the time. You test positive. What's the probability you actually have the disease?
Almost everyone's gut answer is "about 99%." The real answer is under 9%. This gap between intuition and arithmetic is exactly why the puzzle shows up in interviews — it tests whether you reach for the actual numbers instead of the accuracy figure sitting right in front of you.
Why intuition fails: think in counts, not percentages
The trick is to stop thinking in probabilities and imagine 100,000 actual people. At a rate of 1 in 1,000, exactly 100 of them have the disease and 99,900 don't. Now apply the test:
- Of the 100 sick people, 99% test positive: 99 true positives.
- Of the 99,900 healthy people, 1% test positive anyway (false positive rate): false positives.
Add up everyone who tested positive: people. Only 99 of them are actually sick. So:
In plain English: even though the test is right 99% of the time on any individual, the disease is so rare that the pool of healthy people is enormous — 99,900 versus 100 — so even a tiny 1% false-positive rate among that huge healthy pool generates ten times more false alarms than true detections.
The explorer above updates a belief (a beta distribution) as evidence arrives, which is the same mechanism at work here in miniature: your belief that someone is sick starts at the tiny base rate, and one positive test result is nowhere near enough evidence to overwhelm how rare the disease was to begin with. Try shrinking the "prior" toward zero and watch how much data it takes to pull the posterior up substantially — that's the intuition for why a single 99%-accurate test barely moves the needle on a 0.1% base rate.
The general technique: Bayes with a natural-frequency table
This is Bayes' theorem in disguise, but the fastest way to solve it under interview pressure is a 2x2 table of counts, not the formula:
| Has disease | No disease | Total | |
|---|---|---|---|
| Tests positive | 99 | 999 | 1,098 |
| Tests negative | 1 | 98,901 | 98,902 |
| Total | 100 | 99,900 | 100,000 |
Read the answer straight off the "tests positive" row: 99 out of 1,098. The formula version is , but the table gets you there faster and with less room to plug numbers into the wrong slot — a common failure mode when candidates rush the algebra.
Worked example: what if the disease is more common?
Same 99%-accurate test, but now the disease affects 1 in 20 people (5%) — think a common seasonal illness rather than a rare one. Out of 100,000: 5,000 sick, 95,000 healthy. True positives: . False positives: . So . The same test, applied to a population where the condition is far less rare, becomes a genuinely reliable positive — the base rate did all the work, not the test's accuracy.
A positive test result is only as trustworthy as the disease is common. When the base rate is low, most positives are false alarms even from a very accurate test, because the healthy population is so much larger that its small error rate outnumbers the sick population's high hit rate. Always convert to a count of people out of a round number like 100,000 before trusting a percentage.
The classic mistake is confusing — the test's accuracy, which is given — with — the answer being asked for. These are different conditional probabilities and are not interchangeable; conflating them is exactly the trap this puzzle is designed to catch.
Related concepts
Practice in interviews
Further reading
- Gigerenzer, Calculated Risks, ch. 1