source: Statistical Analysis Handbook
The Kolmogorov-Smirnov (or KS) tests were developed in the 1930s. The tests compare either one observed frequency distribution,f(x), with a theoretical distribution, g(x), or two observed distributions. In either case the procedure involved forming the cumulative frequency distributions F(x) and G(x) and finding the size of the largest difference between these.
Assumptions: The sample is random (or both samples are random) and independent if two samples are involved. The scale of measurement should be at least ordinal and preferably continuous.
Hypothesis: H0: F(x)=G(x) (two-sided case); H1: F(x)≠G(x) for at least one value of x
Test: Compute the test statistic:
D=sup[F(x)-G(x)] = max |F(x)-G(x)|
An example in 單一樣本的推論方法.pdf:
0.2119 0.2743 0.2912 0.3085 0.3446 0.4013 0.4207 0.5 0.5793 0.6179 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9