Kolmogorov Smirnov Test

Kolmogorov-Smirnov test

Also known as a K-S test or KS test.

  • Kolmogorov-Smirnov test: A nonparametric test of the equality of 1D probability distributions
  • nonparametric: A type of statistical analysis that makes minimal assumptions about the data distribution of what is being analyzed. E.g. using methods that are free of distribution
  • probability distribution: The distribution of possible outcomes of an event; helps to determine how likely a result is.
  • distribution function: or CDF (cumulative distribution function), the probability that XX, evaluated against xx will take a value equal to or less than xx.
  • empirical distribution function: or eCDF (empirical cumulative distribution function), is a distribution function associated with an empirically measured sample. Thus is an estimate of the CDF that generated the points in the sample.
  • goodness of fit: description of how well a model fits a set of observations.
  • normality: or the bell curve, known as a normal distribution (or Gaussian distribution), where f(x)=12πσ2exp((xμ)22σ2)f(x) = \frac{1}{\sqrt{2\pi\sigma^2}}exp(-\frac{(x-\mu)^2}{2\sigma^2}), where μ\mu is the mean of the distribution, σ2\sigma^2 is the variance.

A KS test is useful for comparing two samples, and compares the eCDF of the samples. The null hypothesis is therefore where the samples from the same distribution.

KS testing works well as a goodness of fit test, and may be used to test for normality.