molecalculator

Moles & Molar Mass

Anderson-Darling Normality Test: A Clear Guide

Calculator No. 01-8558 · Updated · Formula and assumptions shown below

The calculator on this page is switched off while it is checked. The formula is below, and the worked example shows how to do the sum by hand.

For study and lab planning. The result follows from the numbers you enter and the formula shown. Check it against your method before you weigh, mix or dilute anything, follow the safety data sheet and your supervisor, and do not use it for clinical, dosing or medication work.

The Anderson-Darling normality test is a statistical test that checks whether your sample data come from a normal distribution. You enter a set of numeric values, and the calculator returns the Anderson-Darling statistic (A²) and a p-value; if the p-value is below your chosen significance level (commonly 0.05), you reject normality. This page explains how the test works, how to interpret its output, and how it compares to other normality tests.

Formula

The Anderson-Darling statistic is defined as:

A² = -n – (1/n) * Σ (2i – 1) * [ln(F(x(i))) + ln(1 – F(x(n+1-i)))]

where:

  • n = sample size (number of data points)
  • x(i) = the i-th ordered observation (sorted from smallest to largest)
  • F(x) = cumulative distribution function (CDF) of the normal distribution with the sample mean and sample standard deviation, evaluated at x
  • ln = natural logarithm

In practice, you first standardize each value: zi = (xi – mean) / sd, then compute F(zi) using the standard normal CDF. The test statistic is then adjusted for sample size in some software versions, but the core formula is above.

Worked Example

Suppose you have the sample data: 5.2, 4.8, 5.6, 5.1, 4.9, 5.3, 5.0, 5.4, 4.7, 5.5 (n = 10).

  1. Compute the mean: (5.2+4.8+5.6+5.1+4.9+5.3+5.0+5.4+4.7+5.5)/10 = 51.5/10 = 5.15.
  2. Compute the sample standard deviation (using n-1): ≈ 0.2896.
  3. Standardize each value: e.g., for 5.2, z = (5.2-5.15)/0.2896 ≈ 0.1727.
  4. Find F(z) for each z using the standard normal CDF (e.g., F(0.1727) ≈ 0.5685).
  5. Sort the F values, then compute the sum: Σ (2i-1)*[ln(F_i) + ln(1-F_{n+1-i})]. For i=1: (1)*[ln(0.5685)+ln(1-0.5685)] ≈ -0.5647+(-0.8422) = -1.4069. Continue for i=2…10.
  6. Sum all terms, multiply by -1/n, and subtract n. The result is A² ≈ 0.186 (as computed by the calculator).
  7. Using the formula for p-value approximation for n=10, p ≈ 0.895 (the calculator gives a more precise value).

Since p > 0.05, you do not reject normality; the data are consistent with a normal distribution.

Assumptions

  • The data are a random sample from a continuous distribution.
  • The test is used to check if the data come from a normal distribution (with unknown mean and variance, estimated from the sample).
  • The sample size should be at least 5 for the p-value approximation to be reasonable.

How the Anderson-Darling Test Works

The Anderson-Darling test is a type of empirical distribution function (EDF) test. It measures the distance between the empirical cumulative distribution function of your sample and the cumulative distribution function of the normal distribution with the same mean and standard deviation. Unlike the Kolmogorov-Smirnov test, which only considers the maximum vertical distance, the Anderson-Darling test gives more weight to the tails of the distribution. This makes it more sensitive to deviations at the extremes, which is often where normality violations matter most (e.g., in quality control or risk analysis). The test statistic A² is a weighted squared distance; larger values indicate greater deviation from normality.

How to Choose Between Normality Tests

Several tests exist for normality, and the choice depends on your situation:

  • Anderson-Darling: Good all-around choice, especially when tail behavior matters. It is powerful against many alternatives and works well for moderate to large samples (n > 20).
  • Shapiro-Wilk: Often considered the most powerful for small samples (n < 50). It is based on the correlation between the sample and the expected normal order statistics.
  • Kolmogorov-Smirnov: Less powerful than the others, but it can be used when the distribution parameters are known (not estimated from the data). It is also distribution-free (not only for normality).
  • Jarque-Bera: Based on skewness and kurtosis; good for large samples, but less reliable for small n.
  • Visual checks: Always complement any test with a Q-Q plot or histogram. Tests can be overly sensitive with large samples, flagging minor deviations that are practically irrelevant.

In practice, many statisticians recommend using the Shapiro-Wilk test for small samples and the Anderson-Darling test for larger samples, but the Anderson-Darling is a solid choice across the board.

Common Problems and Misconceptions

  • Large samples always reject normality: With thousands of data points, even trivial deviations from a perfect normal curve will produce a low p-value. Always look at the effect size (e.g., a Q-Q plot) to judge practical significance.
  • Small samples may fail to detect non-normality: With n < 20, the test has low power; it may not reject even when the data are clearly skewed. Use your judgment and visual checks.
  • Using the wrong parameters: The test assumes you estimate the mean and standard deviation from the sample. If you use known population parameters, the p-value calculation changes.
  • Ignoring the p-value adjustment: Many software versions use a modified statistic (e.g., A²* = A² * (1 + 0.75/n + 2.25/n²)) to improve accuracy for small samples. Our calculator uses the standard formula without adjustment; for n < 10, results may differ slightly from software that adjusts.
  • Confusing normality of data with normality of residuals: In regression, you often need normally distributed residuals, not the raw data. Always test the residuals, not the original outcome variable.

When to Use the Anderson-Darling Test

Use the Anderson-Darling test when you need to verify the normality assumption for a statistical procedure, such as:

  • Performing t-tests or ANOVA (though these are fairly robust to non-normality for large samples).
  • Calculating control limits in statistical process control (often assumes normality).
  • Using parametric correlation (Pearson r) or regression (residuals should be normal).
  • Calculating reference intervals in laboratory medicine.

If your data are not normal, consider transformations (log, square root, Box-Cox) or use non-parametric tests (Mann-Whitney, Kruskal-Wallis).

Limitations and Alternatives

The Anderson-Darling test assumes your data are a random sample and that the distribution is continuous. It is not appropriate for discrete data (like counts) unless you are testing a discrete distribution. Also, the test is sensitive to outliers—a single extreme value can inflate A² and lead to rejection. If you have outliers, investigate them before concluding non-normality. Alternatives to the Anderson-Darling test include the Shapiro-Wilk test, the D’Agostino-Pearson test (based on skewness and kurtosis), and graphical methods like the Q-Q plot. For very large samples, even the Anderson-Darling test may be too sensitive; use your judgment.

Frequently Asked Questions

What is a good Anderson-Darling p-value?

A p-value greater than your significance level (usually 0.05) indicates that the data do not provide enough evidence to reject normality. So, a p-value of 0.10 or 0.50 is fine—it means the data are consistent with a normal distribution. A p-value less than 0.05 suggests the data are not normally distributed.

Can I use the Anderson-Darling test for small samples?

Yes, but the test has low power with very small samples (n < 10). The p-value approximation may not be exact. For small samples, the Shapiro-Wilk test is often preferred because it has better power. However, the Anderson-Darling test can still be used as a rough check.

How do I interpret the Anderson-Darling statistic (A²)?

The A² statistic is a measure of how far the empirical distribution deviates from the theoretical normal distribution. A larger A² indicates greater deviation. However, the absolute value is not directly interpretable; you need the p-value to make a decision. As a rough guide, for n=10, A² > 0.6 might suggest non-normality, but always rely on the p-value.

Does the Anderson-Darling test require a specific sample size?

There is no strict minimum, but the test is most reliable for n ≥ 8. For very small samples, the p-value may be inaccurate. The test works for any sample size, but power increases with n.

What if my data has ties or is discrete?

The Anderson-Darling test assumes a continuous distribution. If your data has many ties (e.g., integers with repeated values), the test may be conservative or liberal. For discrete data, consider using a chi-square goodness-of-fit test or a discrete distribution-specific test.

Is the Anderson-Darling test the same as the Kolmogorov-Smirnov test?

No. Both are EDF tests, but the Anderson-Darling gives more weight to the tails, making it more sensitive to deviations at the extremes. The Kolmogorov-Smirnov test only looks at the maximum vertical distance between the empirical and theoretical CDFs, and it is generally less powerful.

Related

Formula used
in data | Sample data (comma-separated) | - | 5.2, 4.8, 5.6, 5.1, 4.9, 5.3, 5.0, 5.4, 4.7, 5.5 | 0
out a2 | Anderson-Darling statistic (A²) | - | - | 4
out pval | p-value | - | - | 4

Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work

Method: the standard formula for this calculation with the constants and conversion factors written on the page, rounded as each result states. See method and constants, the disclaimer or report an error.

More in this section

The whole Moles & Molar Mass section →