Home • SimpleStats • User Guide and Documentation

☰ Menu
We are updating all the pages, it will be complete soon!

Analyze/Stats: Anderson-Darling distribution test

The Anderson-Darling test for goodness-of-fit evaluates whether a given sample of data comes from a specified theoretical distribution.

What Is the Anderson-Darling Test?

The Anderson-Darling test is a statistical tool that checks whether your data follows a specific distribution, such as the normal (bell curve), exponential, or Weibull distribution. Unlike simpler tests, it’s especially good at detecting differences in the tails of the distribution—where extreme values lie.

Why Use This Test?

Many statistical methods (like t-tests or regression) assume your data follows a certain distribution. If this assumption is wrong, your results could be misleading. The Anderson-Darling test helps you verify whether your data fits the expected pattern before moving forward with analysis.

When Should You Use the Anderson-Darling Test?

  • You need to check if your data matches a known distribution (e.g., normal, exponential, or Weibull).
  • Your dataset is small to medium-sized (works better than some alternatives for modest sample sizes).
  • You want high sensitivity to outliers and extreme values (since it focuses on distribution tails).
  • You’re doing quality control, risk analysis, or scientific research where distribution assumptions

How to Interpret the Results

The test gives you three key numbers:

  1. Test Statistic (A²) – Measures how far your data deviates from the ideal distribution.
  2. Critical Values – Thresholds for different confidence levels (e.g., 5%, 1%).
  3. Significance Levels – The corresponding cutoffs (15%, 10%, 5%, 2.5%, 1%, etc.).

If A² > Critical Value: Your data does not match the distribution at that confidence level.
If A² ≤ Critical Value: Your data could fit the distribution (but doesn’t “prove” it).

Example Interpretation
  • Suppose your A² = 0.92, and the 5% critical value = 0.719.
  • Since 0.92 > 0.719, you reject normality at 95% confidence.
  • But if the 1% critical value = 0.998, and 0.92 < 0.998, you can’t reject normality at 99% confidence.

Meaning: There’s strong but not absolute evidence against normality.

To make it easy, we add a column that will just say if your sample passed the set distribution or not:

This is how you see the results of Anderson-Darling test with SimpliStats

How the Function is Called

				
					import numpy as np
from scipy.stats import anderson
anderson(sample, dist='norm')     # Normal distribution (default)
anderson(sample, dist='logistic') # Logistic distribution
anderson(sample, dist='gumbel')   # Gumbel (Extreme Value Type I)
anderson(sample, dist='weibull')  # Weibull minimum distribution
anderson(sample, dist='expon')    # Exponential distribution
				
			

Input

  • sample = Single array of sample data, one array = one data column.
  • dist = Target distribution.

Output

  • Anderson-Darling test statistic (A² Statistic).
  • Critical values for significance levels (15%, 10%, 5%, 2.5%, 1%).
  • Corresponding significance thresholds.

Conclusion

The Anderson-Darling test is a powerful way to check if your data follows a specific distribution. While it doesn’t give a p-value, comparing the test statistic (A²) to critical values helps you decide whether your data fits the expected pattern. SimpliStas makes performing and interpreting the Anderson-Darling test easy and easy!