Why a 99% accurate test can still be wrong most of the time

An interactive lesson on Bayes' theorem and the base rate fallacy. Move the sliders and watch 10,000 imaginary people get tested.

1. Set up the test

How common the condition is in the group being tested (log scale, 0.01% to 50%).
Of people who have the condition, the share who test positive.
Of people who do not have the condition, the share who test negative.

2. What a positive result means

chance you have it, given a positive test (PPV)
chance you are clear, given a negative test (NPV)
of 10,000 people test positive

3. See all 10,000 people

True positive False positive False negative True negative
Test positiveTest negativeTotal
Has condition
No condition
Total10,000

4. The formula behind it

Bayes' theorem turns "how often does the test catch the condition" into "how likely is the condition, given the test result".

P(condition | positive) = sensitivity x prevalence / [ sensitivity x prevalence + (1 - specificity) x (1 - prevalence) ]

The key insight: when a condition is rare, the healthy group is huge. Even a small false positive rate applied to a huge group produces more false alarms than there are real cases. That is the base rate fallacy: ignoring how common something is before the test.

5. Check yourself

Sources and notes

All scenarios on this page are hypothetical and computed exactly from the slider values; they do not describe any real test. The method follows standard definitions: