{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Definition\n\nLet $P$ and $Q$ be [[probability measures|059TJN0NZ1]] on a measurable space $(\\mathcal{X}, \\mathcal{F})$.\nThe *total variation distance* between $P$ and $Q$ is\n$$\\delta(P, Q) = \\sup_{A \\in \\mathcal{F}} \\abs{P(A) - Q(A)}.$$\n\n## Remarks\n\nIt lies in $[0, 1]$, and it is a [[metric|0VKD1TP7F3]] on the probability measures on $(\\mathcal{X}, \\mathcal{F})$.\nIf $\\lambda$ is a measure with densities $p = dP/d\\lambda$ and $q = dQ/d\\lambda$, then $\\delta(P, Q) = \\frac{1}{2} \\int \\abs{p - q} \\, d\\lambda$, and the supremum is attained at $A = \\set{p \u003e q}$.\nEquivalently, $\\delta(P, Q) = \\frac{1}{2} \\norm{P - Q}$, where $\\norm{\\cdot}$ is the [[total variation|EPBND51CR5]] norm of the signed measure $P - Q$.\nSome authors call $\\norm{P - Q}$ itself the total variation distance, which differs by the factor $2$.\n\nExample: let $P$ and $Q$ be Bernoulli distributions with parameters $p$ and $q$.\nThe four events are $\\emptyset$, $\\set{0}$, $\\set{1}$ and $\\set{0, 1}$, with differences $0$, $\\abs{q - p}$, $\\abs{p - q}$ and $0$.\nSo $\\delta(P, Q) = \\abs{p - q}$.\n\nNon-example: the largest difference over single points, $\\sup_x \\abs{P(\\set{x}) - Q(\\set{x})}$, is not the total variation distance.\nFor the [[normal distributions|05AQE0QR0D]] with means $0$ and $1$ and variance $1$, every point has probability $0$, so this quantity is $0$.\nYet $\\delta(P, Q) \u003e 0$, since the two measures are different.\n",
  "commit": "ff8a40749dc16545e3d2fc637f6b0196e81d0bfa",
  "front": {
    "defines": "3SZESKX3N5",
    "kind": "definition",
    "msc": [
      "60B10",
      "62B10"
    ],
    "name": "Total variation distance between probability measures",
    "sources": [
      {
        "url": "https://en.wikipedia.org/wiki/Total_variation_distance_of_probability_measures"
      }
    ],
    "tag": "PYN08Z14ZP",
    "uses": [
      "059TJN0NZ1",
      "EPBND51CR5",
      "1NTKG64F7N",
      "0VKD1TP7F3",
      "05AQE0QR0D"
    ]
  },
  "kind": "definition",
  "link": "https://tamnd.github.io/math2/node/PYN08Z14ZP/",
  "links": [
    {
      "field": "defines",
      "target": "3SZESKX3N5"
    },
    {
      "field": "uses",
      "target": "059TJN0NZ1"
    },
    {
      "field": "uses",
      "target": "EPBND51CR5"
    },
    {
      "field": "uses",
      "target": "1NTKG64F7N"
    },
    {
      "field": "uses",
      "target": "0VKD1TP7F3"
    },
    {
      "field": "uses",
      "target": "05AQE0QR0D"
    }
  ],
  "markdown": "https://tamnd.github.io/math2/node/PYN08Z14ZP.md",
  "msc": [
    "60B10",
    "62B10"
  ],
  "name": "Total variation distance between probability measures",
  "prov": null,
  "role": "",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/PYN/PYN08Z14ZP.md",
  "status": null,
  "tag": "PYN08Z14ZP",
  "uri": "m2://PYN08Z14ZP",
  "url": "https://tamnd.github.io/math2/wiki/total-variation-distance-between-probability-measures-definition/",
  "writing": {
    "tag": "PYN08Z14ZP",
    "kind": "definition",
    "level": "W0",
    "next": [
      {
        "what": "an inventory row",
        "note": "the row of the inventory that the node accounts for",
        "have": 0,
        "want": 1
      },
      {
        "what": "a source with a locator",
        "have": 0,
        "want": 1
      }
    ]
  }
}
