Three outcomes · one moving target

Entropy, variation, and the gap between them

Every point q in the triangle is a probability vector (q₁,q₂,q₃). Click or drag in any panel to move the same target p in all three.

KL(q ∣ p)

Relative entropy · natural logarithms

TV(q − p)

½ (|q₁−p₁| + |q₂−p₂| + |q₃−p₃|)

KL(q ∣ p) − 2 TV(q − p)²

The nonnegative Pinsker gap

The rust-colored dot is p. Each panel has its own labeled color scale; contours are equally spaced in the displayed quantity. Targets stay in pᵢ ≥ 0.015, so entropy is finite even on the boundary in q. A click nearer the boundary is projected onto this interior triangle; numerical inputs are projected to probabilities adding to one.

Keyboard: focus any plot. ←/→ adjusts p₁; ↓/↑ adjusts p₂, with the third coordinate compensating. Home restores the uniform target. The triangle is the two-dimensional simplex of three-component probabilities, not a tetrahedron.