Histogram and Anderson-Darling Normality Test
Paste a column of measurements and get a histogram with the fitted normal curve over it, the Anderson-Darling statistic with its p-value, and the normal probability plot — with the bin rule, the small-sample factor and the plotting-position convention all named on the figure.
What this normality test calculator actually reports
Three things, together, because none of them means much alone. The histogram with a fitted normal curve shows the shape of any departure — a skew, a truncation where parts were sorted, two humps where two machines were pooled. The Anderson-Darling statistic and its p-value put a number on it. The normal probability plot is the one an experienced reader looks at first, because a histogram of forty points is mostly binning and a probability plot of forty points is mostly data.
What you will not get is a bare pass or fail. A normality result is what licenses a capability calculation downstream — a Ppk on a customer submission rests on it — and "not normal" quoted without the statistic, the p-value and the sample size beside it is the sentence that causes the argument six months later.
Data
Paste straight from Excel, Minitab or a CMM export — include the header row and the columns are matched by name, in any order.
| # | Sample(opt) | Measurement | |
|---|---|---|---|
| 1 | |||
| 2 | |||
| 3 | |||
| 4 |
0 rows of data
Loading the calculation engine…
Enter data on the left to chart it
SVG is vector — it stays sharp at any size in a report. PNG 4× is roughly 600 dpi at figure width. Every export carries the estimator, the constants and the rule set drawn inside the figure, so the file is readable on its own.
Downloads carry a small “made with spcplot.com” credit along the bottom edge. The chart on screen is never watermarked, and the credit is a credit rather than a licence restriction — the figures are yours to publish either way. A Pro or Lifetime licence removes it.
Options
This plot has no adjustable options yet.
Your measurements are processed entirely in this browser tab. Nothing you type here is uploaded, so confidential production data stays confidential.
How the Anderson-Darling statistic is computed
A² = −N − S, where S = Σ ((2i − 1)/N)·[ln F(Yᵢ) + ln(1 − F(Y_{N+1−i}))] over the sorted observations and F is the normal CDF with the sample mean and the sample standard deviation. That is the definition NIST publishes. The sum pairs the i-th smallest with the (N+1−i)-th smallest, and getting that pairing off by one produces a plausible, wrong answer — which is why the test suite pins the statistic to a published worked example at the precision the source printed, rather than checking that the code runs.
A raw A² matches no published critical value. The tables and the p-value formulas are quoted for a statistic that has been multiplied by a small-sample factor, and two factors are in circulation: A²(1 + 0.75/n + 2.25/n²), which is what the p-value approximation belongs to and what R’s nortest returns, and A²(1 + 4/n − 25/n²), which is what NIST’s own case-study output prints. SciPy returns the statistic unadjusted and scales its critical values instead. On 44 observations the two adjusted versions differ by about 6 %. Both are offered here, each with the critical value that goes with it, and the figure says which produced the number.
The p-value comes from the piecewise exponential approximation attributed to D’Agostino & Stephens (1986). It is an approximation and it is treated as one: it applies only when μ and σ were estimated from the same data, it is discontinuous at its branch joins — the jump at A²* = 0.6 is about 0.0025, and it is upward — and at A²* = 0.752, the value NIST prints for α = 0.05, it returns 0.0503 rather than 0.05. All of that is printed under the chart rather than left for you to find out.
The bin rule changes what the picture says
Six rules are offered — Sturges, Rice, square root, Scott, Freedman-Diaconis and a manual count — and the histogram is a different histogram under each. Whichever is in force is printed on the figure with the bin width, because a chart that shows one hump at four bins and two humps at eight has settled nothing until you know which you are looking at.
The default is automatic: whichever of Freedman-Diaconis and Sturges asks for more bins. Both halves are there for a reason specific to this page. Scott’s rule is the width that minimises error *for normal data*, which is the very assumption under test, so defaulting to it would be circular. Freedman-Diaconis is the robust replacement, and on its own it fails in exactly the case the page is bought for: a two-population mixture inflates the interquartile range in proportion to the gap between the populations, so the freedman diaconis bin width grows with the separation and the bin count stays put. Forty-eight parts off two machines get four bins however far apart the machines are, and four bins cannot show two humps. Sturges’ floor is what makes the mixture visible.
Sweep the manual count and watch what happens: a feature that survives from six bins to twenty is in the data; one that appears at a single setting is in the binning.
Reading the normal probability plot
Straight is normal. Curvature at one end is a skew. An S shape is tail weight — heavy tails bend both ends away from the line, light tails bend them toward it. A step or a kink in the middle is the signature of a mixture: two processes pooled into one sample before anybody measured anything.
The vertical axis is labelled in percent and in standard normal units, and each observation is placed at a plotting position — by default Benard’s median-rank approximation, (i − 0.3)/(n + 0.4), which is what Minitab’s probability plots use. Blom’s (i − 3/8)/(n + 1/4), Hazen’s (i − 0.5)/n and the mean rank i/(n + 1) are all offered. The four agree in the middle of the plot and separate at the ends, which is precisely where you are judging the tails, so the convention is printed on the figure. It affects the picture only: the Anderson-Darling statistic uses F(Yᵢ) directly and never forms a plotting position.
The reference line is the fitted distribution, x = x̄ + s·z, not a least-squares line through the plotted points. A regression line is flatter whenever the tails are heavy, which makes bad data look better than it is. The correlation r printed in the corner is between the ordered observations and their normal scores; it is shown because it is what you are estimating by eye anyway, and it is not treated as a test here, because its critical values depend on n and on the plotting position and this site does not print a table it has not read.
Two things worth knowing before you act on the answer
The test gets more sensitive as the sample grows. Past roughly 300 observations Anderson-Darling will reject almost any real measurement data, on a departure far too small to change any decision — gauge rounding alone will do it. Past that size, read the plots and ignore the p-value. Below about twenty observations the opposite holds: the test has so little power that "did not reject" is not evidence of normality, it is evidence of a small sample.
A histogram cannot see time. Both panels are invariant to the order of your rows, so a drifting process and a stable one with the same overall distribution produce the identical figure and the identical p-value. Non-normality is very often a stability problem wearing a distribution costume — run the control chart first, and if the process signals, that is the finding, not the p-value.
Common questions
- Why does my Anderson-Darling statistic differ from the one my other software reports?
- Almost always the small-sample factor. R’s nortest returns A²(1 + 0.75/n + 2.25/n²); SciPy returns the unadjusted A² and scales its critical values instead; NIST’s case-study output uses A²(1 + 4/n − 25/n²). On 44 observations the two adjusted versions differ by about 6 %. Switch the "Anderson-Darling modification" option to the convention your other tool uses and the numbers meet.
- What p-value counts as failing the normality test?
- The usual convention is to reject normality when p falls below 0.05, which corresponds to the statistic exceeding the critical value printed on the figure. Treat that as a prompt to look at the plots rather than as a verdict: at n = 1000 a p of 0.01 can mean a departure nobody could act on, and at n = 12 a p of 0.4 means the test could not have detected much of anything.
- My data is not normal. Can I still compute Cpk?
- Not from the normal indices as they stand — Cp, Cpk, Pp and Ppk all convert a distance in standard deviations into a defect rate using the normal tail, and on skewed data that conversion can be out by an order of magnitude. The options are to find and remove the cause (a mixture, a drift, a sort operation), to transform the data, or to use percentile-based indices. Start by looking at which of those the histogram is showing you.
- How many measurements do I need?
- Enough that the test can see something: below about twenty, a pass tells you almost nothing. A hundred is comfortable. The tool draws from three observations upward and prints a warning saying which side of that range you are on.
- Why are there two humps in my histogram?
- Two populations in one sample — two machines, two cavities, two shifts, two material lots, or before and after an adjustment. Split the data by the suspected cause and test each half: if each half passes and the pooled data fails, you have found it, and the pooled standard deviation you were about to put in a capability report is a description of the mixing rather than of either process.
- Is my data uploaded anywhere?
- No. The whole calculation runs as JavaScript in this browser tab, and nothing on this site accepts a measurement — the only server code here takes a payment. That is why the tool is usable on data you are contractually barred from putting in a cloud service.