From e5cced162a78f7e53fcfd12227b1fb747c6335ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gi=C3=B9=20Marcer?= Date: Mon, 8 Jun 2020 23:44:51 +0200 Subject: [PATCH] slides: do the KS section --- slides/sections/7.md | 87 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100644 slides/sections/7.md diff --git a/slides/sections/7.md b/slides/sections/7.md new file mode 100644 index 0000000..8b8f533 --- /dev/null +++ b/slides/sections/7.md @@ -0,0 +1,87 @@ +# 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!} + $$ +::: +::::