{
  "aliases": null,
  "backlinks": [
    {
      "field": "uses",
      "target": "0EN0V3NY20"
    },
    {
      "field": "uses",
      "target": "0NQ5798SB1"
    }
  ],
  "body": "\n## Definition\n\nLet $k \\ge 1$ be an integer and let $Z_1, \\dots, Z_k$ be [[i.i.d.|0AJN7WHBJZ]] standard normal random variables.\nThe chi-squared distribution with $k$ degrees of freedom, written $\\chi^2_k$, is the law of\n$$Q = Z_1^2 + Z_2^2 + \\dots + Z_k^2.$$\n\n## Remarks\n\nIt has the [[density|04YG690N5V]] $f(x) = \\frac{x^{k/2 - 1} e^{-x/2}}{2^{k/2}\\, \\Gamma(k/2)}$ for $x \u003e 0$, and $f(x) = 0$ for $x \\le 0$. So $\\chi^2_k$ is the [[gamma distribution|06395GBNWD]] with shape $k/2$ and rate $1/2$.\nIf $Q \\sim \\chi^2_k$, then $E[Q] = k$ and $\\operatorname{Var}(Q) = 2k$.\nIf $Q_1 \\sim \\chi^2_{k_1}$ and $Q_2 \\sim \\chi^2_{k_2}$ are independent, then $Q_1 + Q_2 \\sim \\chi^2_{k_1 + k_2}$.\nFor an i.i.d. $\\mathcal{N}(\\mu, \\sigma^2)$ sample of size $n$ with [[sample variance|0JN9P4A944]] $S_n^2$, $(n - 1) S_n^2 / \\sigma^2 \\sim \\chi^2_{n - 1}$.\n\n## Explanations\n\n### L1 human\n\nSquare $k$ independent standard normal numbers and add them: the result has the chi-squared distribution with $k$ degrees of freedom.\nIts mean is $k$, and it has values in $[0, \\infty)$ only.\n",
  "commit": "545acf83a9b75c8ddc375ef8b23d2ae101a4d7e4",
  "front": {
    "defines": "0A9EB0KQBC",
    "kind": "definition",
    "msc": [
      "60E05",
      "62E15"
    ],
    "name": "Chi-squared distribution",
    "sources": [
      {
        "locator": "Definitions",
        "url": "https://en.wikipedia.org/wiki/Chi-squared_distribution"
      },
      {
        "locator": "Probability density function",
        "url": "https://en.wikipedia.org/wiki/Chi-squared_distribution"
      }
    ],
    "tag": "0RFMMBHFTV",
    "uses": [
      "07RXBVTVZB",
      "0AJN7WHBJZ",
      "04YG690N5V",
      "06395GBNWD",
      "0JN9P4A944"
    ]
  },
  "kind": "definition",
  "link": "https://math2.tamnd.com/node/0RFMMBHFTV/",
  "links": [
    {
      "field": "defines",
      "target": "0A9EB0KQBC"
    },
    {
      "field": "uses",
      "target": "07RXBVTVZB"
    },
    {
      "field": "uses",
      "target": "0AJN7WHBJZ"
    },
    {
      "field": "uses",
      "target": "04YG690N5V"
    },
    {
      "field": "uses",
      "target": "06395GBNWD"
    },
    {
      "field": "uses",
      "target": "0JN9P4A944"
    }
  ],
  "markdown": "https://math2.tamnd.com/node/0RFMMBHFTV.md",
  "msc": [
    "60E05",
    "62E15"
  ],
  "name": "Chi-squared distribution",
  "prov": null,
  "role": "",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/0RF/0RFMMBHFTV.md",
  "status": null,
  "tag": "0RFMMBHFTV",
  "uri": "m2://0RFMMBHFTV",
  "url": "https://math2.tamnd.com/wiki/chi-squared-distribution-definition/",
  "writing": {
    "tag": "0RFMMBHFTV",
    "kind": "definition",
    "level": "W1",
    "next": [
      {
        "what": "edge instance_of in",
        "note": "one example",
        "have": 0,
        "want": 1
      },
      {
        "what": "edge not_instance_of in",
        "note": "one non-example that fails one clause",
        "have": 0,
        "want": 1
      }
    ]
  }
}
