📈 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.
Provide monotone non-decreasing CDF pairs covering your sample range.
Test Output
Results readyKey Values
- Statistic
- n / (n, m)
- p-value
Decision
Diagnostics
- Critical value (α)
- Adjustment notes
Step-by-Step Workflow
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
- Choose the EDF test matching your scenario (theoretical vs empirical distribution, or two-sample comparison).
- Enter raw data and specify distribution parameters or custom CDF values as needed.
- Select significance level α and enable Lilliefors correction when estimating parameters from the sample.
- Run the test to obtain statistic, p-value, critical value, and workflow summary.
- 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.