A test comes back positive. How likely is it that you actually have the condition — really?
Each square is one of 100 people. Teal means they have the condition and tested positive; ochre means they don't have it but tested positive anyway. Drag the base rate down — watch the ochre squares start to outnumber the teal ones, even though the test itself hasn't changed at all.
reads "the probability of , given that happened" — your belief in updated by evidence . Bayes' rule says how to compute it —
- — the event we want to know about (e.g., "has the condition").
- — the observed evidence (e.g., "tested positive").
- — the updated probability of given that happened (the posterior).
- — the probability of seeing evidence if is true (the likelihood, e.g. sensitivity).
- — the probability of before seeing any evidence (the prior, or base rate).
- — the overall probability of observing , across all cases.
- Map A and B to the demo
Here is "has the condition," is "tested positive."
- Read the likelihood and the prior
is the test's sensitivity — how often it catches a real case. is the base rate you just dragged.
Watch track the base rate: the test's accuracy never changes, yet how much a positive result should actually convince you depends heavily on how rare the condition was to begin with.
Base rate , sensitivity , false-positive rate :
- Find the overall chance of a positive test
- Apply Bayes' rule
- Read what it means
A "90% accurate" test, and a positive result still means less than a 1-in-10 chance of actually having it — because the condition was rare enough that false alarms from the other 99% swamp the true positives.
Drag the base rate until P(condition | positive) reads (approximately) 50%.
A test's own accuracy isn't the whole story — how rare the thing you're testing for is changes what a positive result actually means. Bayes' rule is the exact accounting for that.