Skip to main content
v2026.11,986 entries · CC-BY 4.0

Anderson-Darling Test: Formula & Normality

The Anderson-Darling test checks whether data follows a target distribution, providing greater tail sensitivity than traditional Kolmogorov-Smirnov tests.

Written and maintained by CASRAI Editorial Board

Published

On this page

Definition in one paragraph

The Anderson-Darling test is an empirical distribution function (EDF) goodness-of-fit test developed by Theodore Anderson and Donald Darling in 1952 that assesses whether an observed continuous dataset originates from a population with a specified theoretical distribution, such as the normal, exponential, or Weibull distribution. As a weighted modification of the Kolmogorov-Smirnov test, it calculates the squared distance between the sample empirical cumulative distribution function (ECDF) and the hypothesized theoretical cumulative distribution function (CDF), applying an inverse-variance weighting function that places substantially greater mathematical weight on discrepancies occurring in the distribution tails. In research practice, an Anderson-Darling normality test evaluates the null hypothesis (H₀) that sample observations come from a normal distribution against the alternative (Hₐ) that they do not, producing a test statistic A² where larger values denote greater departure from normality.

Ask CASRAI · free to tryQuestion about this guide? Ask CASRAI answers with linked sources. 2 free questions a day, no account.

Ask your first question freeSubscribe

Formula with every symbol explained

The Anderson-Darling test statistic belongs to the Cramér-von Mises class of empirical distribution function statistics. The theoretical integral across the real support is defined as:

A² = n ∫₋∞^∞ [Fₙ(x) – F(x)]² ψ(F(x)) dF(x)

where the weighting function ψ(u) equals 1 / [u(1 – u)]. Each symbol represents:

  • n: Sample size of independent observations.
  • Fₙ(x): Empirical cumulative distribution function (ECDF) from sample observations: Fₙ(x) = (1/n) ∑ᵢ₌₁ⁿ I(Yᵢ ≤ x).
  • F(x): Hypothesized cumulative distribution function (CDF) evaluated at x.
  • ψ(u): Weighting function [u(1 – u)]⁻¹. Because u(1 – u) represents the asymptotic variance of the ECDF, dividing by it gives heavy weight to the tails (u → 0 and u → 1), making the test far more sensitive to tail deviations than the unweighted Kolmogorov-Smirnov test.
  • dF(x): Probability density differential under the null model.

For computation on ordered data (Y₁ ≤ Y₂ ≤ … ≤ Yₙ), the integral reduces algebraically to:

A² = -n – S

where the summation term S is computed as:

S = (1/n) ∑ᵢ₌₁ⁿ (2i – 1) [ln F(Yᵢ) + ln(1 – F(Yₙ₊₁₋ᵢ))]

The symbols in this formula represent:

  • i: Ascending rank index from 1 to n.
  • Yᵢ: Ordered sample observation (Y₁ is minimum, Yₙ is maximum).
  • F(Yᵢ): Theoretical CDF value for Yᵢ (standard normal CDF Φ(Zᵢ) after z-score standardization).
  • Yₙ₊₁₋ᵢ: Reverse-ranked observation (for i = 1, this is Yₙ; for i = n, this is Y₁).
  • 1 – F(Yₙ₊₁₋ᵢ): Upper-tail survival probability for observation Yₙ₊₁₋ᵢ.
  • ln: Natural logarithm (base e).

When mean and variance are estimated from sample data (composite normality), M. A. Stephens (1974) derived the adjusted statistic A*² to correct for parameter estimation:

A*² = A² × (1 + 0.75/n + 2.25/n²)

Worked example with real numbers and the arithmetic shown

Consider an experiment measuring response times (in seconds) across n = 8 participants:

Y = [12.20, 14.50, 15.10, 16.00, 16.80, 17.50, 18.20, 20.10]

  • Sample size: n = 8
  • Mean: Ȳ = 130.40 / 8 = 16.3000
  • Standard deviation: s = √[41.3200 / 7] = 2.4296
i Yᵢ Zᵢ F(Yᵢ) Y₉₋ᵢ 1 – F(Y₉₋ᵢ) ln F(Yᵢ) ln[1 – F(Y₉₋ᵢ)] (2i – 1)/n Term Value
1 12.20 -1.6875 0.0458 20.10 0.0589 -3.0846 -2.8319 0.1250 -0.7396
2 14.50 -0.7409 0.2294 18.20 0.2171 -1.4723 -1.5274 0.3750 -1.1249
3 15.10 -0.4939 0.3107 17.50 0.3107 -1.1690 -1.1690 0.6250 -1.4612
4 16.00 -0.1235 0.4509 16.80 0.4185 -0.7966 -0.8711 0.8750 -1.4593
5 16.80 0.2058 0.5815 16.00 0.5491 -0.5421 -0.5994 1.1250 -1.2842
6 17.50 0.4939 0.6893 15.10 0.6893 -0.3721 -0.3721 1.3750 -1.0232
7 18.20 0.7820 0.7829 14.50 0.7706 -0.2447 -0.2606 1.6250 -0.8211
8 20.10 1.5641 0.9411 12.20 0.9542 -0.0607 -0.0468 1.8750 -0.2016

Summing the term values: S = -8.1151.

Raw statistic: A² = -n – S = -8 – (-8.1151) = 0.1151.

Stephens multiplier: 1 + (0.75 / 8) + (2.25 / 64) = 1.1289.

Adjusted statistic: A*² = 0.1151 × 1.1289 = 0.1299.

Interpretation (what the result means)

The Anderson-Darling test is an upper-tailed test: smaller test statistics indicate close agreement with the specified distribution, while larger values indicate departures.

Significance Level (α) Critical Value (A*²) Decision Rule Reading
0.15 (15%) 0.560 Reject H₀ if A*² > 0.560 Sensitive screening threshold detecting minor tail asymmetry.
0.10 (10%) 0.631 Reject H₀ if A*² > 0.631 Moderate threshold common in quality engineering.
0.05 (5%) 0.752 Reject H₀ if A*² > 0.752 Standard research threshold for parametric tests.
0.025 (2.5%) 0.873 Reject H₀ if A*² > 0.873 Stringent threshold requiring distinct non-normality evidence.
0.01 (1%) 1.035 Reject H₀ if A*² > 1.035 Conservative threshold; rejects only under severe departure.

In our sample, A*² = 0.1299. Comparing this to the α = 0.05 critical value of 0.752:

0.1299 ≤ 0.752

Because A*² does not exceed 0.752, we fail to reject the null hypothesis at the 5% level. Sample data do not exhibit significant evidence of non-normality. Failing to reject H₀ does not prove normality; it shows departures fall within expected sampling variation. Combine formal tests with visual diagnostics like a normal P-P plot and methods for identifying the distribution of your data.

Assumptions and common mistakes

Valid application requires satisfying core assumptions and avoiding analytical mistakes:

  • Continuous Variable: The distribution must be continuous with a strictly increasing CDF.
  • Independent Observations: Values must be independent and identically distributed (i.i.d.) without clustering or autocorrelation.
  • Parameter Status: Distinguish between specified parameters (Case 1) and sample-estimated parameters (Case 3); critical thresholds differ.
  • Ties Trap: Rounding or rating scales create tied values, causing jumps in the ECDF and distorting log calculations. If ties exceed 5%, results may be biased.
  • Using Case 1 Values on Case 3 Tests: Using unadjusted tables (such as 2.492 at α = 0.05) when estimating parameters inflates Type II error. Always use Stephens adjusted values.
  • Sample Size Influences: Small samples (n < 20) suffer from low power, whereas large samples (n > 1,000) detect minor deviations that do not invalidate t-tests or ANOVA.
  • Testing Raw Variables Instead of Residuals: In regression, normality applies to residual errors, not raw variables.
  • Ignoring Alternatives: While Anderson-Darling excels at detecting tail discrepancies, the Shapiro-Wilk test offers higher power against general skewness in small samples.

How to report it (APA example)

In APA 7th style, report the test name, statistic (adjusted A*²), sample size N, and exact p-value or threshold. Italicize statistical symbols (A, p, N) and omit leading zeros for p-values.

Narrative: “An Anderson-Darling normality test indicated that baseline reaction times did not significantly depart from a normal distribution, A*² = 0.13, p > .05, N = 8.”

Parenthetical: “Model residuals met the assumption of normality (Anderson-Darling A*² = 0.42, p = .318, N = 64).”

Rejection: “Biomarker levels deviated significantly from normality (Anderson-Darling A*² = 1.84, p < .001, N = 92); non-parametric Wilcoxon tests were conducted.”

How to calculate it in Excel, R or Python

Researchers can calculate the Anderson-Darling test across common computational tools.

How to Calculate it in Excel

Because Excel lacks a native Anderson-Darling function (see our guide to normality testing in Excel), execute these steps:

  1. Place sorted observations in cells A2:A9. In C1, enter =AVERAGE(A2:A9); in C2, enter =STDEV.S(A2:A9).
  2. In B2, compute normal CDF: =NORM.S.DIST((A2-$C$1)/$C$2, TRUE) and fill down to B9.
  3. In C2, compute reverse upper probability: =1 - NORM.S.DIST((INDEX($A$2:$A$9, 8+1-ROW(A1))-$C$1)/$C$2, TRUE) and fill down.
  4. In D2, compute term: =((2*ROW(A1)-1)/8) * (LN(B2) + LN(C2)) and fill down.
  5. In D10, sum terms: =SUM(D2:D9). Compute raw A² in D11: =-8 - D10.
  6. Compute adjusted A*² in D12: =D11 * (1 + 0.75/8 + 2.25/64).

How to Calculate it in R

In R, use the nortest package to perform composite normality testing (requires n > 7):

# Install and load nortest
if (!requireNamespace("nortest", quietly = TRUE)) install.packages("nortest")
library(nortest)

# Sample observations
y <- c(12.20, 14.50, 15.10, 16.00, 16.80, 17.50, 18.20, 20.10)

# Run Anderson-Darling test
res <- ad.test(y)
print(res)

# Output test statistic and p-value
cat(sprintf("A = %.4f, p-value = %.4fn", res$statistic, res$p.value))

How to Calculate it in Python

In Python, calculate the statistic and critical values using scipy.stats.anderson:

import numpy as np
from scipy import stats

# Sample observations
y = np.array([12.20, 14.50, 15.10, 16.00, 16.80, 17.50, 18.20, 20.10])

# Perform Anderson-Darling test for normality
result = stats.anderson(y, dist='norm')

print(f"Anderson-Darling Statistic A²: {result.statistic:.4f}")
for sl, cv in zip(result.significance_level, result.critical_values):
    status = "Reject H0 (Non-normal)" if result.statistic > cv else "Fail to reject H0 (Normal)"
    print(f"Alpha {sl:4.1f}%: Critical Value = {cv:.3f} -> {status}")

FAQ

How does the Anderson-Darling test differ from the Kolmogorov-Smirnov test?

The Kolmogorov-Smirnov test evaluates the maximum vertical difference between empirical and theoretical CDFs, which typically occurs near the median. The Anderson-Darling test integrates squared deviations across the entire range and weights them by the reciprocal of theoretical variance, yielding much greater power to detect tail departures.

When should researchers prefer Anderson-Darling over Shapiro-Wilk?

Anderson-Darling is preferred when tail discrepancies are critical, such as in risk modeling, survival analysis, or heavy-tailed distributions. For broad normality screening in small samples (n < 50), Shapiro-Wilk often offers slightly higher overall sensitivity.

What minimum sample size is needed for an Anderson-Darling normality test?

Standard packages like R’s nortest::ad.test require at least n > 7 observations. In research design, samples with n < 20 provide limited power to detect moderate departures from normality.

Can the Anderson-Darling test evaluate distributions other than normal?

Yes. The test accommodates exponential, Weibull, lognormal, uniform, logistic, and extreme value distributions using distribution-specific critical values or adjustment formulas.

How should researchers handle ties in sample observations?

The test assumes continuous data without identical values. If ties represent under 5% of the dataset, distortion is minimal. For extensive ties, researchers should consider jittering techniques or non-parametric alternatives.

Sources

  • NIST/SEMATECH e-Handbook of Statistical Methods, Section 1.3.5.14: “Anderson-Darling Test”, https://www.itl.nist.gov/div898/handbook/eda/section3/eda35e.htm (read 2026-11-10).
  • Stephens, M. A. (1974). “EDF Statistics for Goodness of Fit and Some Comparisons”. Journal of the American Statistical Association, 69(347), 730–737.
  • 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.
  • Anderson, T. W., & Darling, D. A. (1954). “A Test of Goodness of Fit”. Journal of the American Statistical Association, 49(268), 765–769.
  • SciPy Community. (2026). scipy.stats.anderson reference documentation, https://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.anderson.html (read 2026-11-10).
  • Gross, J., & Ligges, U. (2015). nortest: Tests for Normality, CRAN reference manual, https://cran.r-project.org/package=nortest (read 2026-11-10).

Follow CASRAI

Research-administration guidance, standards updates and independent tool reviews.

Ask CASRAI · free to try

Ask about Anderson-Darling Test: Formula & Normality

2 free questions a day, no account.

An AI assistant for research: funder rules, compliance, methods and publishing. It links the sources behind its answers and labels answers that come from a web search.

Answers draw on CASRAI's guides and dictionary plus the federal and funder documents we index: Federal Register, Grants.gov, Regulations.gov and UKRI.

Works on this site and inside Claude, Cursor and the AI tools you already use.

Everything CASRAI publishes — this page, the dictionary, the guides and the news — stays open to read, with no account and no card.

Referenced across the research world

University of Cambridge logoColumbia University logoCrossref logoUniversity of Edinburgh logoHarvard University logoUniversity of Oxford logoPrinceton University logoStanford School of Medicine logoUniversity College London logoORCID logoUniversity of Cambridge logoColumbia University logoCrossref logoUniversity of Edinburgh logoHarvard University logoUniversity of Oxford logoPrinceton University logoStanford School of Medicine logoUniversity College London logoORCID logo
  • University of Cambridge logo
  • Columbia University logo
  • Crossref logo
  • University of Edinburgh logo
  • Harvard University logo
  • University of Oxford logo
  • Princeton University logo
  • Stanford School of Medicine logo
  • University College London logo
  • ORCID logo

View CASRAI adoption →