The empirical cumulative distribution for *n* observations *y _{i}* is defined as

Note that when the underlying independent variable is cyclic, as with day of the year or day of the week, then Kuiper's test is more appropriate. Numerical Recipes is a good source of information on this. Note furthermore, that the Kolmogorov-Smirnov test is more sensitive at points near the median of the distribution than on its tails. The Anderson-Darling test is a test that provides equal sensitivity at the tails.

- http://www.itl.nist.gov/div898/handbook/eda/section3/eda35g.htm - A lovely explanation of the one-sided KS test
- http://www.io.com/~ritter/JAVASCRP/NORMCHIK.HTM - JavaScript code that implements both the one-sided and two-sided tests.
- As always, Numerical Recipes (ISBN 0521431085) is a prime resource for this sort of thing (see http://www.nr.com/nronline_switcher.html for a discussion).