analistica/slides/sections/7.md

1.1 KiB

Kolmogorov - Smirnov test

KS

Quantify distance between expected and observed CDF

. . .

KS statistic:


  D_N = \text{sup}_x |F_N(x) - F(x)|
  • F(x) is the expected CDF
  • F_N(x) is the empirical CDF of N sampled points
    • sort points in ascending order
    • number of points preceding the point normalized by N

KS

H_0: points sampled according to F(x)

. . .

If H_0 is true:

  • \sqrt{N}D_N \xrightarrow{N \rightarrow + \infty} K

Kolmogorov distribution with CDF:


  P(K \leqslant K_0) = 1 - p = \frac{\sqrt{2 \pi}}{K_0}
  \sum_{j = 1}^{+ \infty} e^{-(2j - 1)^2 \pi^2 / 8 K_0^2}

. . .

a $p$-value can be computed

  • At 95% confidence level, H_0 cannot be disproved if p > 0.05

Samples results

Samples results

N = 50000 sampled points

. . .

Landau sample:

:::: {.columns} ::: {.column width=50%}

  • D = 0.004
  • $p = 0.379$ :::

::: {.column width=50%}

$$
\thus \text{Compatible!}

::: ::::

\vspace{10pt}

. . .

Moyal sample:

:::: {.columns} ::: {.column width=50%}

  • D = 0.153
  • $p = 0.000$ :::

::: {.column width=50%}

$$
\thus \text{Not compatible!}

::: ::::