{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Definition\n\nLet $X_1, \\dots, X_n$ be [[i.i.d.|0AJN7WHBJZ]] real random variables with a continuous distribution, and let $m$ be its [[median|08W2CW8PKW]].\nLet $m_0 \\in \\R$.\nThe *sign statistic* is\n$$S = \\#\\set{i : X_i \u003e m_0}.$$\nThe *sign test* of $H_0 \\colon m = m_0$ uses the fact that under $H_0$ the statistic $S$ has the [[binomial distribution|0VRWZDWW6B]] with parameters $n$ and $1/2$.\nAgainst $H_1 \\colon m \u003e m_0$ it rejects $H_0$ for large $S$, against $m \u003c m_0$ for small $S$, and against $m \\ne m_0$ for $S$ far from $n/2$.\n\n## Remarks\n\nFor matched pairs $(Y_i, Z_i)$ one applies the test to the differences $X_i = Y_i - Z_i$ with $m_0 = 0$.\nContinuity of the law gives $P(X_i = m_0) = 0$; with real data, observations equal to $m_0$ are usually dropped and $n$ is reduced.\n\nExample: $n = 10$ observations, all above $m_0$, so $S = 10$.\nThe one-sided p-value is $P(S \\ge 10) = 2^{-10} \\approx 0.001$ under $H_0$, and $H_0$ is rejected at level $0.05$.\n\nNon-example: let $P(X_i \u003c m_0) = P(X_i \u003e m_0) = 1/4$ and $P(X_i = m_0) = 1/2$.\nThen $m_0$ is a median, but the law is not continuous, and $S$ has law $\\mathrm{Bin}(n, 1/4)$ instead of $\\mathrm{Bin}(n, 1/2)$.\n\nThe [[Wilcoxon signed-rank test|38SETDT2HN]] also uses the sizes of the deviations $X_i - m_0$, at the cost of assuming symmetry.\n",
  "commit": "ff8a40749dc16545e3d2fc637f6b0196e81d0bfa",
  "front": {
    "defines": "NBK6G2VB7A",
    "kind": "definition",
    "msc": [
      "62G10"
    ],
    "name": "Sign test",
    "sources": [
      {
        "url": "https://en.wikipedia.org/wiki/Sign_test"
      }
    ],
    "tag": "G20KZ755WW",
    "uses": [
      "087P03NEND",
      "08W2CW8PKW",
      "0VRWZDWW6B",
      "0AJN7WHBJZ"
    ]
  },
  "kind": "definition",
  "link": "https://tamnd.github.io/math2/node/G20KZ755WW/",
  "links": [
    {
      "field": "defines",
      "target": "NBK6G2VB7A"
    },
    {
      "field": "uses",
      "target": "087P03NEND"
    },
    {
      "field": "uses",
      "target": "08W2CW8PKW"
    },
    {
      "field": "uses",
      "target": "0VRWZDWW6B"
    },
    {
      "field": "uses",
      "target": "0AJN7WHBJZ"
    }
  ],
  "markdown": "https://tamnd.github.io/math2/node/G20KZ755WW.md",
  "msc": [
    "62G10"
  ],
  "name": "Sign test",
  "prov": null,
  "role": "",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/G20/G20KZ755WW.md",
  "status": null,
  "tag": "G20KZ755WW",
  "uri": "m2://G20KZ755WW",
  "url": "https://tamnd.github.io/math2/wiki/sign-test-definition/",
  "writing": {
    "tag": "G20KZ755WW",
    "kind": "definition",
    "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
      }
    ]
  }
}
