Kolmogorov-Smirnov test (K-S test)

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

  1. Leave a comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: