Bayes' theorem: restrict, then renormalize
The whole probability space is a strip of width 1. Events A and B are intervals — lengths are probabilities, and the overlap length is P(A∩B). Resize them by their edges; slide B to change only the overlap. Conditioning on B means throwing away everything outside B and stretching what's left back to full width — the two lower strips do exactly that, live. Bayes' theorem is just the fact that both strips crop the same shared overlap.
P(A|B) = P(B|A) · P(A)P(B) because P(A|B)·P(B) = P(A∩B) = P(B|A)·P(A)Bayes, live
Controls
Why this picture is the theorem
1 · Conditioning = restrict, then renormalize
P(A|B) asks: among the outcomes where B happened, what fraction also has A? That's a two-step move — restrict Ω to B, then rescale so B's probability counts as 1. In the strip picture the rescaling is literally a stretch: B's interval is blown up to full width, and lengths get divided by P(B). That division is where the denominator in Bayes' theorem comes from:
2 · One overlap, two croppings
The same definition applied the other way gives P(B|A) = P(A∩B)/P(A). Multiply each definition out and both equal the same overlap:
Divide by P(B) and you have Bayes' theorem. That's the whole proof — the two lower strips on this page are the left and right sides of that identity, drawn as geometry. Nothing about it is deep; what's deep is what it lets you do: convert a conditional you know, P(B|A), into the one you want, P(A|B).
3 · Why the answer surprises people: base rates
Load the rare disease scenario. The test is genuinely good — it catches 95% of cases and false-alarms only 5% of the time. But the disease band has width 0.01, so the healthy 99% contributes far more false positives than the sick 1% contributes true ones: P(disease | test+) ≈ 0.16. In the strip you can see the reason — most of the teal test-positive band lies outside the skinny blue disease band. Turn on "100 people" and it reads: of 6 who test positive, 1 is sick.
4 · Independence is a knife-edge
Slide B and watch the dashed marker inside the overlap: it sits where the overlap would end if A and B were independent, P(A∩B) = P(A)·P(B). On that knife-edge, learning B changes nothing — posterior = prior, lift 1×. Everywhere else, B is evidence: overlap wider than the marker means B raises A's probability; narrower means it lowers it. Note also what the geometry forces: if P(A)+P(B) > 1 the bands cannot avoid overlapping — some dependence is unavoidable in a small world.
5 · Where this shows up in ML
Everywhere. A naive Bayes classifier is this page multiplied: one lift factor per feature, all applied to the prior odds (the odds line above is one such factor — odds × likelihood ratio). Posterior inference over parameters is the same move with A = "parameters" and B = "data": P(θ|D) ∝ P(D|θ)·P(θ). And generative classifiers literally compute P(class | features) by Bayes from class-conditional models. The restrict-and-renormalize picture is the one to keep.