For an empirical distribution function and a specified cumulative distribution function , the one-sample Kolmogorov-Smirnov statistic is their Kolmogorov distance:The displayed sum uses an indicator function. With this convention, is right-continuous. For distinct observations, its value and its left one-sided limit at the th order statistic are and .
For continuous , both jump sides matter. Define the two directional discrepancies byThus uses the empirical distribution function immediately after a jump, and uses its left one-sided limit.[ref] A supremum need not be attained.
For , on , and the stipulated order statistics , the complete calculation isThe last two columns give the signed directional gaps: , , and . In contrast, checking only gives and misses the largest gap approached as . At itself, the gap has already fallen to .
The finite formula follows from the behavior between jumps: the empirical distribution function is constant and the cumulative distribution function is monotone, so the largest directional gaps occur at the two interval ends, possibly as one-sided limits. The two tails introduce no larger gap. Checking every jump side therefore gives the exact supremum.
A common normalized Kolmogorov-Smirnov statistic is , which equals in this example. Its large-sample reference law comes from the Kolmogorov-Smirnov theorem. The unscaled remains the largest difference of cumulative probabilities, not a p-value.
There is a useful exact exception to the usual warning about fitting statistical parameters. Suppose independent and identically distributed observations have the uniform distribution on with unknown . Let and let be the label of its almost surely unique maximizing observation. Conditional on and , the surviving labelled observations are independent with the uniform distribution on ; after division by they are independent and identically distributed uniforms on . These are conditional distributions defined by probability density functions, since the event has probability zero.
To check this, the joint probability density function of and is for . Dividing the original joint probability density function by this factor gives the conditional survivor probability density functionThis factorization proves the claimed conditional independence; scaling removes . Keep the surviving labels in a fixed order, or apply an independent random permutation. The sorted survivors instead have the joint law of uniform order statistics and exhibit statistical dependence; sorting does not affect their empirical distribution function. Delete the maximum itself, which would otherwise become a forced value , and compute the Kolmogorov-Smirnov statistic using sample size and jump heights . This gives an exact conditional Kolmogorov-Smirnov test under the uniform-endpoint statistical model. It does not justify fitting an arbitrary endpoint or other statistical parameters and using the ordinary -sample calibration.
Articles by others on the same topic
There are currently no matching articles.
