Jump to content

Kolmogorov–Smirnov test

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by Predictor (talk | contribs) at 09:58, 25 April 2005. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

In statistics, the Kolmogorov-Smirnov test is used to determine whether two underlying probability distributions differ from each other or whether an underlying probability distribution differs from a hypothesized distribution, in either case based in finite samples.

The empirical cumulative distribution function Fn for n observations yi is defined as

The two one-sided Kolmogorov-Smirnov test statistics are given by

where F(x) is the hypothesized distribution or another empirical distribution. The probability distributions of these two statistics, given that the null hypothesis of equality of distributions is true, does not depend on what the hypothesized distribution is, as long as it is continuous. Knuth gives a detailed description of how to analyze the significance of this pair of statistics. Many people use max(Dn+, Dn) instead, but the distribution of this statistic is more difficult to deal with.

Note that when the underlying independent variable is cyclic, as with day of the year or day of the week, then Kuiper's test is more appropriate. Numerical Recipes is a good source of information on this. Note furthermore, that the Kolmogorov-Smirnov test is more sensitive at points near the median of the distribution than on its tails. The Anderson-Darling test is a test that provides equal sensitivity at the tails.

See also