You are on page 1of 1

The Kolmogorov Smirnov Test:

The Kolmogorov Smirnov one sample test is a non parametric test. The test compares a
cumulative distribution function based on sample observations with some specified population
distribution from which the random sample has been drawn. The hypothesis to be tested is that
the random sample comes from a completely specified distribution.

Let Sn(x) denotes the cumulative distribution function based on a random sample of n
𝑘
observations, that is Sn(x) = , where k is the number of sample observations less than or equal to
𝑛
X, and let F0(x) be the hypothesized population cumulative distribution function. The test is
based on the maximum absolute difference D n, defined by

Dn = max │ Sn(x) - F0(x) │

The null hypothesis is rejected when Dn exceeds the critical value for the chosen level of
significance.

The Kolmogorov Smirnov Two Sample Test deals with the agreement between two sample
cumulative distributions. The null hypothesis to be tested is that two independent samples come
from identically distributed populations F(Xi) and the alternative hypothesis is that they come
from populations having different cumulative distribution functions. In symbols, the hypotheses
to be tested are

H0:F1(X1) = F2(X2) for all X and

H1:F2(X1) ≠ F2(X2) for at least one X

For this purpose, we compare the sample cumulative relative frequency distributions [S(Xi)] at
each sample value. Let Sn1(X) and Sn2(X) denote the cumulative relative frequency distributions
of two independent samples of size n1 and n2. Then the Kolmogorov Smirnov two sample test is
based on the maximum difference D, defined by

D = max [Sn1(X) – Sn2(X)]

In the case of small samples (n1 and n2 less than 40) and two – tailed test, the null hypothesis if
rejected when D exceeds the critical value for the chosen level of significance.

When both samples sizes n1and n2 are greater than 40, for a one tailed test, the test statistic to use
is
n1n2
𝜒2 = 4D2[ n1+ n2 ] which has approximately a chi-square distribution with 2 d.f.

You might also like