Explore modules

Total Variation Distance

Visualize the maximum difference between probabilities assigned to the same event by two distributions, and construct their maximal coupling.

Free theory article

Visualize the maximum difference between probabilities assigned to the same event by two distributions, and construct their maximal coupling.

Concept & interpretation

The total variation distance (TV) measures the maximum difference between the probabilities assigned to any single event by two probability distributions. It is central to probability theory and understanding the convergence of random variables, notably appearing in the study of Markov chain mixing times.

Reproduce the calculation in the module

Open the Total Variation Distance experiment to explore how TV and maximal couplings change as distributions are mixed.

  1. Set Distribution pair to Default and Mix t to 1.0. You'll see the base vectors P = (0.5, 0.3, 0.2) and Qmixed = Q = (0.2, 0.5, 0.3). Observe the TV is 0.300000, and the witness event is {0}.
  2. Adjust Mix t to 0.5. The distribution Qmixed interpolates halfway toward P, becoming (0.35, 0.40, 0.25). The TV distance halves to 0.150000, illustrating the linearity of TV distance under convex combinations.
  3. Change the Distribution pair to Disjoint and set Mix t to 1.0. Notice that P and Qmixed share no overlapping mass. The TV distance becomes its maximum possible value of 1.000000, and the maximal coupling joint has all zero mass on the diagonal.
  4. Change the Distribution pair to Identical. The TV distance drops to exactly 0.000000, and the positive witness event becomes the empty set ∅.
Read the full free theory article