The Anderson-Darling test for goodness-of-fit evaluates whether a given sample of data comes from a specified theoretical distribution.
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.
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.
The test gives you three key numbers:
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).
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
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
Output
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!
Scihand | 2025 © All rights reserved – Privacy Policy | Terms and Conditions