The Kolmogorov Smirnov test is based on the maximum vertical distance between the ECDFs of two provided samples.

Is there a variant that checks the maximum horizontal distance?

  • $\begingroup$ What would the $H_{0}$ of this test mean substantively speaking? $\endgroup$
    – Alexis
    Jan 26, 2015 at 16:24
  • $\begingroup$ The same as in Kolmogorov-Smirnov: the samples are drawn from the same distribution. $\endgroup$ Jan 26, 2015 at 17:00
  • 1
    $\begingroup$ There's an issue of scale here - the vertical scale is a probability between 0 and 1, the horizontal distance depends upon choice of units. $\endgroup$
    – Silverfish
    Jan 26, 2015 at 17:05
  • $\begingroup$ Ricky, it is not at all clear to me that the null hypothesis would be "the same as" the K-S test, particularly when the math of what you propose diverges. (Of course whether something is "clear to me" may not matter... I'm just some jerk on the Internet. :) $\endgroup$
    – Alexis
    Jan 26, 2015 at 18:44

1 Answer 1


My guess as to why people don't use it: if you have a test that looks at horizontal distance it won't be distribution-free (at least not without some modification*).

Consider a continuous cdf and an ecdf plotted on the same axes with the KS-statistic marked in at the point of greatest vertical distance between them.

Note that a completely monotonic transformation of the x-axis will change the horizontal scale but leave the vertical distances unchanged. It's this feature that in essence makes the K-S test work the same for every fully-specified continuous distribution (since you can convert between them by exactly such a transformation).

But if you measure horizontal distance, every non-identity transform is going to change the distribution of horizontal distances.

* It might work if you convert everything back to standard uniform and then measure horizontal distance, but I don't think that's what you're asking about.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.