{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Statement\n\nLet $n \\ge 2$, and let $X_1, \\dots, X_n$ be [[independent and identically distributed|0AJN7WHBJZ]] with the [[normal distribution|07RXBVTVZB]] $\\mathcal{N}(\\mu, \\sigma^2)$, where $\\sigma \u003e 0$.\nLet $\\bar{X} = \\frac{1}{n}\\sum_{i=1}^n X_i$ be the [[sample mean|0QNRBHWV35]] and $S^2 = \\frac{1}{n-1}\\sum_{i=1}^n (X_i - \\bar{X})^2$ the [[sample variance|0JN9P4A944]].\nThen:\n\n1. $\\bar{X}$ and $S^2$ are [[independent|0E9502NT92]];\n2. $\\bar{X} \\sim \\mathcal{N}(\\mu, \\sigma^2/n)$;\n3. $(n - 1) S^2/\\sigma^2$ has the [[chi-squared distribution|0RFMMBHFTV]] with $n - 1$ degrees of freedom.\n\n## Remarks\n\nPut $Z_i = (X_i - \\mu)/\\sigma$, which are independent standard normal.\n[[Cochran's theorem|HSBWJSBH0D]] with $A_1 = \\frac{1}{n} J$ and $A_2 = I_n - \\frac{1}{n} J$, where $J$ is the matrix of ones, shows that $n \\bar{Z}^2$ and $\\sum_i (Z_i - \\bar{Z})^2 = (n-1)S^2/\\sigma^2$ are independent, with $\\chi^2$ laws with $1$ and $n - 1$ degrees of freedom.\nIndependence of $\\bar{X}$ itself follows because $\\bar{Z}$ is a function of the projection $A_1 Z$, which is independent of $A_2 Z$.\nAnother proof uses an orthogonal matrix whose first row is $(1, \\dots, 1)/\\sqrt{n}$.\n\nAt work: the statistic $T = \\sqrt{n}(\\bar{X} - \\mu)/S$ is a standard normal variable divided by $\\sqrt{V/(n-1)}$, with $V \\sim \\chi^2_{n-1}$ independent of it.\nSo $T$ has the [[Student t-distribution|0NQ5798SB1]] with $n - 1$ degrees of freedom.\nThis gives the one-sample $t$-test and the $t$ confidence interval for $\\mu$.\n\nThe normality hypothesis is necessary: for i.i.d. samples from a nondegenerate distribution with finite variance and $n \\ge 2$, independence of $\\bar{X}$ and $S^2$ holds only if the distribution is normal.\nFor example, for Bernoulli variables, $\\bar{X} = 0$ forces $S^2 = 0$, while $S^2 \u003e 0$ is possible when $0 \u003c \\bar{X} \u003c 1$.\n\n## Explanations\n\n### L1 human\n\nFor normal data, knowing the average of the sample tells you nothing about how spread out the sample is.\nThis is special to the normal distribution.\nIt is the reason why the $t$ statistic has a simple exact distribution.\n\n### L2 human\n\nThe result is the case of two pieces of Cochran's theorem.\nIt underlies the exact $t$-test, the $\\chi^2$ confidence interval for $\\sigma^2$, and through them much of classical small-sample inference.\nThe analogous result for multivariate normal samples says that the sample mean vector and the sample covariance matrix are independent, the latter with a Wishart distribution.\n",
  "commit": "ff8a40749dc16545e3d2fc637f6b0196e81d0bfa",
  "front": {
    "about": [
      "0QNRBHWV35",
      "0JN9P4A944"
    ],
    "kind": "statement",
    "msc": [
      "62E15"
    ],
    "name": "Independence of sample mean and sample variance for normal samples",
    "role": "theorem",
    "sources": [
      {
        "url": "https://en.wikipedia.org/wiki/Cochran%27s_theorem"
      }
    ],
    "tag": "KR80YEKVWB",
    "uses": [
      "HSBWJSBH0D",
      "0QNRBHWV35",
      "0JN9P4A944",
      "07RXBVTVZB",
      "0AJN7WHBJZ",
      "0RFMMBHFTV",
      "0E9502NT92",
      "0NQ5798SB1"
    ]
  },
  "kind": "statement",
  "link": "https://tamnd.github.io/math2/node/KR80YEKVWB/",
  "links": [
    {
      "field": "about",
      "target": "0QNRBHWV35"
    },
    {
      "field": "about",
      "target": "0JN9P4A944"
    },
    {
      "field": "uses",
      "target": "HSBWJSBH0D"
    },
    {
      "field": "uses",
      "target": "0QNRBHWV35"
    },
    {
      "field": "uses",
      "target": "0JN9P4A944"
    },
    {
      "field": "uses",
      "target": "07RXBVTVZB"
    },
    {
      "field": "uses",
      "target": "0AJN7WHBJZ"
    },
    {
      "field": "uses",
      "target": "0RFMMBHFTV"
    },
    {
      "field": "uses",
      "target": "0E9502NT92"
    },
    {
      "field": "uses",
      "target": "0NQ5798SB1"
    }
  ],
  "markdown": "https://tamnd.github.io/math2/node/KR80YEKVWB.md",
  "msc": [
    "62E15"
  ],
  "name": "Independence of sample mean and sample variance for normal samples",
  "prov": null,
  "role": "theorem",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/KR8/KR80YEKVWB.md",
  "status": null,
  "tag": "KR80YEKVWB",
  "uri": "m2://KR80YEKVWB",
  "url": "https://tamnd.github.io/math2/wiki/independence-of-sample-mean-and-sample-variance-for-normal-samples/",
  "writing": {
    "tag": "KR80YEKVWB",
    "kind": "statement",
    "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
      }
    ]
  }
}
