Canonical: https://knowlpedia.com/probability/total-variation-distance/

# Total variation distance

A distance between two probability distributions defined by the largest possible difference they assign to the same event.

A **total variation distance** between [probability measures](https://knowlpedia.com/probability/probability-measure/) \(P\) and \(Q\) on the same [measurable space](https://knowlpedia.com/measure-theory/measurable-space/) \((\Omega,\mathcal F)\) is
\[
d_{\mathrm{TV}}(P,Q)\;=\;\sup_{A\in\mathcal F}\,\bigl|P(A)-Q(A)\bigr|
\]
where the supremum ranges over [measurable sets](https://knowlpedia.com/measure-theory/measurable-set/) \(A\).

If \(P,Q\ll\mu\) with densities \(p=dP/d\mu\) and \(q=dQ/d\mu\), then
\[
d_{\mathrm{TV}}(P,Q)=\frac12\int_\Omega |p-q|\,d\mu.
\]

## Examples

- For [Bernoulli laws](https://knowlpedia.com/probability/bernoulli-distribution/) with parameters \(p\) and \(q\), \(d_{\mathrm{TV}}(P,Q)=|p-q|\).
- For [probability mass functions](https://knowlpedia.com/probability/probability-mass-function/) \((p_i)\) and \((q_i)\) on a finite set,
  \[
  d_{\mathrm{TV}}(P,Q)=\frac12\sum_i|p_i-q_i|.
  \]
