Statistics

Bayes' Theorem

A test that is 90% accurate can still be wrong most of the time it says 'positive'. Picture 1,000 people as dots: the ones who test positive split into truly sick (teal) and false alarms (red), and when the disease is rare the false alarms win.

P(disease | positive)
P(disease | negative)

What to observe

  1. Start at 1% prevalence with a 90% / 90% test, then switch toPositive tests only. Barely a tenth of the dots are teal: a positive result means only about an 8% chance of actually being sick.
  2. Why? There are so many more healthy people that even a small false-positive rate produces a flood of red. The answer depends on thebase rate, not just the test's accuracy.
  3. Slide prevalence up and watch the positive dots flip from mostly-red to mostly-teal. Then push specificity toward 100%: shrinking that tiny false-positive rate is what really moves the posterior.

Shortcuts: space run/pause · s step · r reset · f fullscreen