{
  "aliases": null,
  "backlinks": [
    {
      "field": "uses",
      "target": "KR80YEKVWB"
    }
  ],
  "body": "\n## Statement\n\nLet $X = (X_1, \\dots, X_n)^T$ be a random vector with the [[multivariate normal distribution|0G558GJQMW]] $\\mathcal{N}_n(0, I_n)$, that is, $X_1, \\dots, X_n$ are independent standard normal variables.\nLet $A_1, \\dots, A_k$ be real [[symmetric|0N28QN4CYA]] $n \\times n$ matrices with $A_1 + \\cdots + A_k = I_n$.\nLet $r_i$ be the [[rank|0EWQEYRVA8]] of $A_i$ and let $Q_i = X^T A_i X$ be the corresponding [[quadratic form|0RBQS1JJCR]], so that $X^T X = Q_1 + \\cdots + Q_k$.\nThen the following are equivalent.\n\n1. $r_1 + \\cdots + r_k = n$.\n2. The random variables $Q_1, \\dots, Q_k$ are [[independent|0E9502NT92]], and each $Q_i$ has the [[chi-squared distribution|0RFMMBHFTV]] with $r_i$ degrees of freedom.\n\n## Remarks\n\nThe proof of 1 implies 2 rests on a fact of linear algebra.\nIf symmetric matrices sum to $I_n$ and their ranks sum to $n$, then each $A_i$ is an [[idempotent matrix|0K7TD9BV2D]] and $A_i A_j = 0$ for $i \\ne j$.\nThen $\\R^n$ is the orthogonal direct sum of the images of the $A_i$.\nIn an orthonormal basis adapted to this sum, each $Q_i$ is a sum of $r_i$ squares of distinct coordinates of a standard normal vector.\nThis gives independence and the chi-squared laws.\nFor 2 implies 1, the sum of the independent $Q_i$ is chi-squared with $\\sum r_i$ degrees of freedom.\nBut $X^T X$ is chi-squared with $n$ degrees of freedom, so $\\sum r_i = n$.\n\nExample: with $J$ the $n \\times n$ matrix of ones, take $A_1 = \\frac{1}{n} J$ and $A_2 = I_n - \\frac{1}{n} J$, of ranks $1$ and $n - 1$.\nThen $Q_1 = n \\bar{X}^2$ and $Q_2 = \\sum_i (X_i - \\bar{X})^2$ are independent, with $\\chi^2$ laws with $1$ and $n - 1$ degrees of freedom.\nThis decomposition is the basis of the analysis of variance.\n\nWithout normality the conclusion fails: for independent variables with another distribution, the quadratic forms are in general neither chi-squared nor independent.\n\n## Explanations\n\n### L1 human\n\nThe squared length of a standard normal vector can be split into pieces along perpendicular subspaces, like Pythagoras' theorem.\nCochran's theorem says that the pieces are then independent, and each piece is chi-squared with as many degrees of freedom as the dimension of its subspace.\nThe dimensions must add up to the full dimension, and that is exactly the condition of the theorem.\n\n### L2 human\n\nIn linear models, sums of squares such as the regression sum of squares and the residual sum of squares are quadratic forms in normal errors.\nCochran's theorem shows that they are independent chi-squared variables, so their scaled ratio has an F-distribution.\nThis is why F-tests in the analysis of variance and in regression have exact null distributions.\nThe independence of the sample mean and the sample variance of a normal sample is the case of two pieces.\n",
  "commit": "ff8a40749dc16545e3d2fc637f6b0196e81d0bfa",
  "front": {
    "about": [
      "0RFMMBHFTV",
      "0RBQS1JJCR"
    ],
    "kind": "statement",
    "msc": [
      "62E15",
      "62J10"
    ],
    "name": "Cochran's theorem",
    "role": "theorem",
    "same_as": {
      "wikidata": "Q599876",
      "wikipedia": "Cochran's theorem"
    },
    "sources": [
      {
        "url": "https://en.wikipedia.org/wiki/Cochran%27s_theorem"
      }
    ],
    "tag": "HSBWJSBH0D",
    "uses": [
      "0G558GJQMW",
      "0RFMMBHFTV",
      "0RBQS1JJCR",
      "0N28QN4CYA",
      "0EWQEYRVA8",
      "0E9502NT92",
      "0K7TD9BV2D"
    ]
  },
  "kind": "statement",
  "link": "https://tamnd.github.io/math2/node/HSBWJSBH0D/",
  "links": [
    {
      "field": "about",
      "target": "0RFMMBHFTV"
    },
    {
      "field": "about",
      "target": "0RBQS1JJCR"
    },
    {
      "field": "uses",
      "target": "0G558GJQMW"
    },
    {
      "field": "uses",
      "target": "0RFMMBHFTV"
    },
    {
      "field": "uses",
      "target": "0RBQS1JJCR"
    },
    {
      "field": "uses",
      "target": "0N28QN4CYA"
    },
    {
      "field": "uses",
      "target": "0EWQEYRVA8"
    },
    {
      "field": "uses",
      "target": "0E9502NT92"
    },
    {
      "field": "uses",
      "target": "0K7TD9BV2D"
    }
  ],
  "markdown": "https://tamnd.github.io/math2/node/HSBWJSBH0D.md",
  "msc": [
    "62E15",
    "62J10"
  ],
  "name": "Cochran's theorem",
  "prov": null,
  "role": "theorem",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/HSB/HSBWJSBH0D.md",
  "status": null,
  "tag": "HSBWJSBH0D",
  "uri": "m2://HSBWJSBH0D",
  "url": "https://tamnd.github.io/math2/wiki/cochrans-theorem/",
  "writing": {
    "tag": "HSBWJSBH0D",
    "kind": "statement",
    "level": "W0",
    "next": [
      {
        "what": "a source with a locator",
        "have": 0,
        "want": 1
      }
    ]
  }
}
