Anderson–Darling test
Intermediate
What you need first. Nothing else on this path comes first. This page is part of Statistical inference.
In data analysis, the Anderson–Darling test is a goodness-of-fit test based on the empirical distribution function that weights discrepancies in the tails of the hypothesised distribution more heavily than those near its centre. It is a goodness-of-fit test for the hypothesis that a sample comes from a specified continuous distribution. It belongs to the family of tests based on the empirical distribution function (EDF): it measures the distance between the empirical distribution function of the sample and the hypothesised distribution function, and it weights that distance so that discrepancies in the tails count for much more than discrepancies near the centre. It is the tail-weighted member of the quadratic EDF family whose unweighted member is the Cramér–von Mises statistic and whose supremum-based relative is the Kolmogorov–Smirnov test.
Let be independent observations from a continuous distribution, let be a continuous distribution function specified by the null hypothesis, and let be the empirical distribution function of the sample, , where is the indicator of the event in braces. The null hypothesis is the simple hypothesis : the have distribution function , against the alternative that they do not. Anderson and Darling introduced the statistic in 1952 as one of a class of goodness-of-fit criteria built from the empirical process .[1] The test rejects for large values of its statistic: the further the empirical distribution sits from , in the tail-weighted sense made precise below, the larger the statistic.
Two features organise everything that follows. First, when is fully specified, with no parameter estimated from the data, the null distribution of the statistic is the same for every continuous : the test is distribution-free in exactly the sense the Kolmogorov–Smirnov test is. Second, that convenience disappears as soon as parameters are estimated. When is a family such as the normal family and its mean and variance are fitted to the same data being tested, the null distribution changes, depends on the family, and requires its own critical values. Confusing the two cases is the most consequential error in the use of this test, and it is treated as a separate case throughout this article.
Anderson–Darling test
| Fact | Value |
|---|---|
| Topic | Statistical inference |
| Listed on | Statistical inference |
The quadratic EDF family and the Anderson–Darling weight
Write for a non-negative weight function defined for . The quadratic EDF statistics have the form
The integral is taken with respect to itself, so the substitution turns it into an integral over : each point is scored by where it falls in the hypothesised distribution, not by its distance from the centre in the units of measurement. Anderson and Darling studied this class, together with supremum criteria of Kolmogorov–Smirnov type, in a single asymptotic framework .[1]
Three choices of give the three classical statistics. The Cramér–von Mises statistic takes : every part of the distribution contributes in proportion to its probability. The Kolmogorov–Smirnov statistic is not an integral but a supremum, , which is again a comparison on the scale with no tail emphasis: a discrepancy of a given size counts the same wherever it occurs, and in practice the largest discrepancy is usually found where is most variable, near the median. The Anderson–Darling statistic takes
The denominator is, up to the factor , the variance of under : for each fixed , is binomial with parameters and . Dividing the squared discrepancy by that variance converts an absolute discrepancy into a relative one. Near the median, where , the weight is ; at or it is about ; and it grows without bound as approaches or . A tail discrepancy that would be invisible to the Cramér–von Mises integral, because is small in the tails, is restored to full weight here. This is the whole design of the test, and Anderson and Darling’s own practical summary of their statistic was that it is sensitive to discrepancies at the tails of the distribution rather than near the median .[2]
The price of the weight is paid at the extremes of the sample. Because is unbounded, the statistic is driven disproportionately by the smallest and largest observations, through the values assigns to them. A single observation far into a tail of can dominate . That is the intended behaviour when the tail is where the alternative lives, and a liability when an extreme value is a recording error rather than evidence about the distribution.
The computing formula
The integral definition is not how is computed. Let be the ordered sample, and write for the hypothesised distribution function evaluated at the th ordered value. Evaluating the integral over the intervals on which is constant gives the exact computing formula
No approximation is involved in passing from the integral to this sum: for a fully specified continuous the two expressions are the same number. The pairing inside the sum is the tail weighting in algebraic form. The th term couples , which is large in magnitude when the th smallest observation falls far into the lower tail of , with , which is large in magnitude when the th largest falls far into the upper tail. The National Institute of Standards and Technology handbook states the same formula, in the equivalent form with the sum above, and notes that the ordered data must be used .[3] Two practical consequences follow directly from the logarithms, and they must not be confused, because one is a defect of the arithmetic and the other is evidence. The first is numerical. An observation far into a tail of , but inside its support, can be assigned or exactly when is evaluated in floating-point arithmetic, because the computed values saturate at and even though the exact CDF is strictly between 0 and 1: for a normal , double-precision evaluation returns although the true value is about . For this saturation the repair is numerical: compute the two logarithms in the sum directly, as the log-distribution value and the log-survival value , from routines that evaluate those quantities without first forming itself. On that scale the same observation contributes , finite, and the statistic takes the large but finite value the formula intends. The second case is not numerical at all. An observation outside the support of the specified — a value above under a specified uniform distribution on , say — is assigned or because itself, and not its floating-point shadow, takes that value there. Such an observation is impossible under , and it is therefore decisive evidence against the null rather than a breakdown of the computation: the integral defining diverges, because with the largest transformed value equal to the integrand behaves like a positive constant times as approaches , and the computing formula returns through the term . No repair is appropriate; the infinite value is the correct answer, read as rejection. The endpoint divergence is visible already at , where the computing formula reduces to for the single transformed value , which grows without bound as approaches either or . And because the terms are logarithms, the statistic responds to the ratio scale of tail probabilities: halving an already small tail probability changes far more than halving a probability near .
Under with fully specified, the probability integral transformation gives that are the ordered values of a sample from the uniform distribution on , whatever was. The null distribution of is therefore a single distribution, free of . Its asymptotic form was derived by Anderson and Darling in 1952 ,[1] and in 1954 they tabulated large-sample significance points for it, calculated by numerical integration .[2] The asymptotic upper percentage points, as tabulated by Anderson and Darling in 1954 and reprinted by Stephens, are , , , and at the , , , and levels respectively .[2] These are asymptotic points, not exact finite-sample ones; the finite-sample distribution approaches them quickly, but for very small samples a percentage point read from this line is an approximation, and the article’s worked example below is presented with that qualification. A later computational study found that the point printed as in the early tables is more accurately , while the and points agree with the early values to the printed precision .[4] The discrepancy does not affect any comparison made in this article, none of which turns on the point’s third decimal.
When parameters are estimated
The distribution-free property belongs to the fully specified case alone, which Stephens’s classification calls Case 0. In practice the more common question is composite: the data are to be tested against a family, most often the normal family with unspecified mean and variance . The statistic is computed in the same way, with , where and , the sample standard deviation with divisor , and is the standard normal distribution function. The divisor is a convention, not a detail: Stephens’s modification and percentage points below are calibrated to this fitting convention (his Case 3, pp. 730–731), and standardising with the maximum-likelihood divisor instead gives a differently calibrated statistic to which that line of points does not strictly apply. But the are then no longer a sample from the uniform distribution, even when the data are exactly normal: because and were fitted to these data, the standardised values are drawn towards the centre, the are more evenly spread than a uniform sample, and is systematically smaller than in Case 0. Stephens’s survey of EDF statistics sets out this case distinction and the modifications it forces .[5] The handbook makes the same point from the applied side: the Anderson–Darling test uses the specific distribution in calculating its critical values, which makes the test more sensitive but means critical values must be obtained for each distribution .[3]
For the normal family with both parameters estimated (Case 3 in Stephens’s classification), the remedy is a modified statistic compared with its own percentage points. Stephens’s modification is
and the asymptotic upper percentage points of are , , , and at the , , , and levels, from Stephens’s table for this case .[5] The NIST/SEMATECH e-Handbook prints no table of its own and defers to Stephens’s tables; its worked sample output should not be mixed with this line, since it is produced with a different adjustment of the statistic and quotes a different point, .[3] The multiplicative factor is a finite-sample correction, calibrated so that the single line of asymptotic points serves across the range Stephens tabulated for this case; his finite-sample comparisons for the case start at .[5] The factor itself is at , still below at , above for every , reaches a maximum of about near , and then decreases towards as grows. It is not a correction that makes the estimated-parameter case into Case 0, and the two lines of percentage points must never be interchanged. Comparing an unadjusted from a fitted normal against the Case 0 point at makes rejection almost impossible, since the correct point is ; comparing a fully specified against rejects far too often. Stephens’s own illustration of the normal case makes the scale of the correction concrete: for his sample of weights, with mean and sample standard deviation , the computing formula gives , which the factor raises to [5] — Stephens prints the pair rounded, as and . Read against the points above, lies just above the point : the example rejects at the level, narrowly.
The contrast with the Kolmogorov–Smirnov test is instructive. For a fully specified , both tests are distribution-free. Once parameters are estimated, both lose that property; the difference is in what the literature supplies. For the Anderson–Darling statistic, Stephens tabulated modifications and percentage points family by family — normal, exponential, extreme value, logistic and others — so the estimated-parameter test is a tabulated test, not a simulation exercise, for the families covered .[5] For a family outside the tables, or an estimation method other than the fitting convention the tables assume, neither line of points applies and the null distribution must be obtained by parametric simulation. The handbook lists the families for which tables are available as the normal, uniform, lognormal, exponential, Weibull, extreme value type I, generalised Pareto and logistic distributions .[3]
More than one sample
The construction extends from comparing one sample with a distribution to comparing several samples with each other. In the -sample problem, samples are tested for the hypothesis that all were drawn from a single, unspecified continuous distribution. Scholz and Stephens developed this version in 1987: the pooled sample supplies the reference empirical distribution, each sample’s EDF is compared with it in the Anderson–Darling weighting, and the contributions are combined into one statistic whose null distribution is tabulated .[6] The two-sample case, , is the direct analogue of a two-sample Kolmogorov–Smirnov test with tail weighting in place of the supremum. Because the reference distribution is estimated from the pooled data rather than specified in advance, the -sample statistic is a rank-type statistic: it depends on the ordering of the pooled observations, not on their spacing. Its percentage points are a separate table again, and neither the Case 0 line nor the normal-case line applies to it .[6]
Statistical use
When to use it. The test is indicated when the hypothesis is a fully specified continuous distribution, or a tabulated family with estimated parameters, and when departures in the tails matter scientifically: a reliability specification that fails through early failures and extreme lifetimes, a distributional assumption whose failure mode is skewness or heavy tails, or a uniformity hypothesis, as in the worked example, where either end of the range is informative. For the composite normal hypothesis it is the standard EDF alternative to the Shapiro–Wilk test, with a different sensitivity profile rather than a uniformly better one. In Stephens’s power comparisons of EDF statistics against departures from normality, was among the best of the EDF statistics across a wide range of alternatives, with the Cramér–von Mises statistic its closest competitor .[5] A later comparison of normality tests likewise found the Anderson–Darling test consistently more powerful than the Kolmogorov–Smirnov and Lilliefors tests, though less powerful than Shapiro–Wilk, across the alternatives and sample sizes studied .[7] Neither comparison licenses a claim of universal superiority: power is a property of a test paired with an alternative, and a test weighted towards the tails gives up sensitivity to discrepancies concentrated near the centre.
Eight proportions against a specified uniform distribution
A measuring instrument reports the fractional part of each reading, and the manufacturer’s specification is that these fractional parts follow the uniform distribution on : the distribution function is for , fully specified, with no parameter to estimate. Eight fractional parts are recorded:
The sample is already in increasing order. Since , the values are the observations themselves. Every observation lies below : the entire upper half of the specified distribution is empty, which is precisely the kind of tail failure the weight is built to charge for. The sum in the computing formula is evaluated term by term. For term , the table gives , (note the reversed index: term pairs the th smallest value with the th largest), and the product .
| 1 | 0.03 | |||
| 2 | 0.09 | |||
| 3 | 0.16 | |||
| 4 | 0.23 | |||
| 5 | 0.30 | |||
| 6 | 0.37 | |||
| 7 | 0.43 | |||
| 8 | 0.49 |
The eight terms sum to , so
Against the Case 0 percentage points, exceeds the point and falls below the point .[2] The test therefore rejects the specified uniform distribution at the level, but not at the level. The reading of the table shows where the evidence sits: no single term is extreme, because no observation is close to or ; instead every is small in magnitude while the corresponding behaves as though the sample occupied only the lower half of the range. The discrepancy is a missing upper tail, accumulated across all eight terms rather than concentrated in one outlier. Two qualifications belong with the conclusion. The percentage points are asymptotic, and is small; the comparison is the standard tabulated procedure, not an exact finite-sample probability. And the rejection identifies a failure of the uniform specification, not its cause: a truncated recording range, a miscalibrated instrument and a genuinely non-uniform fractional part all produce samples of this shape.
Your turn
A second instrument, specified the same way, gives eight fractional parts:
Compute term by term and test the uniform specification at the level, and at the level.
The terms are , , , , , , and , summing to . Hence . This is below the Case 0 point of , so the test does not reject at the level, and a fortiori not at the level. The sample spreads across most of the range with no empty tail, and the statistic records no evidence against the specification. As always, failing to reject does not establish that the fractional parts are uniform; with the test has little power against modest departures.
Common misconceptions
“The Anderson–Darling test is distribution-free.” Only in Case 0. The statement is exact when is fully specified and false when parameters are estimated, where the null distribution depends on the family tested. Quoting the distribution-free property while comparing a fitted normal sample against Case 0 points combines the two errors at once.
“A larger always means a worse fit than a smaller one from another test.” Values of are comparable only within one case and one family, against that case’s percentage points. At , a raw from a fitted normal sample (Case 3) becomes , exceeding the approximate point , so the test rejects at that level. For a fully specified hypothesis (Case 0), the same raw stays unadjusted and is below the approximate point , so the test does not reject even at that level. The number carries no significance until its case is named.
“Because the test weights the tails, it is the most powerful goodness-of-fit test.” Tail weighting buys power against tail alternatives at the cost of power against central ones. Stephens’s comparisons found among the best EDF statistics overall, not best against every alternative ,[5] and against normality specifically the Shapiro–Wilk test was more powerful in the comparisons of Razali and Wah .[7]
“Estimating the parameters first is a minor detail, since the same formula is used.” The formula is the same; the null distribution is not. Estimation pulls the fitted distribution towards the sample, shrinks , and moves the point for the normal family from to . Ignoring the estimation does not make the test slightly conservative; it makes it nearly incapable of rejecting.
“The test is a test of normality.” Normality is its most common application, not its definition. The statistic tests any specified continuous distribution, and the uniform case of the worked example is historically the first: the 1954 paper’s tabulation was for the distribution-free test of a completely specified hypothesis .[2]
Assumptions and limits
Assumptions. The observations must be independent, and the hypothesised distribution must be continuous. Continuity is not a technicality: with a discrete or heavily tied distribution, the probability integral transformation does not produce uniform values, the computing formula’s logarithms are distorted by ties, and neither line of percentage points applies. The data must be ungrouped and uncensored in the basic form of the test; censored-data versions exist but are different procedures with different tables. For the estimated-parameter cases, the tabulated modifications assume the parameters were estimated from the same sample by the fitting convention of the table — for the normal case above, the sample mean and the sample standard deviation with divisor ; other estimators, or estimates from other data, fall outside the tables.
Exact and approximate elements. For a fully specified , the computing formula is exact and the distribution-free property is exact; what is approximate is the use of asymptotic percentage points at small , and, for the normal case, Stephens’s modification, which is a calibrated approximation designed to make one line of points serve across the tabulated range, for which Stephens’s finite-sample comparisons start at .[5] A -value produced by software for is likewise an approximation to the null tail probability, obtained from an approximating distribution or a simulation, and two programs can return slightly different -values for the same statistic while agreeing on every tabulated comparison. Marsaglia and Marsaglia’s computational study of the null distribution was motivated by exactly this point: the limiting distribution has no closed form, and accurate tail probabilities require the numerical methods they supply .[4]
What a result does not show. A rejection locates no discrepancy: is a single number, and the worked example’s missing upper tail and a sample with one extreme outlier can produce similar values. The EDF itself, or a quantile plot against , must be examined to say how the fit fails. A failure to reject, symmetrically, is compatibility with at the power the sample size affords, not confirmation of .
Connections
- Kolmogorov–Smirnov test: the supremum-based EDF test. Both are distribution-free for a fully specified distribution and lose that property when parameters are estimated; they differ in geometry, a single largest gap against a tail-weighted integral of all gaps.
- Shapiro–Wilk test: the other standard test of the composite normal hypothesis. Shapiro–Wilk summarises a normal quantile plot through order-statistic regression; Anderson–Darling compares the EDF with the fitted normal distribution function under tail weighting. Power comparisons favour Shapiro–Wilk against many normal alternatives and Anderson–Darling where tail behaviour is the concern.
- Normal quantile plot: the graphical companion for the normal case. Where gives one tail-weighted number, the plot shows whether a failure is curvature, an S-shape, or isolated extreme points.
- Normal distribution: the family in the most common composite application, Case 3 above, with using the sample mean and sample standard deviation, and with .
- Uniform distribution: the fully specified hypothesis of the worked example, and, through the probability integral transformation, the distribution that makes the Case 0 null distribution the same for every continuous .
Check yourself
- A sample of size is tested against a fully specified distribution and gives . A second sample of the same size is tested against the normal family with mean and variance estimated, and after Stephens’s modification gives . What does the test conclude in each case?
The two values are read against different lines of percentage points. In the fully specified case the point is , and , so the test does not reject. In the normal estimated-parameter case the point for is , and — indeed exceeds the point — so the test rejects, at the level. The identical number is unremarkable in one case and extreme in the other, because estimating the parameters shrinks the statistic’s null distribution.
- Two samples from the same continuous distribution are compared with a fully specified . In the first, the EDF differs from mainly near the median; in the second, by the same maximum amount but in the far tails. Which sample tends to give the larger , and which test would treat the two samples more nearly alike?
The second sample tends to give the larger . The Anderson–Darling integral divides the squared discrepancy by , which is small in the tails, so a tail discrepancy of a given size contributes far more than the same discrepancy near the median, where the divisor is near its maximum of . The Kolmogorov–Smirnov statistic treats the two more nearly alike: it records only the largest absolute gap , with no weight depending on where the gap occurs.
- A colleague fits a normal distribution to a sample of size , estimating the mean from the data and the standard deviation by the sample standard deviation with divisor , computes from the computing formula, and reports no evidence against normality because is well below the point of . Identify the error and state the correct procedure.
The error is the case confusion: is the point for a fully specified distribution, but the colleague estimated the mean and variance from the data, so the fully specified null distribution does not apply. The correct procedure is to form Stephens’s modified statistic and compare it with the normal-case points, whose point is and point is . At the multiplier is , so , which exceeds even the point : the correct test in fact rejects normality at the level — the opposite of the reported conclusion.
History
The test originates in the empirical-process theory of the early 1950s. Anderson and Darling’s 1952 paper in The Annals of Mathematical Statistics treated the problem of testing whether independent observations have a specified continuous distribution function, and derived the asymptotic theory of criteria based on the empirical process, including both supremum criteria and quadratic criteria with a general weight function .[1] The choice singled out the statistic now called .
The 1952 theory left the null distribution in a form that was difficult to use. In 1954 the same authors published the practical companion in the Journal of the American Statistical Association: large-sample significance points for the statistic, tabulated from numerical integration, and an explicit statement of the property that has defined the test’s use since — it uses the observations without grouping and is sensitive to discrepancies at the tails rather than near the median .[2] Lewis’s 1961 study of the finite-sample distribution showed that it approaches the asymptotic distribution rapidly, which is what licenses the use of one line of asymptotic points at moderate sample sizes; the result is reported and relied on in Stephens’s later survey of the statistic .[5]
The test’s modern form is largely Stephens’s work of the 1970s. His 1974 comparison of EDF statistics systematised the case distinctions — fully specified distribution, and families with one or both parameters estimated — supplied the modifications such as that reduce each case to a single line of percentage points, and established through power studies that performs as well as any EDF statistic across a broad range of alternatives .[5] Stephens extended the tabulations to further families in subsequent papers, and the technique was collected in the 1986 volume Goodness-of-Fit Techniques, edited by D’Agostino and Stephens. Scholz and Stephens added the -sample version in 1987 .[6] Computation of accurate -values for the limiting distribution remained awkward until Marsaglia and Marsaglia published direct methods for evaluating the distribution in 2004, including the correction of the long-reprinted point noted above .[4] The handbook treatment in the NIST/SEMATECH e-Handbook, which presents the test alongside the Kolmogorov–Smirnov and chi-squared goodness-of-fit tests and defers to Stephens’s tables, reflects its settled place in applied practice .[3]
See also
Line chart · Apriori algorithm · Asymptotic analysis · Average treatment effect · Base rate · Bayesian inference · Bayesian model · Bayesian probability
References
- ^ a b c d a. (pp. 193–212) b. (pp. 193–212) c. (pp. 193–212) d. (pp. 193–212) 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. https://doi.org/10.1214/aoms/1177729437
- ^ a b c d e f a. (pp. 765–769) b. (p. 766) c. (p. 766) d. (p. 766) e. (pp. 765–769) f. (pp. 765–769) Anderson, T. W. & Darling, D. A. (1954). A Test of Goodness of Fit. Journal of the American Statistical Association, 49(268), 765–769. https://doi.org/10.1080/01621459.1954.10501232
- ^ a b c d e a. (§1.3.5.14) b. (§1.3.5.14) c. (§1.3.5.14) d. (§1.3.5.14) e. (§1.3.5.14) NIST/SEMATECH (2002). NIST/SEMATECH e-Handbook of Statistical Methods, §1.3.5.14: Anderson-Darling Test. National Institute of Standards and Technology. https://www.itl.nist.gov/div898/handbook/eda/section3/eda35e.htm
- ^ a b c a. (§1) b. (§2) c. (§1) Marsaglia, G. & Marsaglia, J. (2004). Evaluating the Anderson-Darling Distribution. Journal of Statistical Software, 9(2). https://doi.org/10.18637/jss.v009.i02
- ^ a b c d e f g h i j a. (pp. 730–737) b. (p. 732) c. (p. 733, Table 2) d. (pp. 730–737) e. (pp. 730–737) f. (pp. 730–737) g. (pp. 730–737) h. (p. 733, Table 2) i. (pp. 730–737) j. (pp. 730–737) Stephens, M. A. (1974). EDF Statistics for Goodness of Fit and Some Comparisons. Journal of the American Statistical Association, 69(347), 730–737. https://doi.org/10.1080/01621459.1974.10480196
- ^ a b c a. (pp. 918–924) b. (pp. 918–924) c. (pp. 918–924) Scholz, F. W. & Stephens, M. A. (1987). K-Sample Anderson-Darling Tests. Journal of the American Statistical Association, 82(399), 918–924. https://doi.org/10.1080/01621459.1987.10478517
- ^ a b a. (pp. 21–33) b. (pp. 21–33) Razali, Nornadiah Mohd & Wah, Yap Bee (2011). Power comparisons of Shapiro-Wilk, Kolmogorov-Smirnov, Lilliefors and Anderson-Darling tests. Journal of Statistical Modeling and Analytics, 2(1), 21–33. http://www.de.ufpb.br/~ulisses/disciplinas/normality_tests_comparison.pdf
Cite this page
StatWiki (2026). "Anderson–Darling test." StatWiki. Last updated 2 December 2026. https://www.statwiki.io/articles/anderson-darling-test.html
@misc{statwiki_anderson_darling_test,
author = {{StatWiki}},
title = {{Anderson–Darling test}},
year = {2026},
url = {https://www.statwiki.io/articles/anderson-darling-test.html},
urldate = {2026-12-02},
note = {StatWiki, last updated 2 December 2026}
}