Skip to content

Home / Shared Math Details / Shared Estimators and Tests / Kolmogorov-Smirnov Test

Kolmogorov-Smirnov Test

This page defines the Kolmogorov-Smirnov normality test, with the Lilliefors correction, that Quantum XL uses. It is one of the selectable goodness-of-fit methods wherever a normality check is offered.

Notation

Term Description
\(n\) number of data values
\(x_{(1)} \le x_{(2)} \le \cdots \le x_{(n)}\) the data sorted in ascending order
\(\bar{x}\) sample mean
\(s\) sample standard deviation (\(n - 1\) denominator)
\(F_n\) empirical cumulative distribution function
\(\Phi\) standard normal cumulative distribution function
\(z_{(i)}\) standardized sorted value, \((x_{(i)} - \bar{x})/s\)
\(D\) Kolmogorov-Smirnov statistic

Test statistic

\[ D^{+} = \max_i\left(F_n(x_{(i)}) - \Phi(z_{(i)})\right), \qquad D^{-} = \max_i\left(\Phi(z_{(i)}) - F_n(x_{(i-1)})\right), \qquad D = \max(D^{+}, D^{-}) \]

\(F_n\) is the empirical cumulative distribution function of the sorted data, and \(z_{(i)} = (x_{(i)} - \bar{x})/s\) standardizes each value with the sample mean and sample standard deviation. \(D\) is the largest vertical distance between the empirical CDF and the fitted normal CDF.

p-value

Because the normal parameters are estimated from the same data, the p-value uses the Lilliefors correction rather than the classical Kolmogorov-Smirnov distribution.

Used by

See Also

References

  1. Massey, F. J. (1951). The Kolmogorov-Smirnov test for goodness of fit. Journal of the American Statistical Association, 46(253), 68-78.
  2. Lilliefors, H. W. (1967). On the Kolmogorov-Smirnov test for normality with mean and variance unknown. Journal of the American Statistical Association, 62(318), 399-402.
  3. D'Agostino, R. B., and Stephens, M. A. (1986). Goodness-of-Fit Techniques. Marcel Dekker.