{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Definition\n\nLet $P$ and $Q$ be [[probability measures|059TJN0NZ1]] on a measurable space $(\\mathcal{X}, \\mathcal{F})$.\nLet $\\lambda$ be a [[σ-finite measure|WEBBT18D4X]] such that $P$ and $Q$ are absolutely continuous with respect to $\\lambda$, for example $\\lambda = P + Q$.\nLet $p = dP/d\\lambda$ and $q = dQ/d\\lambda$ be the [[Radon–Nikodym derivatives|1NTKG64F7N]].\nThe *Hellinger distance* between $P$ and $Q$ is the number $H(P, Q) \\ge 0$ given by\n$$H^2(P, Q) = \\frac{1}{2} \\int_{\\mathcal{X}} \\big( \\sqrt{p} - \\sqrt{q} \\big)^2 \\, d\\lambda.$$\n\n## Remarks\n\nThe value does not depend on the choice of $\\lambda$.\nExpanding the square gives $H^2(P, Q) = 1 - \\int \\sqrt{p q} \\, d\\lambda$, so $0 \\le H \\le 1$.\nThe map $H$ is a [[metric|0VKD1TP7F3]] on the set of probability measures on $(\\mathcal{X}, \\mathcal{F})$.\nSome authors omit the factor $\\frac{1}{2}$, which multiplies $H$ by $\\sqrt{2}$.\nWith the convention above, the [[total variation distance|3SZESKX3N5]] $\\delta$ satisfies $H^2(P, Q) \\le \\delta(P, Q) \\le \\sqrt{2} \\, H(P, Q)$.\n\nExample: on $\\set{0, 1}$ with counting measure, let $P$ give mass $\\frac{1}{2}$ to each point and let $Q$ be the point mass at $1$.\nThen $\\int \\sqrt{pq} = \\sqrt{0 \\cdot \\tfrac{1}{2}} + \\sqrt{1 \\cdot \\tfrac{1}{2}} = 1/\\sqrt{2}$, so $H^2(P, Q) = 1 - 1/\\sqrt{2}$.\n\nNon-example: the quantity $\\frac{1}{2} \\int (p - q)^2 \\, d\\lambda$, without square roots, is not the Hellinger distance.\nIt changes with $\\lambda$: replacing $\\lambda$ by $2\\lambda$ halves $p$ and $q$ and divides the quantity by $2$.\n",
  "commit": "ff8a40749dc16545e3d2fc637f6b0196e81d0bfa",
  "front": {
    "defines": "SM0R5T87TH",
    "kind": "definition",
    "msc": [
      "62B10",
      "60B10"
    ],
    "name": "Hellinger distance",
    "sources": [
      {
        "url": "https://en.wikipedia.org/wiki/Hellinger_distance"
      }
    ],
    "tag": "YB7GN4EAF7",
    "uses": [
      "059TJN0NZ1",
      "WEBBT18D4X",
      "1NTKG64F7N",
      "0VKD1TP7F3",
      "3SZESKX3N5"
    ]
  },
  "kind": "definition",
  "link": "https://tamnd.github.io/math2/node/YB7GN4EAF7/",
  "links": [
    {
      "field": "defines",
      "target": "SM0R5T87TH"
    },
    {
      "field": "uses",
      "target": "059TJN0NZ1"
    },
    {
      "field": "uses",
      "target": "WEBBT18D4X"
    },
    {
      "field": "uses",
      "target": "1NTKG64F7N"
    },
    {
      "field": "uses",
      "target": "0VKD1TP7F3"
    },
    {
      "field": "uses",
      "target": "3SZESKX3N5"
    }
  ],
  "markdown": "https://tamnd.github.io/math2/node/YB7GN4EAF7.md",
  "msc": [
    "62B10",
    "60B10"
  ],
  "name": "Hellinger distance",
  "prov": null,
  "role": "",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/YB7/YB7GN4EAF7.md",
  "status": null,
  "tag": "YB7GN4EAF7",
  "uri": "m2://YB7GN4EAF7",
  "url": "https://tamnd.github.io/math2/wiki/hellinger-distance-definition/",
  "writing": {
    "tag": "YB7GN4EAF7",
    "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
      }
    ]
  }
}
