{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Definition\n\nLet $p$ and $n$ be positive integers and let $\\Sigma$ be a $p \\times p$ [[positive definite matrix|0QQCG3JWJ4]].\nLet $X_1, \\dots, X_n$ be [[independent and identically distributed|0AJN7WHBJZ]] random column vectors in $\\R^p$ with the [[multivariate normal distribution|0G558GJQMW]] $\\mathcal{N}_p(0, \\Sigma)$.\nThe distribution of the random $p \\times p$ matrix\n$$S = \\sum_{i=1}^n X_i X_i^T$$\nis the *Wishart distribution* with scale matrix $\\Sigma$ and $n$ degrees of freedom, written $W_p(\\Sigma, n)$.\n\n## Remarks\n\nThe mean is $E(S) = n \\Sigma$.\nIf $n \\ge p$, then $S$ is positive definite with probability $1$.\nIts density on positive definite matrices is then\n$$f(S) = \\frac{\\det(S)^{(n - p - 1)/2} \\exp\\left(-\\tfrac{1}{2} \\tr(\\Sigma^{-1} S)\\right)}{2^{np/2} \\det(\\Sigma)^{n/2} \\, \\Gamma_p(n/2)}$$\nwhere $\\det$ is the [[determinant|0C3CFHDN6R]], $\\tr$ is the [[trace|07PTPSZPME]] and $\\Gamma_p$ is the multivariate gamma function.\n\nExample: for $p = 1$ and $\\Sigma = (\\sigma^2)$, $S = \\sum_i X_i^2 = \\sigma^2 \\sum_i (X_i/\\sigma)^2$ with $X_i/\\sigma$ standard normal, so $W_1(\\sigma^2, n)$ is $\\sigma^2$ times the [[chi-squared distribution|0RFMMBHFTV]] with $n$ degrees of freedom.\n\nExample: if $Y_1, \\dots, Y_m$ are i.i.d. $\\mathcal{N}_p(\\mu, \\Sigma)$ with $m \\ge 2$ and $\\bar{Y}$ is their mean, then $\\sum_{i=1}^m (Y_i - \\bar{Y})(Y_i - \\bar{Y})^T \\sim W_p(\\Sigma, m - 1)$.\n\nNon-example: if the $X_i$ have a common mean $\\mu \\ne 0$, then $E(S) = n\\Sigma + n\\mu\\mu^T \\ne n\\Sigma$, so $S$ is not $W_p(\\Sigma, n)$; its law is a noncentral Wishart distribution.\n",
  "commit": "ff8a40749dc16545e3d2fc637f6b0196e81d0bfa",
  "front": {
    "defines": "8BEMNJW0B9",
    "kind": "definition",
    "msc": [
      "62H10",
      "60E05"
    ],
    "name": "Wishart distribution",
    "sources": [
      {
        "url": "https://en.wikipedia.org/wiki/Wishart_distribution"
      }
    ],
    "tag": "FRNDCF91FT",
    "uses": [
      "0G558GJQMW",
      "0AJN7WHBJZ",
      "0QQCG3JWJ4",
      "0RFMMBHFTV",
      "0C3CFHDN6R",
      "07PTPSZPME"
    ]
  },
  "kind": "definition",
  "link": "https://tamnd.github.io/math2/node/FRNDCF91FT/",
  "links": [
    {
      "field": "defines",
      "target": "8BEMNJW0B9"
    },
    {
      "field": "uses",
      "target": "0G558GJQMW"
    },
    {
      "field": "uses",
      "target": "0AJN7WHBJZ"
    },
    {
      "field": "uses",
      "target": "0QQCG3JWJ4"
    },
    {
      "field": "uses",
      "target": "0RFMMBHFTV"
    },
    {
      "field": "uses",
      "target": "0C3CFHDN6R"
    },
    {
      "field": "uses",
      "target": "07PTPSZPME"
    }
  ],
  "markdown": "https://tamnd.github.io/math2/node/FRNDCF91FT.md",
  "msc": [
    "62H10",
    "60E05"
  ],
  "name": "Wishart distribution",
  "prov": null,
  "role": "",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/FRN/FRNDCF91FT.md",
  "status": null,
  "tag": "FRNDCF91FT",
  "uri": "m2://FRNDCF91FT",
  "url": "https://tamnd.github.io/math2/wiki/wishart-distribution-definition/",
  "writing": {
    "tag": "FRNDCF91FT",
    "kind": "definition",
    "level": "W0",
    "next": [
      {
        "what": "a source with a locator",
        "have": 0,
        "want": 1
      }
    ]
  }
}
