ADescribe · Guide test 109
Anderson–Darling normality test
Tests normality using an empirical distribution discrepancy that emphasizes the tails.
Do it in CodeSplash
In the app, set it up in Analyze with one of these methods:
- Normality tests (battery) — Is a numeric variable (or each group of it) plausibly normal — by tests and by shape?
- Normality test (one test) — Is a numeric variable (or each group of it) plausibly normally distributed?
In Normality test (one test), choose Test = Anderson–Darling.
Do it in CodeSplash Run this test on your own data, in Python or R.
Bench
Change the design, drag the data, move α. The statistic, its reference distribution and the verdict follow.
Bench · Anderson–Darling normality test
Sinh–arcsinh shape: 0 is symmetric.
Below 1: heavier tails than normal; 1 with ε = 0 is exactly normal.
Your data
Drag a point or use ↑/↓ to change itIf H₀ were true
- The reference: how A² varies across samples when H₀ is true (Null Atlas: quantiles simulated with 200,000 replicates).
- Your statistic, from the data above.
- The p-value: the area at least as extreme as yours (p = .114).
- The hatched rejection region at α = .050: statistics landing here reject H₀.
The formula
With your numbers
- the standardized data, sorted
- the standard normal CDF
- a weighted distance that counts tail gaps more heavily
The verdict
A² = 0.60, p = .114
p > α = .050: compatible with H₀
It weights the tails more than Lilliefors does, so it notices heavy tails sooner. As with every normality test, a small p with a large n can mean a trivial departure. The reference is simulated: the Null Atlas.
- Statistic
- 0.596
- p-value
- 0.1141
Anderson–Darling normality test on Sample: n = 40: A² = 0.60, p = .114. The p-value is above α = .050, so the data are compatible with H₀.
Question and hypotheses
H0: normality with fitted mean and variance.
Assumptions
Independent identically distributed continuous observations; H0 is a normal distribution with unknown mean and positive variance. Censoring, truncation, clustering and fitted regression residuals require different calibration.
Formula
Parameters and notation
ui=Φ((x(i)−x̄)/s). One common correction is A*²=A²(1+0.75/n+2.25/n²).
Structure of the method
Sort observations, estimate their normal location and scale, transform them through the fitted normal CDF, and accumulate a tail-weighted log discrepancy. The small-sample adjustment and p-value approximation belong to that fitted-normal statistic; they are not properties of an arbitrary Anderson–Darling implementation.
Estimated and nuisance parameters
The sample mean and standard deviation are nuisance estimates under the composite normal null. The EDF is an empirical estimate, not a neural representation or trained predictor.
Settings and design choices
Specify significance level, missing-value policy and the precise standard-deviation convention. If using Monte Carlo calibration, choose replication count and seed beforehand; increasing replication count reduces numerical uncertainty without changing the scientific null.
Fitting and adaptation
Fit the normal parameters once for the observed sample. In a parametric bootstrap, simulate normal samples and re-estimate both parameters in every replicate before applying the same statistic and correction. A new dataset requires new fitting and calibration, not weight transfer or fine-tuning. Report the statistic and calibrated p-value together.
Sensitivity and robustness
Tail rounding, truncation and large outliers strongly affect the logarithmic terms. Use stable log-CDF and log-survival calculations for extreme observations. Small samples have limited power, while dependent observations or regression residuals need a null simulation reproducing their estimation structure.
How to use and calibrate
Use the normality-specific Anderson–Darling calibration matching parameter estimates and correction.
Example application
Detect tail departures from a fitted normal model.
Interpretation and pitfalls
Watch out
General known-CDF Anderson–Darling tables differ. Extreme transformed probabilities need stable log calculations.
What changed in edition 2
- New sections: structure of the method, estimated and nuisance parameters, settings and design choices, fitting and adaptation, sensitivity and robustness.
Python and R
Normality is assessed for independent observations. For model diagnostics, test residual assumptions in context; do not automatically choose a downstream test based on a preliminary normality p-value.
Validated — Executed successfully in the validation environment · needs numpy, scipy
import numpy as np
from scipy import stats
rng = np.random.default_rng(2026)
x=rng.normal(size=60)
print(__import__("statsmodels.stats.diagnostic",fromlist=["normal_ad"]).normal_ad(x))
Output
(np.float64(0.4573977062123191), np.float64(0.2562670959547805))
Validated — Executed successfully in the validation environment · needs nortest
set.seed(2026)
x <- rnorm(60)
print(nortest::ad.test(x))
Output
Anderson-Darling normality test data: x A = 0.31712, p-value = 0.5301
Sources
- nortest — nortest · ad.testAuthor documentation/source reviewed: nortest 1.0-4.search.r-project.org
- ad.testsearch.r-project.org
- Statistics guide v4 (historical):
- Python: Executed successfully in the validation environment · R: Executed successfully in the validation environment
- Reference's record:
- Edition 2 review: Python: skip · R: not executed (Rscript unavailable); why not run: Python: Unavailable local dependencies: statsmodels. Python: Not run in the reference's review: Unavailable local dependencies: statsmodels. No installation attempted. R: Reviewed but not run: R wasn't available to the reference's authors.
From the CodeSplash statistics guide (v4), entry 109, updated from the reference's edition 2 (reviewed 14 November 2026) as STAT109.