- Kolmogorov-Smirnov test
statistics, the Kolmogorov–Smirnov test (also called the K-S test for brevity) is a form of minimum distance estimationused as a nonparametric test of equality of one-dimensional probability distributions used to compare a sample with a reference probability distribution (one-sample K-S test), or to compare two samples (two-sample K-S test). The Kolmogorov-Smirnov statistic quantifies a distance between the empirical distribution functionof the sample and the cumulative distribution functionof the reference distribution, or between the empirical distribution functions of two samples. The null distributionof this statistic is calculated under the null hypothesis that the samples are drawn from the same distribution (in the two-sample case) or that the sample is drawn from the reference distribution (in the one-sample case). In each case, the distributions considered under the null hypothesis are continuous distributions but are otherwise unrestricted.
The two-sample KS test is one of the most useful and general nonparametric methods for comparing two samples, as it is sensitive to differences in both location and shape of the empirical cumulative distribution functions of the two samples.
The Kolmogorov-Smirnov test can be modified to serve as a
goodness of fittest. For normality testing, samples are standarised and compared with a standard normalreference distribution. This is equivalent to setting the mean and variance of the reference distribution equal to the sample estimates, and it is known that using the sample to modify the null hypothesis reduces the power of a test. Correcting for this bias leads to the Lilliefors test. However, even Lilliefors' modification is less powerful than the Shapiro-Wilk testor Anderson-Darling testfor testing normalityFact|date=March 2007.
empirical distribution function"F""n" for "n" iidobservations "Xi" is defined as
:where is the
statisticfor a given function "F"("x") is
where is the
supremumof set . By the Glivenko-Cantelli theorem, if the sample comes from distribution "F"("x"), then converges to 0 almost surely. Kolmogorov strengthened this result, by effectively providing the rate of this convergence (see below). The Donsker theoremprovides yet stronger result.
The Kolmogorov distribution is the distribution of the
where is the
Brownian bridge. The cumulative distribution functionof "K" is given by
Under null hypothesis that the sample comes from the hypothesized distribution "F"("x"),
in distribution, where "B"("t") is the
If "F" is continuous then under the null hypothesis converges to the Kolmogorov distribution, which does not depend on "F". This result may also be known as the Kolmogorov theorem; see
Kolmogorov's theoremfor disambiguation.
The "goodness-of-fit" test or the Kolmogorov-Smirnov test is constructed by using the critical values of the Kolmogorov distribution.
The null hypothesis is rejected at level if
where is found from
The asymptotic power of this test is 1. If the form or parameters of are determined from the , the inequality may not hold. In this case, Monte Carlo or other methods are required to determine the rejection level .
A more familiar form of the test is::
found on different references.
Two-sample Kolmogorov-Smirnov test
The Kolmogorov-Smirnov test may also be used to test whether two underlying one-dimensional probability distributions differ. In this case, the Kolmogorov-Smirnov statistic is
and the null hypothesis is rejected at level if
etting confidence limits for the shape of a distribution function
While the Kolmogorov-Smirnov test is usually used to test whether a given is the underlying probability distribution of , the procedure may be inverted to give confidence limits on itself. If one chooses a critical value of the test statistic such that , then a band of width ± around will entirely contain with probability .
* Cramér-von-Mises test
* cite book
last = Eadie
first = W.T.
coauthors = D. Drijard, F.E. James, M. Roos and B. Sadoulet
title = Statistical Methods in Experimental Physics
publisher = North-Holland
date = 1971
location = Amsterdam
pages = 269-271
* cite book
last = Stuart
first = Alan
coauthors = Keith Ord and Steven Arnold
title = Kendall's Advanced Theory of Statistics
volume = 2A
publisher = Arnold, a member of the Hodder Headline Group
date = 1999
location = London
pages = 25.37-25.43
* [http://www.physics.csbsju.edu/stats/KS-test.html Short introduction]
* [http://www.analyse-it.com/blog/2008/8/testing-the-assumption-of-normality.aspx Testing the assumption of normality] .
* [http://www.itl.nist.gov/div898/handbook/eda/section3/eda35g.htm KS test explanation]
* [http://jumk.de/statistic-calculator/ Online calculator with the K-S test]
* Open-source C++ code to compute the [http://root.cern.ch/root/html/TMath.html#TMath:KolmogorovProb Kolmogorov distribution] and perform the [http://root.cern.ch/root/html/TMath.html#TMath:KolmogorovTest K-S test]
Wikimedia Foundation. 2010.