If a test is 99% accurate, why can a positive result still probably be wrong?

Because it depends on how common the condition is. Test 1,000 people for something only 1 has, and a 99% accurate test finds that one case but also wrongly flags about 10 healthy people. So only about 1 positive in 11 is real. Bayes' rule does this count: real positives divided by all positives.

1,000 people tested45 have it, test positive19 don’t, test positive5 have it, test negative931 don’t, test negativeIf you test positive:70.3% chance it’s real45 real out of64 positives
Chance a positive result is real
70.3%
Chance a negative result is real
99.5%
False alarms per 1,000 tested
19
Real cases caught per 1,000
45

This shows how test math works, not what a result means for you. A doctor knows the test, your symptoms, and your risk, so ask them about any real result.

Challenge: Keep it at 1% common or less, and find test accuracy where a positive is real at least half the time.

%
Screening everyone means low odds. Testing people with symptoms means much higher odds.
%
%

Play

Start with the rare-condition screening, then raise how common it is and watch the answer change.

Challenge: Keep it at 1% common or less, and find test accuracy where a positive is real at least half the time. The box under the picture turns green when you get it.

Stuck? Pick one of the examples from the “Try an example” menu, or press “New example.”

Understand

P(has it∣+)=sens⋅psens⋅p+(1−spec)(1−p)P(\text{has it} \mid +) = \frac{\text{sens}\cdot p}{\text{sens}\cdot p + (1 - \text{spec})(1 - p)}

Picture 1,000 people. If 1 in 1,000 has the condition, a 99% sensitive test almost surely catches that one person. But the test is also wrong 1% of the time on the other 999, so about 10 healthy people test positive too.

That's 11 positives, and only 1 is real. That's Bayes' rule, real positives divided by all positives:

P(real∣+)=sens⋅psens⋅p+(1−spec)(1−p)P(\text{real} \mid +) = \frac{\text{sens}\cdot p}{\text{sens}\cdot p + (1 - \text{spec})(1 - p)}

Each square is one person, colored by whether they have it and what the test said.

Use

Every input has a unit menu, so you can type values in the units you already have. Results follow your units.

Show the work

  1. Of 1,000 people, how many have it1000 \times 0.05 = 50
  2. Real cases the test catches (sensitivity)50 \times 0.9 = 45
  3. False alarms among everyone else (1 − specificity)950 \times 0.02 = 19
  4. Bayes’ rule: real positives ÷ all positivesP(\text{real} \mid +) = \frac{0.9 \times 0.05}{0.9 \times 0.05 + 0.02 \times 0.95} = 70.31\%

Export

Export PDF

Set how common the condition is and how good the test is.

  • These are illustrative numbers, not any specific real test.

For learning and estimation. Verify with applicable codes, standards, and a qualified professional before using in design, construction, or safety-critical work.

Cheat card

P(real∣+)=sens⋅psens⋅p+(1−spec)(1−p)P(\text{real} \mid +) = \frac{\text{sens}\cdot p}{\text{sens}\cdot p + (1 - \text{spec})(1 - p)}
P(A∣B)=P(B∣A) P(A)P(B)P(A \mid B) = \frac{P(B \mid A)\,P(A)}{P(B)}
SymbolMeaningUnit
pphow common it is among people tested
sens\text{sens}sensitivity: positive when it’s there
spec\text{spec}specificity: negative when it’s not
  • Count people, not percents. Picture 1,000 of them.
  • When something is rare, false alarms from the many healthy people outnumber the few real cases.
  • Testing people who already have symptoms raises the odds that a positive is real.

Print this card

Where it’s used

  • Medicine & Health
    Doctors confirm a positive screening with a second, different test for exactly this reason.
  • Biology
    Screening programs weigh how many false alarms they can accept for each real case found.
  • Health & Fitness
    Understand why a doctor says a first positive “needs follow-up” instead of treating it as final.

Questions people ask

What's the difference between sensitivity and specificity?

Sensitivity is how often the test catches the condition when it's there. Specificity is how often it correctly comes back negative when it isn't.

Why do doctors order a second test after a positive?

A second, independent test on the people who tested positive starts from much higher odds, so a second positive is far more convincing.

What is the base rate fallacy?

Ignoring how common something is. A test's accuracy alone can't tell you what a positive means without the base rate.