{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Definition\n\nLet $X$ be a sample whose law $P_\\theta$ depends on an unknown parameter $\\theta \\in \\Theta$. Let $\\tau \\colon \\Theta \\to \\mathbb{R}$ be a function and let $\\gamma \\in (0, 1)$.\nA confidence interval for $\\tau(\\theta)$ with confidence level $\\gamma$ is a random interval $[L(X), U(X)]$, where $L \\le U$ are [[statistics|036756NFD6]], such that\n$$P_\\theta\\big(L(X) \\le \\tau(\\theta) \\le U(X)\\big) = \\gamma \\quad \\text{for each } \\theta \\in \\Theta.$$\nIf only \"$\\ge \\gamma$\" holds for each $\\theta$, the interval is a conservative confidence interval.\n\n## Remarks\n\nExample: let $X_1, \\dots, X_n$ be i.i.d. $\\mathcal{N}(\\mu, \\sigma^2)$ with $\\sigma$ known. Then $\\bar{X}_n \\pm 1.96\\, \\sigma / \\sqrt{n}$ is a confidence interval for $\\mu$ with level approximately $0.95$.\nIf $\\sigma$ is unknown, one replaces $\\sigma$ with the sample standard deviation and $1.96$ with a quantile of Student's t-distribution with $n - 1$ degrees of freedom.\nThe probability refers to the random interval, not to $\\theta$. After one computes the interval from data, it either contains $\\tau(\\theta)$ or it does not.\nThe confidence level is often written as $1 - \\alpha$, for example $95\\%$ for $\\alpha = 0.05$.\n\n## Explanations\n\n### L1 human\n\nA $95\\%$ confidence interval comes from a procedure that captures the true value in $95\\%$ of repeated experiments.\nIt does not mean that the true value has a $95\\%$ probability to be in one particular computed interval.\n",
  "commit": "6ac761d40018146541484a9e8b9eafd6ecc303dc",
  "front": {
    "defines": "0S6T9KQNC0",
    "kind": "definition",
    "msc": [
      "62F25"
    ],
    "name": "Confidence interval",
    "sources": [
      {
        "locator": "Definition",
        "url": "https://en.wikipedia.org/wiki/Confidence_interval"
      }
    ],
    "tag": "0K4NMMJBG2",
    "uses": [
      "036756NFD6",
      "07RXBVTVZB",
      "0QNRBHWV35",
      "05RZ4YZG4E"
    ]
  },
  "kind": "definition",
  "link": "https://math2.tamnd.com/node/0K4NMMJBG2/",
  "links": [
    {
      "field": "defines",
      "target": "0S6T9KQNC0"
    },
    {
      "field": "uses",
      "target": "036756NFD6"
    },
    {
      "field": "uses",
      "target": "07RXBVTVZB"
    },
    {
      "field": "uses",
      "target": "0QNRBHWV35"
    },
    {
      "field": "uses",
      "target": "05RZ4YZG4E"
    }
  ],
  "markdown": "https://math2.tamnd.com/node/0K4NMMJBG2.md",
  "msc": [
    "62F25"
  ],
  "name": "Confidence interval",
  "prov": null,
  "role": "",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/0K4/0K4NMMJBG2.md",
  "status": null,
  "tag": "0K4NMMJBG2",
  "uri": "m2://0K4NMMJBG2",
  "url": "https://math2.tamnd.com/wiki/confidence-interval-definition/",
  "writing": {
    "tag": "0K4NMMJBG2",
    "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
      }
    ]
  }
}
