{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Proof\n\nWe substitute $x = \\mu + \\sigma z$ and integrate by parts.\n\n1. Let $\\mu \\in \\R$, $\\sigma^2 \u003e 0$, and $\\sigma = \\sqrt{\\sigma^2} \u003e 0$. Let $X$ have the [[normal distribution|07RXBVTVZB]] $\\mathcal{N}(\\mu, \\sigma^2)$.\n2. Let $f = \\varphi_{\\mu, \\sigma^2}$ and $\\varphi = \\varphi_{0,1}$ be the [[normal densities|027JF1FBB0]]. By definition, $f$ is a [[probability density function|04YG690N5V]] of $X$.\n3. By the [[mean of the normal distribution|09PR1V6RWR]], $X$ is integrable with $E[X] = \\mu$. So by definition the [[variance|007QED3E0Y]] is $\\operatorname{Var}(X) = E[(X - \\mu)^2]$.\n4. By the [[law of the unconscious statistician|01ZWX875AT]], if $\\int_\\R (x - \\mu)^2 f(x) \\, dx \u003c \\infty$, then $E[(X - \\mu)^2]$ equals this integral.\n5. The integrand in step 4 is continuous and nonnegative. So the integral is the limit of $\\int_{\\mu - \\sigma R}^{\\mu + \\sigma R} (x - \\mu)^2 f(x) \\, dx$ as $R \\to \\infty$, an [[improper integral|0VCTBJMEJF]].\n6. For all real $z$, $\\sigma f(\\mu + \\sigma z) = \\varphi(z)$. [[Substitution|0D37QFPEZE]] with $x = \\mu + \\sigma z$ gives\n$$\\int_{\\mu - \\sigma R}^{\\mu + \\sigma R} (x - \\mu)^2 f(x) \\, dx = \\sigma^2 \\int_{-R}^{R} z^2 \\varphi(z) \\, dz.$$\n7. By the [[chain rule|0RXX2PT1MQ]] and [[the derivative of the exponential function|0EX9GFJ0B3]], $\\varphi'(z) = -z \\varphi(z)$.\n8. [[Integration by parts|08Y1BBQTK9]] with $u(z) = z$ and $v(z) = -\\varphi(z)$, so that $v'(z) = z \\varphi(z)$, gives\n$$\\int_{-R}^{R} z^2 \\varphi(z) \\, dz = \\big[-z \\varphi(z)\\big]_{-R}^{R} + \\int_{-R}^{R} \\varphi(z) \\, dz = -2R\\varphi(R) + \\int_{-R}^{R} \\varphi(z) \\, dz.$$\n9. By the [[power series of the exponential function|06JZGMYTYD]], $e^{y} \\ge y$ for $y \\ge 0$. With $y = R^2/2$, this gives $R \\varphi(R) \\le 2/(R\\sqrt{2\\pi})$ for $R \u003e 0$.\n10. So $R \\varphi(R) \\to 0$ as $R \\to \\infty$.\n11. Since $\\varphi$ is the density of $\\mathcal{N}(0, 1)$, $\\int_{-R}^{R} \\varphi(z) \\, dz \\to 1$ as $R \\to \\infty$.\n12. By steps 8, 10 and 11, $\\int_{-R}^{R} z^2 \\varphi(z) \\, dz \\to 1$.\n13. By steps 5, 6 and 12, the integral in step 4 is finite and equals $\\sigma^2 \\cdot 1$.\n14. By steps 3 and 4, $\\operatorname{Var}(X) = \\sigma^2$.\n\n## Idea\n\nAfter the substitution $x = \\mu + \\sigma z$, the variance is $\\sigma^2$ times $\\int z^2 \\varphi(z) \\, dz$. Since $\\varphi' = -z\\varphi$, integration by parts turns this integral into $\\int \\varphi = 1$.\n",
  "commit": "4a3290d299c8b2cd6493fce2296920ba7f82d942",
  "front": {
    "kind": "proof",
    "msc": [
      "60E05"
    ],
    "name": "Proof of the formula for the variance of the normal distribution",
    "proves": "03EESZDB9A",
    "sources": [
      {
        "locator": "Moments",
        "url": "https://en.wikipedia.org/wiki/Normal_distribution"
      }
    ],
    "tag": "DXNJGD4BJ6",
    "uses": [
      "07RXBVTVZB",
      "027JF1FBB0",
      "04YG690N5V",
      "007QED3E0Y",
      "09PR1V6RWR",
      "01ZWX875AT",
      "0D37QFPEZE",
      "08Y1BBQTK9",
      "0RXX2PT1MQ",
      "0EX9GFJ0B3",
      "06JZGMYTYD",
      "0VCTBJMEJF"
    ]
  },
  "kind": "proof",
  "link": "https://math2.tamnd.com/node/DXNJGD4BJ6/",
  "links": [
    {
      "field": "proves",
      "target": "03EESZDB9A"
    },
    {
      "field": "uses",
      "target": "07RXBVTVZB"
    },
    {
      "field": "uses",
      "target": "027JF1FBB0"
    },
    {
      "field": "uses",
      "target": "04YG690N5V"
    },
    {
      "field": "uses",
      "target": "007QED3E0Y"
    },
    {
      "field": "uses",
      "target": "09PR1V6RWR"
    },
    {
      "field": "uses",
      "target": "01ZWX875AT"
    },
    {
      "field": "uses",
      "target": "0D37QFPEZE"
    },
    {
      "field": "uses",
      "target": "08Y1BBQTK9"
    },
    {
      "field": "uses",
      "target": "0RXX2PT1MQ"
    },
    {
      "field": "uses",
      "target": "0EX9GFJ0B3"
    },
    {
      "field": "uses",
      "target": "06JZGMYTYD"
    },
    {
      "field": "uses",
      "target": "0VCTBJMEJF"
    }
  ],
  "markdown": "https://math2.tamnd.com/node/DXNJGD4BJ6.md",
  "msc": [
    "60E05"
  ],
  "name": "Proof of the formula for the variance of the normal distribution",
  "prov": null,
  "role": "",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/DXN/DXNJGD4BJ6.md",
  "status": null,
  "tag": "DXNJGD4BJ6",
  "uri": "m2://DXNJGD4BJ6",
  "url": "https://math2.tamnd.com/wiki/proof-of-the-formula-for-the-variance-of-the-normal-distribution/",
  "writing": {
    "tag": "DXNJGD4BJ6",
    "kind": "proof",
    "level": "W0",
    "next": [
      {
        "what": "an inventory row",
        "note": "the row of the inventory that the node accounts for",
        "have": 0,
        "want": 1
      }
    ]
  }
}
