{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Definition\n\nLet $\\set{f(\\cdot; \\theta) : \\theta \\in \\Theta}$ be a family of probability densities with respect to a measure $\\nu$, with $\\Theta$ an open subset of $\\R^k$.\nLet $x$ be a point with $f(x; \\theta) \u003e 0$ near a parameter $\\theta$, and assume that $\\theta \\mapsto \\log f(x; \\theta)$ is differentiable at $\\theta$.\nThe *score* of $\\theta$ at $x$ is the [[gradient|0NS2QYVC4Y]] of the log-[[likelihood|05FSTXM92W]]:\n$$s(\\theta; x) = \\nabla_\\theta \\log f(x; \\theta) = \\left(\\frac{\\partial \\log f(x; \\theta)}{\\partial \\theta_1}, \\dots, \\frac{\\partial \\log f(x; \\theta)}{\\partial \\theta_k}\\right)^T.$$\nFor i.i.d. data $x_1, \\dots, x_n$, the score of the sample is $\\sum_{i=1}^n s(\\theta; x_i)$.\n\n## Remarks\n\nIf differentiation under the integral sign is allowed in $\\int f(x; \\theta)\\, d\\nu(x) = 1$, then $E_\\theta[s(\\theta; X)] = 0$, where $E_\\theta$ is the [[expectation|0DCT0QZVQ1]] when $X$ has density $f(\\cdot; \\theta)$.\nIts covariance matrix $E_\\theta[s(\\theta; X) s(\\theta; X)^T]$ is then the Fisher information.\n\nExample: for $f(x; \\mu) = (2\\pi)^{-1/2} e^{-(x - \\mu)^2/2}$, $\\log f(x; \\mu) = -\\frac{1}{2}\\log(2\\pi) - \\frac{1}{2}(x - \\mu)^2$, so $s(\\mu; x) = x - \\mu$, which has mean $0$ and variance $1$ when $X \\sim \\mathcal{N}(\\mu, 1)$.\n\nNon-example: for the uniform densities $f(x; \\theta) = \\theta^{-1}\\mathbf{1}[0 \u003c x \u003c \\theta]$ with $\\theta \u003e 0$, the map $\\theta \\mapsto \\log f(x; \\theta)$ is not differentiable (it jumps from $-\\infty$) at $\\theta = x$.\nWhere it is defined, the score is $-1/\\theta$, whose mean is not $0$: the support depends on $\\theta$, and differentiation under the integral fails.\n",
  "commit": "ff8a40749dc16545e3d2fc637f6b0196e81d0bfa",
  "front": {
    "defines": "CP97GRVTQ0",
    "kind": "definition",
    "msc": [
      "62F10",
      "62B10"
    ],
    "name": "Score",
    "sources": [
      {
        "url": "https://en.wikipedia.org/wiki/Informant_function"
      }
    ],
    "tag": "8X7293647G",
    "uses": [
      "05FSTXM92W",
      "0NS2QYVC4Y",
      "0DCT0QZVQ1"
    ]
  },
  "kind": "definition",
  "link": "https://tamnd.github.io/math2/node/8X7293647G/",
  "links": [
    {
      "field": "defines",
      "target": "CP97GRVTQ0"
    },
    {
      "field": "uses",
      "target": "05FSTXM92W"
    },
    {
      "field": "uses",
      "target": "0NS2QYVC4Y"
    },
    {
      "field": "uses",
      "target": "0DCT0QZVQ1"
    }
  ],
  "markdown": "https://tamnd.github.io/math2/node/8X7293647G.md",
  "msc": [
    "62F10",
    "62B10"
  ],
  "name": "Score",
  "prov": null,
  "role": "",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/8X7/8X7293647G.md",
  "status": null,
  "tag": "8X7293647G",
  "uri": "m2://8X7293647G",
  "url": "https://tamnd.github.io/math2/wiki/score-definition/",
  "writing": {
    "tag": "8X7293647G",
    "kind": "definition",
    "level": "W0",
    "next": [
      {
        "what": "a source with a locator",
        "have": 0,
        "want": 1
      }
    ]
  }
}
