Computing the Cumulative Distribution Function and Quantiles of the limit of the Two-sided Kolmogorov-Smirnov Statistic
Paul van Mulbregt

TL;DR
This paper addresses the computational challenges of the Kolmogorov-Smirnov distribution functions, proposing new algorithms that improve accuracy and efficiency for calculating the CDF and quantiles, especially for large samples.
Contribution
The authors develop alternative algorithms that enhance the computation of the KS distribution's CDF and quantiles, correcting inaccuracies and convergence issues in existing approximations.
Findings
Existing approximations in SciPy increase computation time and cause convergence failures.
New algorithms restore accuracy and efficiency across the entire domain.
Improved methods facilitate more reliable goodness-of-fit testing using KS statistics.
Abstract
The cumulative distribution and quantile functions for the two-sided one sample Kolmogorov-Smirnov probability distributions are used for goodness-of-fit testing. The CDF is notoriously difficult to explicitly describe and to compute, and for large sample size use of the limiting distribution is an attractive alternative, with its lower computational requirements. No closed form solution for the computation of the quantiles is known. Computing the quantile function by a numeric root-finder for any specific probability may require multiple evaluations of both the CDF and its derivative. Approximations to both the CDF and its derivative can be used to reduce the computational demands. We show that the approximations in use inside the open source SciPy python software result in increased computation, not just reduced accuracy, and cause convergence failures in the root-finding. Then we…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsAdvanced Statistical Methods and Models · Statistics Education and Methodologies · Statistical Distribution Estimation and Applications
