Explore modules

Maximal Coupling Total Variation

Construct a joint law that makes two random variables agree as often as their marginals allow.

Free theory article

Construct a joint law that makes two random variables agree as often as their marginals allow.

Concept & interpretation

A coupling of two probability distributions P and Q is a joint distribution over pairs of outcomes such that the marginal distributions match P and Q respectively. A maximal coupling is a specific coupling that maximizes the probability that the two outcomes are identical, which corresponds to the sum of the diagonal elements in the joint probability matrix.

Reproduce the calculation in the module

Open the Maximal Coupling Total Variation experiment to explore how the joint probability matrix is constructed for different distributions.

  1. Set First law to P and Second law to Q. Set First state to 0 and Second state to 1.
  2. Observe that the selected joint probability P(0, 1) is exactly 0.200000, matching our calculation.
  3. The maximum agreement probability is 0.700000, which corresponds to the sum of the diagonal elements of the joint matrix.
  4. Change First state to 1 and leave Second state as 1. The selected joint probability becomes 0.300000, which is the minimum of P(1)=0.3 and Q(1)=0.5, because the diagonal element takes the full overlapping mass.
  5. Change Second law to Point zero, meaning Q is deterministic at state 0: Q = (1.0, 0.0, 0.0). Keep First law as P, and set states to 0 and 1. The maximum agreement is now 0.500000, because P and Q only overlap at state 0 with probability 0.5.
  6. Change Second law to P to couple identical laws. The maximum agreement becomes exactly 1.000000, and the total variation distance is 0.000000. All probability mass is on the diagonal, meaning the two random variables will always be equal with probability 1.
Read the full free theory article