A positive test on a 99% accurate scan. Are you sick? Probably not.
Two circles, two events. Drag them apart, drag them through each other, and watch every conditional probability flicker live. Then flip to the medical-test mode, set a one-in-a-hundred disease, and stare at the grid: most of the positives are healthy. Bayes' theorem is not abstract — it's the only correct way to read a rare result on a good test.
What you are looking at
§ 10 · Readingarea is the chance.P(A | B).P(+ | D) as if it were P(D | +) — is called the base-rate fallacy. Doctors get it wrong. Juries get it wrong. Everyone gets it wrong, until they've seen the grid.How the simulation behaves
§ 10 · Method
In Venn mode, the canvas is the universe — U. The area of the
rectangle is the denominator of every probability shown. Circle areas are
π r², intersection area is the closed-form circular lens
formula: two circular segments glued along the chord. No Monte Carlo;
every number is exact for the geometry you see.
In medical mode, prevalence, sensitivity, and specificity define a 2×2 confusion table over exactly 100 people. Counts are rounded to whole people — the grid is meant to be countable, and the displayed probability comes straight from the counts you can see. Slide prevalence below 1% and the grid will show zero diseased people: that's the point. Many real diseases are rarer than the resolution of a 100-person grid, and that is exactly why an isolated positive test is so weak.
Show the math
The product rule, in two halves:
P(A ∩ B) = P(A | B) · P(B) = P(B | A) · P(A)Set the two halves equal and divide. Out falls Bayes' theorem:
P(A | B) = P(B | A) · P(A) / P(B)For a diagnostic test, with D = "you have the disease" and + = "the test is positive":
P(D | +) = P(+ | D) · P(D) / P(+)The denominator P(+) is just the total share of positives — true positives plus false positives — and that is the key. A "99% accurate" test on a 1% disease has equal mass on each side of the slash. The fraction lands near 50%, not 99%.
P(D | +) = ( sens · prev ) / ( sens · prev + (1 − spec)(1 − prev) )