Kolmogorov–Smirnov distribution (from http://www.math.wm.edu/˜ leemis/chart/UDR/UDR.html ) The symbol used for the Kolmogorov–Smirnov test statistic for a sample size n is typically D_{n}. Using a result from Birnbaum, Z.W. (1952), “Numerical Tabulation of the Distribution of Kolomogorov’s Statistic for Finite Sample Size,” Journal of the American Statistical Association, 47, 425–441, a Kolmogorov–Smirnov random variable D_{n} with parameter n has a cumulative distribution function of D_{n}− 1/(2n) of

P ( D_{n} < \frac{1}{2n}+ v) = n! ∫_{\frac{1}{2n}−v}^{\frac{1}{2n}+v} ∫_{\frac{3}{2n}−v}^{\frac{3}{2n}+v} ...∫_{\frac{2n−1}{2n} −v}^{\frac{2n−1}{2n} +v} g(u_{1}, u_{2},...,u_{n})du_{n}...du_{2}du_{1} 0 ≤ v ≤ \frac{2n − 1}{2n}

for all positive integer values of n with g(u_{1},u_{2},...,u_{n}) = 1 over 0 ≤ u_{1} ≤ u_{2} ≤ ...≤ u_{n} ≤ 1, and 0 otherwise. Computing this integral is non-trivial, particularly for larger values of n.

The cumulative distribution function of D_{1} for n = 1 is

F_{D_{1}}(t) = P(D_{1} ≤ t) = \{ \begin{matrix}0 & t ≤ \frac{1}{2} \\ 2t − 1 & \frac{1}{2} < t < 1 \\ 1 & t ≥ 1. \end{matrix}

The cumulative distribution function of D_{2} for n = 2 is

F_{D_{2}}(t) = P(D_{2} ≤ t) = \{ \begin{matrix}0 & t ≤ \frac{1}{4} \\ 8(t − \frac{1}{4})^{2} & \frac{1}{4} < t < \frac{1}{2} \\ 1 − 2(1 − t)^{2} & \frac{1}{2} < t < 1 \\ 1 & t ≥ 1. \end{matrix}

The general cumulative distribution function is mathematically intractable, but an algorithm to calculate it for specific values of n is given in Drew, Glen, and Leemis (2000), “Computing the Cumulative Distribution Function of the Kolmogorov–Smirnov Statistic,” Computational Statistics and Data Analysis, Volume 34, Number 1, July 2000, 1–15. Applying this algorithm when n = 6 gives the cumulative distribution function of D_{6} as

F_{D_{6}}(t) = \{ \begin{matrix}0 & t < \frac{1}{12} \\ 46080t^{6}− 23040t^{5}+ 4800t^{4}− \frac{1600}{3} t^{3}+ \frac{100}{3} t^{2}− \frac{10}{9} t + \frac{5}{324} & \frac{1}{12} ≤ t < \frac{1}{6} \\ 2880t^{6}− 4800t^{5}+ 2360t^{4}− \frac{1280}{3} t^{3}+ \frac{235}{9} t^{2}+ \frac{10}{27} t − \frac{5}{81} & \frac{1}{6} ≤ t < \frac{1}{4} \\ 320t^{6}+ 320t^{5}− \frac{2600}{3} t^{4}+ \frac{4240}{9} t^{3}− \frac{785}{9} t^{2}+ \frac{145}{27} t − \frac{35}{1296} & \frac{1}{4} ≤ t < \frac{1}{3} \\ −280t^{6}+ 560t^{5}− \frac{1115}{3} t^{4}+ \frac{515}{9} t^{3}+ \frac{1525}{54} t^{2}− \frac{565}{81} t + \frac{5}{16} & \frac{1}{3} ≤ t < \frac{5}{12} \\ 104t^{6}− 240t^{5}+ 295t^{4}− \frac{1985}{9} t^{3}+ \frac{775}{9} t^{2}− \frac{7645}{648} t + \frac{5}{16} & \frac{5}{12} ≤ t < \frac{1}{2} \\ −20t^{6}+ 32t^{5}− \frac{185}{9} t^{3}+ \frac{175}{36} t^{2}+ \frac{3371}{648} t − 1 & \frac{1}{2} ≤ t < \frac{2}{3} \\ 10t^{6}− 38t^{5}+ \frac{160}{3} t^{4}− \frac{265}{9} t^{3}− \frac{115}{108} t^{2}+ \frac{4651}{648} t − 1 & \frac{2}{3} ≤ t < \frac{5}{6} \\ −2t^{6}+ 12t^{5}− 30t^{4}+ 40t^{3}− 30t^{2}+ 12t − 1 & \frac{5}{6} ≤ t < 1 \\ 1 & t ≥ 1. \end{matrix}

The survivor, hazard, cumulative hazard, inverse distribution, moment generating, and characteristic functions on the support of X are also mathematically intractable.

The population mean, variance, skewness, and kurtosis of X are mathematically intractable. Using the APPL function KSRV(n), however, one can calculate the moments of D_{n} for any value of n. For example, the population means of D_{n} for n = 1, 2, ..., 6 are given in the table below.

\begin{matrix}n & 1 & 2 & 3 & 4 & 5 & 6 \\ E[D_{n}] & 3/4 & 13/24 & 293/648 & 813/2048 & 134377/375000 & 1290643/3919104 \end{matrix}