{
  "__type": "IngestedDoc",
  "__tag": 4010,
  "_content": {},
  "_ordered_sections": [],
  "item_file": null,
  "item_line": null,
  "item_type": null,
  "aliases": [],
  "example_section_data": {
    "__type": "Section",
    "__tag": 4015,
    "children": [],
    "title": [],
    "level": 0,
    "target": null
  },
  "see_also": [],
  "signature": null,
  "references": null,
  "qa": "tutorial:stats:continuous_kstwobign",
  "arbitrary": [
    {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "This is the limiting distribution of the normalized maximum absolute differences between an empirical distribution function, computed from "
            },
            {
              "__type": "InlineMath",
              "__tag": 4057,
              "value": "n"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " samples or observations, and a comparison (or target) cumulative distribution function.  ("
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "ksone"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " is the distribution of the unnormalized positive differences, "
            },
            {
              "__type": "InlineMath",
              "__tag": 4057,
              "value": "D_n^+"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": ".)"
            }
          ]
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "Writing "
            },
            {
              "__type": "InlineMath",
              "__tag": 4057,
              "value": "D_n = \\sup_t \\left|F_{empirical,n}(t) - F_{target}(t)\\right|"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": ", the normalization factor is "
            },
            {
              "__type": "InlineMath",
              "__tag": 4057,
              "value": "\\sqrt{n}"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": ", and "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "kstwobign"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " is the limiting distribution of the "
            },
            {
              "__type": "InlineMath",
              "__tag": 4057,
              "value": "\\sqrt{n} D_n"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " values as "
            },
            {
              "__type": "InlineMath",
              "__tag": 4057,
              "value": "n\\rightarrow\\infty"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "."
            }
          ]
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "Note that "
            },
            {
              "__type": "InlineMath",
              "__tag": 4057,
              "value": "D_n=\\max(D_n^+, D_n^-)"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": ", but "
            },
            {
              "__type": "InlineMath",
              "__tag": 4057,
              "value": "D_n^+"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " and "
            },
            {
              "__type": "InlineMath",
              "__tag": 4057,
              "value": "D_n^-"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " are not independent."
            }
          ]
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "kstwobign"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " can also be used with the differences between two empirical distribution functions, for sets of observations with "
            },
            {
              "__type": "InlineMath",
              "__tag": 4057,
              "value": "m"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " and "
            },
            {
              "__type": "InlineMath",
              "__tag": 4057,
              "value": "n"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " samples respectively, where "
            },
            {
              "__type": "InlineMath",
              "__tag": 4057,
              "value": "m"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " and "
            },
            {
              "__type": "InlineMath",
              "__tag": 4057,
              "value": "n"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " are \"big\". Writing "
            },
            {
              "__type": "InlineMath",
              "__tag": 4057,
              "value": "D_{m,n} = \\sup_t \\left|F_{1,m}(t)-F_{2,n}(t)\\right|"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": ",  where "
            },
            {
              "__type": "InlineMath",
              "__tag": 4057,
              "value": "F_{1,m}"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " and "
            },
            {
              "__type": "InlineMath",
              "__tag": 4057,
              "value": "F_{2,n}"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " are the two empirical distribution functions, then "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "kstwobign"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " is also the limiting distribution of the "
            },
            {
              "__type": "InlineMath",
              "__tag": 4057,
              "value": "\\sqrt{\\frac{mn}{m+n}}D_{m,n}"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " values, as "
            },
            {
              "__type": "InlineMath",
              "__tag": 4057,
              "value": "m,n\\rightarrow\\infty"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " and "
            },
            {
              "__type": "InlineMath",
              "__tag": 4057,
              "value": "m/n\\rightarrow a \\ne 0, \\infty"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "."
            }
          ]
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "There are no shape parameters, and the support is "
            },
            {
              "__type": "InlineMath",
              "__tag": 4057,
              "value": "x\\in\\left[0,\\infty\\right)"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "."
            }
          ]
        },
        {
          "__type": "Math",
          "__tag": 4058,
          "value": "\\begin{eqnarray*}  F\\left(x\\right) & = & 1 - 2 \\sum_{k=1}^{\\infty} (-1)^{k-1} e^{-2k^2 x^2}\\\\\n& = & \\frac{\\sqrt{2\\pi}}{x} \\sum_{k=1}^{\\infty} e^{-(2k-1)^2 \\pi^2/(8x^2)}\\\\\n& = & 1 - \\textrm{scipy.special.kolmogorov}(n, x) \\\\\nf\\left(x\\right) & = & 8x \\sum_{k=1}^{\\infty} (-1)^{k-1} k^2 e^{-2k^2 x^2} \\end{eqnarray*}"
        }
      ],
      "title": [
        {
          "__type": "Text",
          "__tag": 4046,
          "value": "KStwobign Distribution"
        }
      ],
      "level": 0,
      "target": "continuous-kstwobign"
    },
    {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "BulletList",
          "__tag": 4053,
          "ordered": false,
          "start": 1,
          "children": [
            {
              "__type": "ListItem",
              "__tag": 4054,
              "children": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "\"Kolmogorov-Smirnov test\", Wikipedia    https://en.wikipedia.org/wiki/Kolmogorov-Smirnov_test"
                    }
                  ]
                }
              ]
            },
            {
              "__type": "ListItem",
              "__tag": 4054,
              "children": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "Kolmogoroff, A. \"Confidence Limits for an Unknown Distribution Function.\"\"    "
                    },
                    {
                      "__type": "Emphasis",
                      "__tag": 4047,
                      "children": [
                        {
                          "__type": "Text",
                          "__tag": 4046,
                          "value": "Ann. Math. Statist."
                        }
                      ]
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " 12 (1941), no. 4, 461--463."
                    }
                  ]
                }
              ]
            },
            {
              "__type": "ListItem",
              "__tag": 4054,
              "children": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "Smirnov, N. \"On the estimation of the discrepancy between empirical curves of distribution for two independent samples\"    "
                    },
                    {
                      "__type": "Emphasis",
                      "__tag": 4047,
                      "children": [
                        {
                          "__type": "Text",
                          "__tag": 4046,
                          "value": "Bull. Math. Univ. Moscou."
                        }
                      ]
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ", 2 (1039), 2-26."
                    }
                  ]
                }
              ]
            },
            {
              "__type": "ListItem",
              "__tag": 4054,
              "children": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "Feller, W. \"On the Kolmogorov-Smirnov Limit Theorems for Empirical Distributions.\"    "
                    },
                    {
                      "__type": "Emphasis",
                      "__tag": 4047,
                      "children": [
                        {
                          "__type": "Text",
                          "__tag": 4046,
                          "value": "Ann. Math. Statist."
                        }
                      ]
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " 19 (1948), no. 2, 177--189. and \"Errata\"  "
                    },
                    {
                      "__type": "Emphasis",
                      "__tag": 4047,
                      "children": [
                        {
                          "__type": "Text",
                          "__tag": 4046,
                          "value": "Ann. Math. Statist."
                        }
                      ]
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " 21 (1950), no. 2, 301--302."
                    }
                  ]
                }
              ]
            }
          ]
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "Implementation: "
            },
            {
              "__type": "InlineRole",
              "__tag": 4003,
              "value": "scipy.stats.kstwobign",
              "domain": null,
              "role": null,
              "inventory": null
            }
          ]
        }
      ],
      "title": [
        {
          "__type": "Text",
          "__tag": 4046,
          "value": "References"
        }
      ],
      "level": 1,
      "target": null
    }
  ],
  "local_refs": []
}