Português

Anderson-Darling test

Goodness of fit and normality · reference distribution: A² (tabulated)

When to use it

Test goodness of fit to a distribution, giving more weight to the tails than Kolmogorov-Smirnov.

Null hypothesis

The data follow the distribution F.

Assumptions

Test statistic

A^2 = -n - \dfrac{1}{n} \sum_{i=1}^{n} (2i - 1)\left[\ln F(x_{(i)}) + \ln\left(1 - F(x_{(n+1-i)})\right)\right]

How to report it

A² = 0.52, p = .18

In R and Python

R
library(nortest)
ad.test(x)
Python
stats.anderson(x, dist="norm")  # returns critical values, not the p-value

In Python, stats is scipy.stats and np is numpy.

Where it sits in the catalog

Goodness of fit and normality. Goodness of fit: do the data follow the expected distribution? Normality tests are the most common case and check an assumption of parametric tests.

In the decision tree

  1. What do you want to do? Check an assumption or the distribution of the data
  2. What do you want to check? Whether the data follow another continuous distribution
  3. Are the parameters of the distribution known in advance? No, they are estimated from the data

It also appears alongside other tests:

Open the decision tree