Statistics & probability

Anderson–Darling goodness-of-fit calculator

Measure tail-weighted disagreement with a fully specified normal or uniform CDF and estimate its p-value by seeded Monte Carlo simulation.

Your numbers

Enter comma- or space-separated finite numbers. Values are limited to ±10¹²; missing observations are not silently removed. Use 3–200 independent observations.

Calculated on your device. Your inputs aren’t sent to us.

Your result

Ready when you are

Enter your inputs and select Calculate.

Report an issue

Behind the numbers

How this calculation works

Anderson–Darling compares ordered observations with a reference cumulative distribution and gives extra weight to tail discrepancies. This page supports normal parameters or uniform endpoints fixed independently of the sample being tested. It transforms the observations through that CDF and evaluates A². Five thousand seeded uniform-reference simulations then estimate the tail probability for the same sample size, using the continuous probability integral transform.

THE FORMULAA² = −n − (1/n)Σ(2i−1)[log F(x_(i)) + log(1−F(x_(n+1−i)))].

A worked example

With fixed standard normal reference and observations −1,−0.5,0,0.5,1, A²≈0.1887607003. Seed 20261125 produces 4,984 simulated statistics at least this large out of 5,000. The reported corrected Monte Carlo p-value is 4,985/5,001≈0.99680064. That unusually regular short sample is compatible with this reference, but the simulation estimate has finite resolution and does not prove the reference distribution.

Good to know

Use 3–200 IID continuous observations. The mean/standard deviation or interval endpoints must be fixed before using the tested sample. Fitting parameters to that sample requires a different calibration and is not supported. Uniform endpoints themselves make the statistic infinite; such values and unstable extreme CDF tails are rejected. The p-value is Monte Carlo, not exact, and its uncertainty interval concerns simulation error.

Known parameters and fitted parameters are different null experiments

A sample compared with an externally specified mean zero and standard deviation one is tested against one fixed CDF. If its own mean and spread are fitted first, the fitted CDF adapts to the observations and usually reduces the discrepancy. Simulating a fixed CDF while ignoring that adaptation gives the wrong reference experiment. This calculator deliberately supports the fixed-parameter case and labels the input fields accordingly.

For a continuous fixed CDF, the transformed values F(x) are uniform under the null. That allows a common simulation engine for either supported reference family without generating and retranslating normal samples. The observed statistic still uses the selected reference parameters. The two logarithmic terms emphasize failures near zero and one, which is why tail behavior matters more here than in an unweighted maximum-gap comparison.

Reference CDF values enter paired tail logarithmsFixed reference CDF at each valueA² pairs log F and log(1−F)
At standard-normal observations −1,−0.5,0,0.5,1, the reference CDF is about 0.159,0.309,0.5,0.691,0.841. The statistic pairs lower and upper logarithmic tails, giving A² ≈ 0.1887607.

The Shapiro–Wilk normality test calculator from data uses a different normal-family reference procedure rather than requiring externally fixed normal parameters.

Reproducibility does not remove simulation uncertainty

The seed makes repeated submissions of the same values reproducible. It does not turn a simulation estimate into an exact probability. The plus-one correction prevents a zero Monte Carlo p-value when no simulated statistic exceeds the observation. The output also gives a Wilson interval for the underlying simulated exceedance proportion, showing the approximate uncertainty due to the finite number of runs.

Do not search seeds until a result crosses a desired threshold. If a decision depends on a p-value close to that threshold, use a separately validated larger simulation analysis and retain its method. Discrete or heavily rounded measurements also change the uniform-transform calibration. The Shapiro–Wilk page asks about membership in a normal family through its own reference procedure; it is not interchangeable with this externally fixed normal CDF test.

A few questions, answered

Can I enter this sample’s own mean and SD?

Not with the p-value calibration provided here. Estimated-parameter goodness-of-fit needs the fitting step repeated in the null simulations or another appropriate reference method.

Why is an observation at a uniform endpoint rejected?

Its CDF is zero or one, producing a logarithmic divergence. The calculator reports the unsupported finite statistic instead of clipping the probability and inventing a finite result.

Find your calculator

Start typing to explore the library.