ID-5-02 (TO) · Mathematical Foundations of Diffusion Models · Foundations demo
A joint distribution is a mountain of probability mass. Marginals are its shadows; conditionals are its slices, re-inflated; and Bayes’ rule is the licence to slice in either direction.
The heatmap is a joint p(x, y). The curves on the edges are its two marginals — the shadows. Drag the ρ slider: the mountain twists, but the shadows do not move — many mountains cast the same shadows (this is the coupling-underdeterminacy of the transport tutorials). Drag the slice lines: each panel shows the raw slice (a sliver of mass) and the same slice renormalised to unit area — the conditional distribution.
Twisting one ellipse is the mild version of the point. Click through “two blobs ↗”, “two blobs ↘” and “four blobs” for the strong one. Each puts round lumps at the corners (±1.25, ±1.25); each therefore puts mass ½ at x = −1.25 and ½ at x = +1.25, and the same in y — so all three have exactly the same pair of shadows. Watch the edge curves as you switch: they do not move at all. But the mountains could hardly differ more, and their correlations are +0.86, −0.86 and zero: the four-blob one is genuinely independent, the other two strongly dependent. Nothing computable from the marginals tells them apart — and note that the correlation is not computable from the marginals either. It is joint information the shadows discarded.
slice at x = 0.5 — raw sliver vs conditional p(y | x)
slice at y = 0.5 — raw sliver vs conditional p(x | y)
Keyboard: focus a panel, then use ←→ to move the vertical slice and ↑↓ the horizontal one (hold Shift for larger steps).
When one variable is discrete (the latent coin z) and one continuous (the observation x), the joint is not a mountain: it is two shelves of 1-D mass, one per value of z, weighted π and 1−π. Drag the slice line: it crosses both shelves, the two heights are renormalised into the posterior P(z | x) — and the posterior mean of the shelf labels ±1 is the tanh denoiser of W01, tanh(x/σ²), when π = ½. Away from equal weights the prior tilts the posterior and the denoiser picks up a shift, to tanh(x/σ² + ½ log((1−π)/π)).
One object, three readings. The joint is the complete description; marginals are its lossy shadows (many joints per shadow-pair); conditionals are its slices made into distributions. Bayes’ rule adds nothing new — it states that the two ways of slicing the same object must agree.