- Introduced by
- Anderson & Darling (1952); EDF tables by Stephens (1974)
- Year
- 1952
- Type
- Empirical distribution function (EDF) goodness-of-fit test
What does it do?
The Anderson-Darling test is an empirical distribution function (EDF) goodness-of-fit test, introduced by Anderson and Darling in 1952, that checks whether a continuous sample is consistent with a specified distribution, such as the normal or exponential distribution or any other continuous distribution with a specified cumulative distribution function.
Its statistic weights squared deviations between the empirical and candidate distribution functions by 1/[F(x)(1−F(x))], so departures in the tails count for more than departures near the centre. This tail emphasis is the main reason the test is chosen over the Kolmogorov-Smirnov test when tail behaviour matters.
The intuition behind the method
Sort the data and compare its empirical cumulative distribution, a step function, with the smooth curve of the candidate distribution. A maximum-gap comparison looks only at the single largest deviation, whereas the Anderson-Darling statistic accumulates squared deviations across all points, scaled up where the candidate distribution is close to 0 or 1. A small gap in the tails therefore contributes more to the statistic than the same gap near the median. This is why skew or heavy tails can produce a clear signal, and the result is one statistic that is judged against tabulated critical values.
History
T. W. Anderson and D. A. Darling introduced the statistic in 1952 as part of an asymptotic theory of goodness-of-fit criteria based on stochastic processes. Their analysis included the weight function 1/[t(1−t)] and is related to the von Mises ω² criterion, and this weighting emphasises the tails. M. A. Stephens (1974) provided practical EDF significance points for the distributions and parameter situations used in applied work, including the normal and exponential cases with parameters estimated from the data.
When to use it
Use the Anderson-Darling test when you have one continuous variable and want to check whether it is consistent with a named distribution, for example as an assumption check before a t-test or ANOVA, which assume that the variables are normally distributed. Choose the critical values that match your case, including whether the distribution's parameters were estimated from the data. Power is limited in very small samples, so results from small samples need cautious reading. The test is designed for continuous data and should not be applied to data that are not continuous. If the concern is mainly a difference in the centre of the distribution rather than its tails, another goodness-of-fit or group-comparison test may be more suitable.
Limitations and considerations
- Critical values are distribution-specific, and they change when parameters such as the mean and variance are estimated from the same data, so a table built for a fully specified distribution does not apply directly.
- Because the statistic is n times an integral and is built from a sum over all n observations, even small departures accumulate in large samples, so very large samples can flag practically trivial deviations.
- Power is limited in small samples; a non-significant result from a very small sample should be read cautiously, since the test may simply lack the power to detect a departure from the assumed distribution.
Source conditions do not replace independent scientific review or validation by an analysis engine.
Strengths
- The weight 1/[F(x)(1−F(x))] makes tail deviations count more than central ones, so the test is designed to catch heavy tails and extreme values that a centre-weighted statistic can miss.
- It applies to any continuous candidate distribution with a specified CDF, not only the normal. Tabulated critical values are available for the normal and exponential cases in Stephens (1974); other distributions require their own significance points.
- It yields one statistic with a p-value read from tabulated significance points, so no simulation is needed when those tables apply to the case at hand.
Applications
- Checking the normality assumption of a continuous variable before a parametric test such as a t-test or ANOVA, which assume normally distributed variables.
- Validating distributional assumptions in reliability and survival analysis, where an exponential model can be tested against Stephens (1974) significance points; models such as the Weibull need critical values from a source that covers them.
- Quality-control and process studies that need a goodness-of-fit check on continuous measurement data, with attention to tail behaviour.
How it works
How it works
The statistic is computed from the ordered observations x(1) ≤ … ≤ x(n) as A² = −n − (1/n)·Σ(2i−1)·[ln F(x(i)) + ln(1 − F(x(n+1−i)))], summed over i = 1 to n, where F is the candidate cumulative distribution function (the standard normal CDF for a normality test). Each term pairs an observation from the lower end of the sample with one from the upper end, so both tails enter the sum. A large A² indicates that the data deviate from the assumed distribution, particularly in the tails.
Formula
A^{2} = -n - \frac{1}{n}\sum_{i=1}^{n}(2i-1)\left[\ln F(x_{(i)}) + \ln\!\left(1 - F(x_{(n+1-i)})\right)\right]A² is the sample form of n times the integral of the squared difference between the empirical CDF Fₙ and the candidate CDF F, weighted by 1/[F(x)(1−F(x))] and integrated with respect to dF(x). The weight becomes large where F is close to 0 or 1, so deviations in the tails are amplified; this is the feature that separates the statistic from the single largest gap used by Kolmogorov-Smirnov. To obtain a p-value, proceed in three steps. First, identify the candidate distribution and whether its parameters were fully specified in advance or estimated from the same data. Second, locate the matching line of significance points in Stephens' (1974) EDF tables; the tables give one line per situation, covering a completely specified distribution and the normal or exponential distribution with one or more parameters estimated from the data. Third, compare A² with that line and apply any adjustment the table specifies for that case. A candidate distribution outside these situations needs significance points from a source that covers it.
Formula
A^{2} = n\!\int_{-\infty}^{\infty}\frac{\left[F_{n}(x) - F(x)\right]^{2}}{F(x)\,(1 - F(x))}\,dF(x)Common pitfalls
- Running the test on very small samples, or treating a non-significant result from a small sample as evidence of normality, when the test may simply lack the power to detect non-normality.
- Using normal-distribution critical values while testing an exponential or Weibull model, or using fixed-parameter tables when the parameters were estimated from the data.
- Reading a significant result on a large sample as proof that the data are unusable, without checking whether the deviation is large enough to matter for the analysis.
- Relying on the single statistic and skipping a Q-Q plot or histogram, which show where in the distribution the departure lies.
Frequently asked questions
How is Anderson-Darling different from Kolmogorov-Smirnov?
Both compare the empirical distribution to a candidate distribution, but Kolmogorov-Smirnov uses the single largest gap, while Anderson-Darling integrates the squared gap with a weight that grows toward the tails. This makes Anderson-Darling more sensitive to tail departures such as heavy tails or extreme outliers, though the choice should also reflect where a departure is expected.
What sample size do I need?
The test's power is limited in small samples, so results from very small samples are less conclusive. A non-significant result does not by itself show that the data follow the assumed distribution. Judge the sample size together with a Q-Q plot, which shows where any departure lies.
What does a significant result mean?
A small p-value (large A²) is evidence that the data do not follow the assumed distribution. For a normality test this means the data depart from normal, often in the tails. In large samples even trivial departures can become significant, so pair the test with a Q-Q plot to judge whether the deviation matters.
Can it test distributions other than the normal?
Yes. The same A² statistic applies to any continuous distribution with a specified CDF. The critical values must match that distribution and must also account for whether its parameters were estimated from the data. Stephens (1974) provides significance points for the normal and exponential cases; for other distributions such as the Weibull, use significance points from a source that covers them rather than the normal or exponential cut-offs.
Related methods
Sources
Anderson, T. W., & Darling, D. A. (1952). Asymptotic Theory of Certain 'Goodness of Fit' Criteria Based on Stochastic Processes. The Annals of Mathematical Statistics, 23(2), 193-212.
Open DOI referenceStephens, M. A. (1974). EDF Statistics for Goodness of Fit and Some Comparisons. Journal of the American Statistical Association, 69(347), 730-737.
Open DOI reference05_dfb767bdc89a771ad58a1f445a391d54f6ee1a0a, p. 15