{
  "aliases": null,
  "backlinks": [
    {
      "field": "defines",
      "target": "SARNZPAKE5"
    }
  ],
  "body": "\n## Summary\n\nThe Kolmogorov–Smirnov test is a [[hypothesis test|087P03NEND]] of whether a sample comes from a given continuous distribution.\nA two-sample version tests whether two samples come from the same distribution.\nIts statistic is the largest vertical distance between an [[empirical distribution function|A05WR6TEK5]] and the hypothesised [[cumulative distribution function|0H8H7ZTHW2]], or between two empirical distribution functions.\nUnder the null hypothesis its law does not depend on the continuous distribution being tested, so one table of critical values serves all cases.\nIt is one of the basic tests of [[nonparametric statistics|VFAJ1EG3X5]].\n\n## Explanations\n\n### L1 human\n\nDraw the staircase made by the data: it rises by $1/n$ at each data point.\nDraw on the same picture the smooth curve of the distribution that you expect.\nThe test looks for the place where the staircase and the curve are farthest apart.\nIf that gap is too large for the sample size, the data probably do not come from the expected distribution.\nFor example, one observation $0.3$ tested against the uniform law on $[0, 1]$ gives a largest gap of $0.7$, at $0.3$ itself.\n",
  "commit": "ff8a40749dc16545e3d2fc637f6b0196e81d0bfa",
  "front": {
    "kind": "concept",
    "msc": [
      "62G10",
      "62G30"
    ],
    "name": "Kolmogorov–Smirnov test",
    "same_as": {
      "wikidata": "Q575766",
      "wikipedia": "Kolmogorov–Smirnov test"
    },
    "sources": [
      {
        "url": "https://en.wikipedia.org/wiki/Kolmogorov%E2%80%93Smirnov_test"
      }
    ],
    "specializes": [
      "087P03NEND"
    ],
    "tag": "YZYHWC6C5F"
  },
  "kind": "concept",
  "link": "https://tamnd.github.io/math2/node/YZYHWC6C5F/",
  "links": [
    {
      "field": "specializes",
      "target": "087P03NEND"
    }
  ],
  "markdown": "https://tamnd.github.io/math2/node/YZYHWC6C5F.md",
  "msc": [
    "62G10",
    "62G30"
  ],
  "name": "Kolmogorov–Smirnov test",
  "prov": null,
  "role": "",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/YZY/YZYHWC6C5F.md",
  "status": null,
  "tag": "YZYHWC6C5F",
  "uri": "m2://YZYHWC6C5F",
  "url": "https://tamnd.github.io/math2/wiki/kolmogorov-smirnov-test/",
  "writing": {
    "tag": "YZYHWC6C5F",
    "kind": "concept",
    "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
      }
    ]
  }
}
