Kolmogorov-Smirnov Statistic
Measure the largest vertical gap between a four-point empirical CDF and the uniform reference CDF.
Free theory articleMeasure the largest vertical gap between a four-point empirical CDF and the uniform reference CDF.
Concept & interpretation
The Kolmogorov-Smirnov (KS) statistic measures the maximum distance between two cumulative distribution functions (CDFs). In this module, we compare a four-point empirical right-continuous CDF with the reference uniform CDF F(x) = x. We compute the one-sided statistics D+ and D- by checking both sides of every jump, including tied observations.
Experiment
Use the Kolmogorov-Smirnov Statistic interactive module to visualize these calculations.
- Select the Central gap preset.
- Observe the plotted empirical CDF as a blue step function and the reference uniform CDF as a diagonal grey line.
- The module calculates the largest vertical distance between these two lines. A dashed red line indicates where this maximum gap occurs.
- Select All zero to see what happens in an extreme boundary case when all observations are clumped together at the lower bound. D+ and D will become 1.