The Kolmogorov-Smirnov Goodness-of-Fit Test
JavaScript
Given a sample of size n from a continuous distribution function, F,
the Smirnov test tests the null hypothesis that F=F0,
where F0 is a given continuous distribution function.
The test statistic is
Dn = supx|Fn(x)-F0(x)|,
where Fn is the sample distribution function.
The distribution of Dn is independent of F0
when F0 is the true distribution function.
For example, P(D100 <= .1) = .74731. For nd<=20, the exact
probabilities for Dn are calculated.
As n tends to infinity, the distribution of √n Dn
approaches the Kolgomorov distribution.
If nd>20, the approximate probabilities are given using the Kolmogorov
distribution.
The error is less than .001.