The empirical cumulative distribution for N observations yi is defined as E(x) = Σ i (yi < x). The two one-sided Kolmogorov-Smirnov test statistics statistics are given by
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 again a good source of information on this. Note: Kuiper is pronounced in Dutch the way an English persion would pronounce Cowper.
External links:
See http://www.itl.nist.gov/div898/handbook/eda/section3/eda35g.htm for a lovely explanation of the one-sided KS test and http://www.io.com/~ritter/JAVASCRP/NORMCHIK.HTM for JavaScript code that implements both the one-sided and two-sided tests. As always, Numerical Recipes ISBN 0521431085 (amazon.com, search) is a prime resource for this sort of thing (see http://www.nr.com/nronline_switcher.html for a discussion).