The test is used to check whether a sample has the specified distribution. For example, it checks the hypothesis that the sample is normally distributed. A small probability value indicates that the hypothesis on normal distribution is rejected. For a sample that is normally distributed, the probability value tends to one.
The test can be applied for two samples. In this case distribution of the first sample is compared with distribution of the second sample, and the decision is made whether the samples have the same distribution or not. If there are two samples to analyze, the user does not need to define distribution type and its parameters.
The data consists of a single sample that includes n observations. The sample is indicated as: x1, x2, …, xn.
Suppose that Sn(x(i)) and F0(x(i)) represent a typical cumulative distribution function and theoretical cumulative distribution function that corresponds to the null hypothesis, at the point x(i), where x(i) is the i is the smallest observation of the sample.
The Kolmogorov-Smirnov test checks the hypothesis H0 that the data is a random sample of observations of custom theoretical distribution against one of the following alternative hypotheses:
H1: The data cannot be a random sample of the specified distribution.
H2: The data comes from a distribution that dominates over the specified zero distribution. This occurs when values of the cumulative distribution function Sn(x) tend to exceed corresponding values of theoretical cumulative distribution function F0(x).
H3: The data comes from the distribution, which is dominated by the specified zero distribution. This occurs when the values of theoretical cumulative distribution function F0(x) tend to exceed corresponding values of cumulative distribution function Sn(x).
One of the test statistics (H1, H2 or H3) is calculated depending on the selected hypothesis. For alternative hypothesis H1.
See also: