BAYES turns the classic false-positive puzzle into a living proportional-area diagram. A population square splits by how rare a condition is; a test with known sensitivity and specificity partitions it into true and false results. Drag the base rate and the areas re-flow — exposing that a 99%-accurate screen, run on something rare, produces mostly false alarms.
01 The concept
One fictional teaching instrument, one job: make Bayes' theorem felt rather than derived.
The audience is anyone who has ever been handed a frightening positive result — patients, students, the numerate-but-uneasy. The single job of the page is to show that the meaning of a positive test depends less on the test's accuracy than on the base rate: how common the thing being tested for actually is. The counter-intuition — most positives are false — is placed on screen at rest, at a rare 0.30% base rate, so the shock lands before you touch anything.
02 Palette
A neutral paper ground — this is a document, a ledger of people, not a screen effect. Two arguable accents: evidence blue for what is true, alarm red for what is false. The line/mark colours stay saturated for strokes and area fills; body copy runs in a dark slate ink that clears 4.5:1 on paper.
03 Type
Newsreader is the voice — an optical-size serif with the composure of a broadsheet and a genuinely expressive italic, used for the headline and the big posterior figure. IBM Plex Mono carries every number, label and axis: the ledger register that makes the counts feel measured, not decorative.
04 Technique & the signature
No libraries, no canvas, no raster — the whole instrument is inline SVG driven by a small state machine. The population square is four <rect>s whose x / width / y / height are recomputed every frame from three numbers: base rate p, sensitivity Se, specificity Sp.
05 Iteration log
Pass 1 Craft
- Found the hero headline styling targeted h1 descendants, but the visible headline is a decorative
div(the real h1 is visually-hidden for a11y). Result: the "Bayes" kicker collapsed inline into the sentence and the italic "ninety-nine" lost its blue. Retargeted to a.herotitleclass — kicker now sits above, italic reads evidence-blue. - Control labels were inline spans, so on narrow widths the label name and its value ran together on one line. Set name and value to block — clean two-line stack at every width.
- Tuned the false-positive sub-line and legend counts to update from the same rounded integers as the diagram, so the copy and the areas can never disagree.
Pass 2 Depth
- Added a legend ↔ region micro-interaction: hovering a legend row dims the square and lifts its matching region, so you can pick out the hairline true-positive sliver by name.
- Slowed the opening sweep (a gentler lerp constant while the intro runs) so the red false-positive band visibly floods as rarity increases, then eases to rest — the concept, demonstrated, before you touch it.
- Added the live Bayes derivation beneath the verdict — the same numerator and denominator, recomputed every frame — so the area and the algebra are visibly one thing.
Pass 3 Hardening
- Verified the 375px layout: figure stacks, the base-rate control spans full width, nav and wordmark sit inside the viewport (no overflow, clean scrollWidth).
- Confirmed the reduced-motion path renders the static 0.30% resting frame with zero console errors — no blank, no waiting.
- Chanel rule — removed an ornament: the population grid was a busy 20×20 (400 cells) reading as graph paper. Cut to a fainter 10×10 so the crisp area partition leads and the texture only whispers.
- Final copy read; checked focus rings on all three sliders and the replay control; headless-drove the base-rate slider and asserted the areas, bar and posterior all re-flow.