{
  "aliases": [
    "variance-decomposition-formula",
    "eve-law"
  ],
  "backlinks": null,
  "body": "\n## Statement\n\nLet $X$ be a real random variable with $E[X^2] \u003c \\infty$, and let $Y$ be a random variable on the same probability space. Then\n$$\\operatorname{Var}(X) = E\\left[\\operatorname{Var}(X \\mid Y)\\right] + \\operatorname{Var}\\left(E[X \\mid Y]\\right).$$\n\n## Remarks\n\nProof: by the [[variance formula|0NMF95YK8W]] in its conditional form, $E[X^2 \\mid Y] = \\operatorname{Var}(X \\mid Y) + (E[X \\mid Y])^2$. Take expectations with the [[law of total expectation|04RRB6HM00]], and subtract $(E[X])^2 = (E[E[X \\mid Y]])^2$.\nThe same result holds with a σ-algebra $\\mathcal{G}$ in place of $Y$.\nThe first term is the mean variance inside the groups. The second term is the variance between the group means.\nA corollary: $\\operatorname{Var}(E[X \\mid Y]) \\le \\operatorname{Var}(X)$.\n\n## Explanations\n\n### L1 human\n\nThe total spread of $X$ has two parts: the spread inside each group, and the spread of the group averages.\nThis decomposition is the base of the analysis of variance in statistics.\n",
  "commit": "6ac761d40018146541484a9e8b9eafd6ecc303dc",
  "front": {
    "aliases": [
      "variance-decomposition-formula",
      "eve-law"
    ],
    "kind": "statement",
    "msc": [
      "60A10"
    ],
    "name": "Law of total variance",
    "role": "theorem",
    "same_as": {
      "wikidata": "Q1055879",
      "wikipedia": "Law of total variance"
    },
    "sources": [
      {
        "locator": "General case",
        "url": "https://en.wikipedia.org/wiki/Law_of_total_variance"
      }
    ],
    "tag": "03BY5XTNA4",
    "uses": [
      "0F1SN93KXE",
      "0YAMJRK04E",
      "04RRB6HM00",
      "0NMF95YK8W"
    ]
  },
  "kind": "statement",
  "link": "https://math2.tamnd.com/node/03BY5XTNA4/",
  "links": [
    {
      "field": "uses",
      "target": "0F1SN93KXE"
    },
    {
      "field": "uses",
      "target": "0YAMJRK04E"
    },
    {
      "field": "uses",
      "target": "04RRB6HM00"
    },
    {
      "field": "uses",
      "target": "0NMF95YK8W"
    }
  ],
  "markdown": "https://math2.tamnd.com/node/03BY5XTNA4.md",
  "msc": [
    "60A10"
  ],
  "name": "Law of total variance",
  "prov": null,
  "role": "theorem",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/03B/03BY5XTNA4.md",
  "status": null,
  "tag": "03BY5XTNA4",
  "uri": "m2://03BY5XTNA4",
  "url": "https://math2.tamnd.com/wiki/law-of-total-variance/",
  "writing": {
    "tag": "03BY5XTNA4",
    "kind": "statement",
    "level": "W0",
    "next": [
      {
        "what": "an inventory row",
        "note": "the row of the inventory that the node accounts for",
        "have": 0,
        "want": 1
      }
    ]
  }
}
