Jump to content

Kolmogorov–Smirnov test

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Snoyes (talk | contribs) at 04:05, 26 February 2003 (pronounciation belongs on Kuiper Test page, and should be phonetic (or not in encyclopedia but dictionary). correct links section). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

The Kolmogorov-Smirnov test is used to determine whether two empirical distributions are different or whether an empirical distribution differs from a theoretical distribution.

The empirical cumulative distribution for N observations yi is defined as E(x) = Σ i (yi < x). The two one-sided Kolmogorov-Smirnov test statistics statistics are given by

DN+ = MAX( E(x) - F(x) )
DN- = MAX( F(x) - E(x) )

where F(x) is the theoretical distribution or another empirical distribution. 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 again a good source of information on this.