📈 Empirical Distribution Function Tests

Evaluate how well sample distributions align with theoretical or peer samples using the Kolmogorov–Smirnov and Anderson–Darling families. This page covers one-sample KS (with optional Lilliefors correction), two-sample KS, and Anderson–Darling (one- and two-sample) tests, with p-values, critical values, and narrative interpretation.

1. Select Test Type

Significance Level (α)

Custom α must lie between 0.001 and 0.25.

Lilliefors correction

Applies to KS one-sample when μ, σ estimated (normal distribution). Uses approximation by Dallal & Wilkinson.

2. Provide Data & Expected Distribution

Enter at least three observations.

Formula Reference

Kolmogorov–Smirnov (one-sample)

\\[ D_n = \sup_x \left| F_n(x) - F_0(x) \right| \\]

Kolmogorov–Smirnov (two-sample)

\\[ D_{n,m} = \sup_x \left| F_n(x) - G_m(x) \right| \\]

Anderson–Darling (one-sample)

\\[ A^2 = -n - \frac{1}{n} \sum_{i=1}^{n} (2i - 1) \big[\ln F(x_{(i)}) + \ln \big(1 - F(x_{(n+1-i)})\big)\big] \\]

Anderson–Darling (two-sample)

Uses pooled order statistics with tail-emphasis weights. Critical values depend on sample sizes (see Stephens 1974).

How to Use This Calculator

  1. Choose the EDF test matching your scenario (theoretical vs empirical distribution, or two-sample comparison).
  2. Enter raw data and specify distribution parameters or custom CDF values as needed.
  3. Select significance level α and enable Lilliefors correction when estimating parameters from the sample.
  4. Run the test to obtain statistic, p-value, critical value, and workflow summary.
  5. Review diagnostic notes to understand corrections and recommended visual overlays (ECDF vs theoretical curves).

References

  • Massey, F. J. (1951). “The Kolmogorov-Smirnov Test for Goodness of Fit.” Journal of the American Statistical Association, 46(253), 68–78.
  • Stephens, M. A. (1974). “EDF Statistics for Goodness of Fit and some Comparisons.” Journal of the American Statistical Association, 69(347), 730–737.
  • Lilliefors, H. W. (1967). “On the Kolmogorov-Smirnov Test for Normality with Mean and Variance Unknown.” Journal of the American Statistical Association, 62(318), 399–402.

Disclaimer

Numerical approximations are used for p-values and corrections; for critical evaluations, consult original tables (Massey, Stephens, Lilliefors) or Monte Carlo simulations. Always accompany EDF tests with graphical overlays (ECDF, Q–Q plots) for context.