The 99 % Accurate Test
Home · Interesting Math Problems · Problem 4 · Probability traps

1. The problem

A disease affects 1 person in 1,000. A screening test is 99 % accurate: it catches 99 % of people who have the disease, and correctly clears 99 % of people who don't. You test positive.

How likely is it that you actually have the disease? Most people — including many doctors in published surveys — answer "about 99 %".

2. The answer

≈ 9 %
chance that a positive result means you are ill (9.02 %).
≈ 91 %
of positive results are false alarms — healthy people the test flagged.

The test is good; the disease is rare. Among many healthy people, a 1 % error rate produces far more false positives than there are sick people to find.

3. Count people, not percentages

Imagine 100,000 people tested:

Test positiveTest negativeTotal
Ill991100
Healthy99998,90199,900
Total1,09898,902100,000

Of the 1,098 positives only 99 are ill: 99 / 1,098 = 9.0 %. In formula form (Bayes' theorem):

P(ill | positive) = s·r / [ s·r + (1 − c)(1 − r) ]

where r is how common the disease is (prevalence), s the sensitivity (ill people caught) and c the specificity (healthy people cleared).

4. Try your own numbers

Disease affects 1 in · Sensitivity % · Specificity %
After 1 positive test
–
After 2 positive tests
–
(independent repeat test)
After 1 negative test
–
chance you are still ill

1,000 people who tested positive

■ actually ill   ■ false alarm

How the answer depends on how rare the disease is

5. Simulation

Random people are tested one by one with the settings above.

People tested: 0 · positives: 0 · positives who are ill: 0 → –

Press S to test one person.

6. Fine print

  • This is the base-rate fallacy. The same arithmetic applies to fraud alarms, security screening, spam filters and machine-condition alarms: a rare fault plus a slightly noisy alarm means most alarms are false.
  • A second, independent test fixes it quickly: each positive multiplies the odds by s/(1 − c) = 99. Odds 1 : 999 become 99 : 999, then 9,801 : 999 — about 91 %.
  • If you were tested because you already had symptoms, your starting probability is much higher than the population rate, and a positive means much more. Medical decisions belong with a doctor.