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 X1,…,XnX_1, \ldots, X_n be independent observations from a continuous distribution, let FF be a continuous distribution function specified by the null hypothesis, and let FnF_n be the empirical distribution function of the sample, Fn(x)=n−1∑i=1n1{Xi≤x}F_n(x) = n^{-1} \sum_{i=1}^{n} \mathbf{1}\{X_i \le x\}, where 1{⋅}\mathbf{1}\{\cdot\} is the indicator of the event in braces. The null hypothesis is the simple hypothesis H0H_0: the XiX_i have distribution function FF, 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 n1/2(Fn(x)−F(x))n^{1/2}(F_n(x) - F(x)) .[1] The test rejects for large values of its statistic: the further the empirical distribution sits from FF, in the tail-weighted sense made precise below, the larger the statistic.

Two features organise everything that follows. First, when FF is fully specified, with no parameter estimated from the data, the null distribution of the statistic is the same for every continuous FF: 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 FF 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

Anderson–Darling test
Fact Value
Topic Statistical inference
Listed on Statistical inference

The quadratic EDF family and the Anderson–Darling weight

Write ψ(u)\psi(u) for a non-negative weight function defined for 0<u<10 < u < 1. The quadratic EDF statistics have the form

Q=n∫−∞∞(Fn(x)−F(x))2 ψ(F(x)) dF(x).Q = n \int_{-\infty}^{\infty} \bigl(F_n(x) - F(x)\bigr)^2 \, \psi\bigl(F(x)\bigr) \, dF(x).

The integral is taken with respect to FF itself, so the substitution u=F(x)u = F(x) turns it into an integral over (0,1)(0, 1): each point xx 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 ψ\psi give the three classical statistics. The Cramér–von Mises statistic takes ψ(u)=1\psi(u) = 1: every part of the distribution contributes in proportion to its probability. The Kolmogorov–Smirnov statistic is not an integral but a supremum, D=sup⁡x∣Fn(x)−F(x)∣D = \sup_x |F_n(x) - F(x)|, which is again a comparison on the uu 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 FnF_n is most variable, near the median. The Anderson–Darling statistic takes

ψ(u)=1u(1−u),A2=n∫−∞∞(Fn(x)−F(x))2F(x)(1−F(x)) dF(x).\psi(u) = \frac{1}{u(1-u)}, \qquad A^2 = n \int_{-\infty}^{\infty} \frac{\bigl(F_n(x) - F(x)\bigr)^2}{F(x)\bigl(1 - F(x)\bigr)} \, dF(x).

The denominator F(x)(1−F(x))F(x)(1 - F(x)) is, up to the factor nn, the variance of Fn(x)F_n(x) under H0H_0: for each fixed xx, nFn(x)n F_n(x) is binomial with parameters nn and F(x)F(x). Dividing the squared discrepancy by that variance converts an absolute discrepancy into a relative one. Near the median, where F(x)≈1/2F(x) \approx 1/2, the weight is ψ(1/2)=4\psi(1/2) = 4; at F(x)=0.01F(x) = 0.01 or 0.990.99 it is about 101101; and it grows without bound as F(x)F(x) approaches 00 or 11. A tail discrepancy that would be invisible to the Cramér–von Mises integral, because dF(x)dF(x) 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 ψ\psi is unbounded, the statistic is driven disproportionately by the smallest and largest observations, through the values FF assigns to them. A single observation far into a tail of FF can dominate A2A^2. 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 A2A^2 is computed. Let x(1)≤x(2)≤⋯≤x(n)x_{(1)} \le x_{(2)} \le \cdots \le x_{(n)} be the ordered sample, and write zi=F(x(i))z_i = F(x_{(i)}) for the hypothesised distribution function evaluated at the iith ordered value. Evaluating the integral over the intervals on which FnF_n is constant gives the exact computing formula

A2=−n−1n∑i=1n(2i−1)[ln⁡zi+ln⁡(1−zn+1−i)].A^2 = -n - \frac{1}{n} \sum_{i=1}^{n} (2i - 1) \Bigl[ \ln z_i + \ln \bigl(1 - z_{n+1-i}\bigr) \Bigr].

No approximation is involved in passing from the integral to this sum: for a fully specified continuous FF the two expressions are the same number. The pairing inside the sum is the tail weighting in algebraic form. The iith term couples ln⁡zi\ln z_i, which is large in magnitude when the iith smallest observation falls far into the lower tail of FF, with ln⁡(1−zn+1−i)\ln(1 - z_{n+1-i}), which is large in magnitude when the iith largest falls far into the upper tail. The National Institute of Standards and Technology handbook states the same formula, in the equivalent form A2=−N−SA^2 = -N - S with SS 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 FF, but inside its support, can be assigned zi=0z_i = 0 or 11 exactly when FF is evaluated in floating-point arithmetic, because the computed values saturate at 00 and 11 even though the exact CDF is strictly between 0 and 1: for a normal FF, double-precision evaluation returns Φ(−40)=0\Phi(-40) = 0 although the true value is about 10−35010^{-350}. For this saturation the repair is numerical: compute the two logarithms in the sum directly, as the log-distribution value ln⁡F(x)\ln F(x) and the log-survival value ln⁡(1−F(x))\ln(1 - F(x)), from routines that evaluate those quantities without first forming FF itself. On that scale the same observation contributes ln⁡Φ(−40)≈−804.6\ln \Phi(-40) \approx -804.6, 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 FF — a value above 11 under a specified uniform distribution on (0,1)(0, 1), say — is assigned zi=0z_i = 0 or 11 because FF itself, and not its floating-point shadow, takes that value there. Such an observation is impossible under H0H_0, and it is therefore decisive evidence against the null rather than a breakdown of the computation: the integral defining A2A^2 diverges, because with the largest transformed value equal to 11 the integrand behaves like a positive constant times 1/(1−u)1/(1 - u) as uu approaches 11, and the computing formula returns +∞+\infty through the term ln⁡(1−z(n))=ln⁡0\ln(1 - z_{(n)}) = \ln 0. No repair is appropriate; the infinite value is the correct answer, read as rejection. The endpoint divergence is visible already at n=1n = 1, where the computing formula reduces to A2=−1−ln⁡(z(1−z))A^2 = -1 - \ln\bigl(z(1 - z)\bigr) for the single transformed value zz, which grows without bound as zz approaches either 00 or 11. And because the terms are logarithms, the statistic responds to the ratio scale of tail probabilities: halving an already small tail probability changes A2A^2 far more than halving a probability near 1/21/2.

Under H0H_0 with FF fully specified, the probability integral transformation gives that z1,…,znz_1, \ldots, z_n are the ordered values of a sample from the uniform distribution on (0,1)(0, 1), whatever FF was. The null distribution of A2A^2 is therefore a single distribution, free of FF. 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 1.6101.610, 1.9331.933, 2.4922.492, 3.0703.070 and 3.8573.857 at the 15%15\%, 10%10\%, 5%5\%, 2.5%2.5\% and 1%1\% 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 1%1\% point printed as 3.8573.857 in the early tables is more accurately 3.8783.878, while the 10%10\% and 5%5\% 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 1%1\% 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 μ\mu and variance σ2\sigma^2. The statistic is computed in the same way, with zi=Φ((x(i)−μ^)/σ^)z_i = \Phi\bigl((x_{(i)} - \hat{\mu}) / \hat{\sigma}\bigr), where μ^=xˉ\hat{\mu} = \bar{x} and σ^=s\hat{\sigma} = s, the sample standard deviation with divisor n−1n - 1, and Φ\Phi 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 n−1n - 1 fitting convention (his Case 3, pp. 730–731), and standardising with the maximum-likelihood divisor nn instead gives a differently calibrated statistic to which that line of points does not strictly apply. But the ziz_i are then no longer a sample from the uniform distribution, even when the data are exactly normal: because xˉ\bar{x} and ss were fitted to these data, the standardised values are drawn towards the centre, the ziz_i are more evenly spread than a uniform sample, and A2A^2 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

A2∗=A2(1+4n−25n2),A^{2*} = A^2 \left(1 + \frac{4}{n} - \frac{25}{n^2}\right),

and the asymptotic upper percentage points of A2∗A^{2*} are 0.5760.576, 0.6560.656, 0.7870.787, 0.9180.918 and 1.0921.092 at the 15%15\%, 10%10\%, 5%5\%, 2.5%2.5\% and 1%1\% 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 5%5\% point, 0.7520.752 .[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 n=10n = 10 .[5] The factor itself is 0.80.8 at n=5n = 5, still below 11 at n=6n = 6, above 11 for every n≥7n \ge 7, reaches a maximum of about 1.161.16 near n=12n = 12, and then decreases towards 11 as nn 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 A2A^2 from a fitted normal against the Case 0 point 2.4922.492 at 5%5\% makes rejection almost impossible, since the correct 5%5\% point is 0.7870.787; comparing a fully specified A2A^2 against 0.7870.787 rejects far too often. Stephens’s own illustration of the normal case makes the scale of the correction concrete: for his sample of n=11n = 11 weights, with mean 172172 and sample standard deviation 24.9524.95, the computing formula gives A2=0.9468A^2 = 0.9468, which the factor 1+4/11−25/121=1.15701 + 4/11 - 25/121 = 1.1570 raises to A2∗=1.0954A^{2*} = 1.0954 [5] — Stephens prints the pair rounded, as 0.9470.947 and 1.0951.095. Read against the points above, 1.09541.0954 lies just above the 1%1\% point 1.0921.092: the example rejects at the 1%1\% level, narrowly.

The contrast with the Kolmogorov–Smirnov test is instructive. For a fully specified FF, 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 kk-sample problem, kk 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, k=2k = 2, 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 kk-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, A2A^2 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 (0,1)(0, 1): the distribution function is F(x)=xF(x) = x for 0<x<10 < x < 1, fully specified, with no parameter to estimate. Eight fractional parts are recorded:

0.03,0.09,0.16,0.23,0.30,0.37,0.43,0.49.0.03,\quad 0.09,\quad 0.16,\quad 0.23,\quad 0.30,\quad 0.37,\quad 0.43,\quad 0.49.

The sample is already in increasing order. Since F(x)=xF(x) = x, the values zi=F(x(i))z_i = F(x_{(i)}) are the observations themselves. Every observation lies below 0.50.5: the entire upper half of the specified distribution is empty, which is precisely the kind of tail failure the weight ψ(u)=1/[u(1−u)]\psi(u) = 1/[u(1-u)] is built to charge for. The sum in the computing formula is evaluated term by term. For term ii, the table gives ln⁡zi\ln z_i, ln⁡(1−z9−i)\ln(1 - z_{9-i}) (note the reversed index: term ii pairs the iith smallest value with the iith largest), and the product (2i−1)[ln⁡zi+ln⁡(1−z9−i)](2i-1)[\ln z_i + \ln(1 - z_{9-i})].

Eight proportions against a specified uniform distribution
ii ziz_i ln⁡zi\ln z_i ln⁡(1−z9−i)\ln(1 - z_{9-i}) (2i−1)[ln⁡zi+ln⁡(1−z9−i)](2i-1)[\ln z_i + \ln(1 - z_{9-i})]
1 0.03 −3.5066-3.5066 −0.6733-0.6733 −4.1799-4.1799
2 0.09 −2.4079-2.4079 −0.5621-0.5621 −8.9102-8.9102
3 0.16 −1.8326-1.8326 −0.4620-0.4620 −11.4731-11.4731
4 0.23 −1.4697-1.4697 −0.3567-0.3567 −12.7845-12.7845
5 0.30 −1.2040-1.2040 −0.2614-0.2614 −13.1880-13.1880
6 0.37 −0.9943-0.9943 −0.1744-0.1744 −12.8547-12.8547
7 0.43 −0.8440-0.8440 −0.0943-0.0943 −12.1976-12.1976
8 0.49 −0.7133-0.7133 −0.0305-0.0305 −11.1571-11.1571

The eight terms sum to −86.7451-86.7451, so

A2=−8−18(−86.7451)=−8+10.8431=2.8431.A^2 = -8 - \frac{1}{8}(-86.7451) = -8 + 10.8431 = 2.8431.

Against the Case 0 percentage points, 2.84312.8431 exceeds the 5%5\% point 2.4922.492 and falls below the 1%1\% point 3.8573.857 .[2] The test therefore rejects the specified uniform distribution at the 5%5\% level, but not at the 1%1\% level. The reading of the table shows where the evidence sits: no single term is extreme, because no observation is close to 00 or 11; instead every ln⁡(1−z9−i)\ln(1 - z_{9-i}) is small in magnitude while the corresponding ln⁡zi\ln z_i 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 n=8n = 8 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:

0.10,0.19,0.28,0.37,0.45,0.54,0.63,0.72.0.10,\quad 0.19,\quad 0.28,\quad 0.37,\quad 0.45,\quad 0.54,\quad 0.63,\quad 0.72.

Compute A2A^2 term by term and test the uniform specification at the 5%5\% level, and at the 15%15\% level.

The terms (2i−1)[ln⁡zi+ln⁡(1−z9−i)](2i-1)[\ln z_i + \ln(1 - z_{9-i})] are −3.5756-3.5756, −7.9650-7.9650, −10.2475-10.2475, −11.1446-11.1446, −11.3449-11.3449, −10.3916-10.3916, −8.7458-8.7458 and −6.5080-6.5080, summing to −69.9229-69.9229. Hence A2=−8+69.9229/8=0.7404A^2 = -8 + 69.9229/8 = 0.7404. This is below the 15%15\% Case 0 point of 1.6101.610, so the test does not reject at the 15%15\% level, and a fortiori not at the 5%5\% 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 n=8n = 8 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 FF 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 A2A^2 always means a worse fit than a smaller one from another test.” Values of A2A^2 are comparable only within one case and one family, against that case’s percentage points. At n=10n = 10, a raw A2=1.5A^2 = 1.5 from a fitted normal sample (Case 3) becomes A2∗=1.5(1+4/10−25/100)=1.725A^{2*} = 1.5(1 + 4/10 - 25/100) = 1.725, exceeding the approximate 1%1\% point 1.0921.092, so the test rejects at that level. For a fully specified hypothesis (Case 0), the same raw A2=1.5A^2 = 1.5 stays unadjusted and is below the approximate 15%15\% point 1.6101.610, 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 A2A^2 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 A2A^2, and moves the 5%5\% point for the normal family from 2.4922.492 to 0.7870.787. 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 n−1n - 1; other estimators, or estimates from other data, fall outside the tables.

Exact and approximate elements. For a fully specified FF, the computing formula is exact and the distribution-free property is exact; what is approximate is the use of asymptotic percentage points at small nn, 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 n=10n = 10 .[5] A pp-value produced by software for A2A^2 is likewise an approximation to the null tail probability, obtained from an approximating distribution or a simulation, and two programs can return slightly different pp-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: A2A^2 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 FF, must be examined to say how the fit fails. A failure to reject, symmetrically, is compatibility with FF at the power the sample size affords, not confirmation of FF.

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 A2A^2 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 zi=Φ((x(i)−μ^)/σ^)z_i = \Phi((x_{(i)} - \hat{\mu})/\hat{\sigma}) using the sample mean and sample standard deviation, μ^=xˉ\hat{\mu} = \bar{x} and σ^=s\hat{\sigma} = s with s2=(n−1)−1∑i(xi−xˉ)2s^2 = (n - 1)^{-1}\sum_i (x_i - \bar{x})^2.
  • 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 FF.

Check yourself

  1. A sample of size n=20n = 20 is tested against a fully specified distribution and gives A2=2.10A^2 = 2.10. A second sample of the same size is tested against the normal family with mean and variance estimated, and after Stephens’s modification gives A2∗=2.10A^{2*} = 2.10. What does the 5%5\% test conclude in each case?

The two values are read against different lines of percentage points. In the fully specified case the 5%5\% point is 2.4922.492, and 2.10<2.4922.10 < 2.492, so the test does not reject. In the normal estimated-parameter case the 5%5\% point for A2∗A^{2*} is 0.7870.787, and 2.10>0.7872.10 > 0.787 — indeed 2.102.10 exceeds the 1%1\% point 1.0921.092 — so the test rejects, at the 1%1\% level. The identical number 2.102.10 is unremarkable in one case and extreme in the other, because estimating the parameters shrinks the statistic’s null distribution.

  1. Two samples from the same continuous distribution are compared with a fully specified FF. In the first, the EDF differs from FF mainly near the median; in the second, by the same maximum amount but in the far tails. Which sample tends to give the larger A2A^2, and which test would treat the two samples more nearly alike?

The second sample tends to give the larger A2A^2. The Anderson–Darling integral divides the squared discrepancy by F(x)(1−F(x))F(x)(1 - F(x)), 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 1/41/4. The Kolmogorov–Smirnov statistic treats the two more nearly alike: it records only the largest absolute gap ∣Fn(x)−F(x)∣|F_n(x) - F(x)|, with no weight depending on where the gap occurs.

  1. A colleague fits a normal distribution to a sample of size n=10n = 10, estimating the mean from the data and the standard deviation by the sample standard deviation with divisor n−1n - 1, computes A2=1.40A^2 = 1.40 from the computing formula, and reports no evidence against normality because 1.401.40 is well below the 5%5\% point of 2.4922.492. Identify the error and state the correct procedure.

The error is the case confusion: 2.4922.492 is the 5%5\% 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 A2∗=A2(1+4/n−25/n2)A^{2*} = A^2 (1 + 4/n - 25/n^2) and compare it with the normal-case points, whose 5%5\% point is 0.7870.787 and 1%1\% point is 1.0921.092. At n=10n = 10 the multiplier is 1+4/10−25/100=1.151 + 4/10 - 25/100 = 1.15, so A2∗=1.40×1.15=1.610A^{2*} = 1.40 \times 1.15 = 1.610, which exceeds even the 1%1\% point 1.0921.092: the correct test in fact rejects normality at the 1%1\% 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 ψ\psi .[1] The choice ψ(u)=1/[u(1−u)]\psi(u) = 1/[u(1-u)] singled out the statistic now called A2A^2.

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 A2∗A^{2*} that reduce each case to a single line of percentage points, and established through power studies that A2A^2 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 kk-sample version in 1987 .[6] Computation of accurate pp-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 1%1\% 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

Glossary and index

References

  1. ^ 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
  2. ^ 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
  3. ^ 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
  4. ^ 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
  5. ^ 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
  6. ^ 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
  7. ^ 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
Plain text
StatWiki (2026). "Anderson–Darling test." StatWiki. Last updated 2 December 2026. https://www.statwiki.io/articles/anderson-darling-test.html
BibTeX
@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}
}