← All Labs
INTERACTIVE APPLET · PROBABILITY · BAYESIAN INFERENCE

Bayes' Theorem as Shrinking Areas

A doctor tells you a test for a rare disease is 99% accurate and yours came back positive. How scared should you be? Intuition screams "99%." The true answer is often under 10% — and the reason is pure geometry. Draw the whole population as a unit square. A thin vertical slice is the prior (who actually has the disease); horizontal cuts are the test's accuracy. A positive result doesn't rewrite the square — it just keeps the tiles where the test fired and re-normalizes them to add up to one. Watch the posterior fall out of the shrinking areas.

P(D | +) = TP-area ÷ (TP-area + FP-area)

The Bayes square — prior × likelihood tiles

Split the population by base rate, then by test outcome · read the posterior off the areas
SVG · exact area arithmetic

DRIVE IT

True positive (sick & test +) False positive (healthy & test +) False negative (sick & test −) True negative (healthy & test −)
Drag the sliders or grab the dividing lines directly on the square.
POSTERIOR P(D | +)
chance you're actually sick given a positive test

CLASSIC SCENARIOS

WALKTHROUGH

  1. Start on the 99/99 rare-disease preset. The disease slice on the left is a sliver — only 1% of the square. Note the posterior clock reads a shocking ~50%, not 99%.
  2. Switch to mode . A positive test deletes the two "test −" tiles (the greyed regions) and stretches what's left to refill the square. The posterior is the green fraction of that surviving strip.
  3. The green survivor is tiny (few sick people) but the pink false-positive survivor is comparable — because 1% of a huge healthy crowd rivals 99% of a tiny sick one.
  4. Push the prior up. Watch the posterior rocket toward 1: the same test is far more convincing for a common condition.
  5. Now drop specificity from 99% to 95%. The pink false-positive band swells and your posterior collapses — false-positive rate, not sensitivity, rules the rare-disease regime.

AHA

THE INSIGHT
"99% accurate" is a statement about the columns (how the test behaves given the truth). What you want is a statement about the rows (the truth given the test) — and to flip columns into rows you must weight by how wide each column was to begin with. Base rates set the widths, so base rates dominate.

RESEARCH NOTE

Bayes' rule is just "posterior area ÷ total surviving area." The denominator \(P(+)\) — the marginal likelihood — is the sum of both surviving tiles (law of total probability). Further reading: Thomas Bayes' posthumous 1763 Essay; Gigerenzer & Hoffrage (1995) on why natural frequencies beat percentages for human intuition; Kahneman & Tversky on base-rate neglect.

EXPLANATION

Every conditional-probability puzzle is secretly an area puzzle. Let the unit square be the entire population, its total area 1. Cut it vertically at the prior: the left column has width \(P(D)\) (people with the disease), the right column width \(P(\neg D)\) (people without). Nothing about the test has happened yet — these widths are the base rates.

Now cut each column horizontally by how the test responds. In the disease column, a fraction equal to the sensitivity \(P(+\mid D)\) sits in the "test positive" band (true positives, green); the rest are false negatives. In the healthy column, a fraction equal to the false-positive rate \(1-\text{specificity}=P(+\mid\neg D)\) also lands in the "test positive" band (false positives, pink). Four tiles now tile the square, and each tile's area is a joint probability: area(TP) \(=P(D)\,P(+\mid D)\), area(FP) \(=P(\neg D)\,P(+\mid\neg D)\), and so on.

A positive test result is evidence, and evidence does exactly one thing here: it rules out the rows that didn't happen. Everyone in a "test negative" tile is now irrelevant, so those tiles vanish. You are left with just the two positive tiles — green and pink — whose combined area is \(P(+)\), the probability of testing positive at all. Because probabilities must sum to 1, you re-normalize: divide the surviving areas by their own total. The green share of the survivors is the posterior \(P(D\mid +)\). That single division is Bayes' theorem.

The paradox lives entirely in the widths. When the disease is rare, the green tile is dwarfed not by the test's error rate alone but by the sheer width of the healthy column: a small slip-up rate (say 1%) applied to a vast healthy population produces about as many positives as a near-perfect catch rate applied to the tiny sick population. Sensitivity barely matters here; the false-positive rate against a wide base is what caps your posterior. This is why screening rare conditions demands extraordinarily high specificity, why a second independent test (which multiplies the priors again) changes everything, and why doctors are taught to think in natural frequencies — "10 out of 1,000" — where the areas are literally countable and the intuition stops lying.