Explore modules

Kolmogorov-Smirnov Statistic

Measure the largest vertical gap between a four-point empirical CDF and the uniform reference CDF.

Free theory article

Measure 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.

  1. Select the Central gap preset.
  2. Observe the plotted empirical CDF as a blue step function and the reference uniform CDF as a diagonal grey line.
  3. The module calculates the largest vertical distance between these two lines. A dashed red line indicates where this maximum gap occurs.
  4. 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.
Read the full free theory article