Skip to main content
Article
Computing the cumulative distribution function of the Kolmogorov–Smirnov statistic
Computational Statistics & Data Analysis
  • John H. Drew
  • Andrew G. Glen
  • Lawrence Leemis, William & Mary
Document Type
Article
Department/Program
Computational & Applied Mathematics & Statistics
Pub Date
7-1-2000
Abstract

We present an algorithm for computing the cumulative distribution function of the Kolmogorov–Smirnov test statistic Dn in the all-parameters-known case. Birnbaum (1952, J. Amer. Statist. Assoc. 47, 425–441), gives an n-fold integral for the CDF of the test statistic which yields a function defined in a piecewise fashion, where each piece is a polynomial of degree n. Unfortunately, it is difficult to determine the appropriate limits of integration for computing these polynomials. Our algorithm performs the required integrations in a manner that avoids calculating the same integrals repeatedly, resulting in shorter computation time. It can be used to compute the entire CDF or just a portion of the CDF, which is more efficient for finding a critical value or a p-value associated with a hypothesis test. If the entire CDF is computed, it can be stored in memory so that various characteristics of the distribution of the test statistic (e.g., moments) can be calculated. To date, critical tables have been approximated by various techniques including asymptotic approximations, recursive formulas, and Monte Carlo simulation. Our approach yields exact critical values and significance levels. The algorithm has been implemented in a computer algebra system.

DOI
https://doi.org/10.1016/S0167-9473(99)00069-9
Publisher Statement

This version is the accepted (post-print) version of the manuscript.

Citation Information
John H. Drew, Andrew G. Glen and Lawrence Leemis. "Computing the cumulative distribution function of the Kolmogorov–Smirnov statistic" Computational Statistics & Data Analysis Vol. 34 Iss. 1 (2000) p. 1 - 15
Available at: http://works.bepress.com/lawrence-leemis/10/