Total variation distance of probability measures



In probability theory, the total variation distance is a distance measure for probability distributions. It is an example of a statistical distance metric, and is sometimes called the statistical distance, statistical difference or variational distance.

Definition
Consider a measurable space $$(\Omega, \mathcal{F})$$ and probability measures $$P$$ and $$Q$$ defined on $$(\Omega, \mathcal{F})$$. The total variation distance between $$P$$ and $$Q$$ is defined as
 * $$\delta(P,Q)=\sup_{ A\in \mathcal{F}}\left|P(A)-Q(A)\right|.$$

This is the largest absolute difference between the probabilities that the two probability distributions assign to the same event.

Properties
The total variation distance is an f-divergence and an integral probability metric.

Relation to other distances
The total variation distance is related to the Kullback–Leibler divergence by Pinsker’s inequality:
 * $$\delta(P,Q) \le \sqrt{\frac{1}{2} D_{\mathrm{KL}}(P\parallel Q)}.$$

One also has the following inequality, due to Bretagnolle and Huber (see also ), which has the advantage of providing a non-vacuous bound even when $$\textstyle D_{\mathrm{KL}}(P\parallel Q)>2\colon$$
 * $$\delta(P,Q) \le \sqrt{1-e^{ -D_{\mathrm{KL}}(P\parallel Q) }}.$$

The total variation distance is half of the L1 distance between the probability functions: on discrete domains, this is the distance between the probability mass functions
 * $$\delta(P, Q) = \frac12 \sum_{x} |P(x) - Q(x)|,$$

and when the distributions have standard probability density functions $p$ and $q$,
 * $$\delta(P, Q) = \frac12 \int | p(x) - q(x) | \, \mathrm{d}x$$

(or the analogous distance between Radon-Nikodym derivatives with any common dominating measure). This result can be shown by noticing that the supremum in the definition is achieved exactly at the set where one distribution dominates the other.

The total variation distance is related to the Hellinger distance $$H(P,Q)$$ as follows:
 * $$H^2(P,Q) \leq \delta(P,Q) \leq \sqrt 2 H(P,Q).$$

These inequalities follow immediately from the inequalities between the 1-norm and the 2-norm.

Connection to transportation theory
The total variation distance (or half the norm) arises as the optimal transportation cost, when the cost function is $$c(x,y) = {\mathbf{1}}_{x \neq y}$$, that is,
 * $$\frac{1}{2} \| P - Q \|_1 = \delta(P,Q) = \inf\big\{ \mathbb{P}(X\neq Y ) : \text{Law}(X) = P, \text{Law}(Y) = Q\big\} = \inf_\pi \operatorname{E}_{\pi}[{\mathbf{1}}_{x\neq y}],$$

where the expectation is taken with respect to the probability measure $$\pi$$ on the space where $$(x,y)$$ lives, and the infimum is taken over all such $$\pi$$ with marginals $$P$$ and $$Q$$, respectively.