Normality Test
Test if your data follows a normal distribution. Apply Shapiro-Wilk, Anderson-Darling, and Jarque-Bera tests to assess normality. Visualize with histogram and…
Apply Shapiro-Wilk, Anderson-Darling, and Jarque-Bera tests to assess normality. Visualize with histogram and QQ-plot.
Why is normality testing important and how do the tests work?
Many statistical methods — including control charts, capability indices (Cpk/Ppk), t-tests, and ANOVA — assume the underlying data follows a normal (Gaussian) distribution. Normality testing verifies this assumption before applying these methods. Violating normality can lead to incorrect confidence intervals, capability estimates, and hypothesis test conclusions.
The Shapiro-Wilk test is the most powerful normality test for small to moderate samples (n < 5000). The Anderson-Darling test is sensitive to deviations in the tails, making it useful for reliability and extreme value applications. The Jarque-Bera test examines skewness and kurtosis, working well for larger samples.
All tests share the same hypothesis structure: H₀ (null) = data is normally distributed; H₁ = data is not normal. If the p-value < α (typically 0.05), reject normality. The QQ-plot provides visual confirmation: points lying on the diagonal line indicate normality; systematic deviations reveal the nature of non-normality.
Formula: Shapiro-Wilk: W = (Σaᵢx(ᵢ))² / Σ(xᵢ - x̄)² Anderson-Darling: A² = -n - Σ[(2i-1)/n](ln F(x(ᵢ)) + ln(1-F(x(n+1-i)))) reported as A*² = A²(1 + 0.75/n + 2.25/n²) Jarque-Bera: JB = (n/6)(S² + K²/4) Reject H₀ if p-value < α
Example Calculation
20 measurements tested: Shapiro-Wilk W = 0.965, p = 0.42; Anderson-Darling A² = 0.31, p = 0.52; Jarque-Bera JB = 1.2, p = 0.55. All p-values > 0.05 — fail to reject normality. The QQ-plot shows points closely following the diagonal. Data can be treated as normally distributed.
When to Use This Calculator
- Before computing Cpk or Ppk — process capability indices assume normal data; non-normal data requires transformation or alternative methods
- Before performing t-tests or ANOVA — these parametric tests assume normally distributed residuals; violations affect confidence interval accuracy
- When setting up SPC control charts — standard control chart limits assume normality; significantly non-normal data needs different chart types
- During incoming inspection when data looks unusual — normality testing helps determine if the distribution has shifted or if a different distribution model is needed
- When preparing data for regression analysis — checking normality of residuals validates the assumptions underlying the regression model
Common Mistakes to Avoid
- Rejecting normality based solely on a p-value with very large samples — with n > 500, tests detect trivially small deviations from normality that have no practical impact; always use the QQ-plot for visual judgment
- Accepting normality without checking with a small sample (n < 20) — tests have low power with small samples and may fail to detect meaningful departures from normality
- Applying normality tests to integer or heavily rounded data — discrete data or data with few unique values can fail normality tests even if the underlying process is normal; ensure measurement resolution is adequate
- Testing raw data when you should be testing residuals — for regression and ANOVA, it is the residuals (not the raw data) that need to be normally distributed
How to Interpret Results
- All tests show p > 0.05 and QQ-plot is linear — data is consistent with normality; proceed with parametric methods and standard capability analysis
- Tests show p < 0.05 but QQ-plot looks approximately linear — with large samples, minor deviations can produce significant p-values; if the QQ-plot is nearly linear, normality is adequate for most practical purposes
- QQ-plot shows S-shaped curve — data has heavier tails than normal (leptokurtic); consider t-distribution or robust methods
- QQ-plot shows systematic curvature (concave or convex) — data is skewed; try log or Box-Cox transformation
- Different tests disagree — Shapiro-Wilk is the most reliable for general use; Anderson-Darling is best when tails matter (reliability); use the QQ-plot as the visual arbiter
Related Standards & References
- ISO 5479 — Statistical interpretation of data: tests for departure from the normal distribution, the international standard covering normality testing methodology
- Shapiro & Wilk (1965), Biometrika — The original paper introducing the W statistic implemented here
- NIST/SEMATECH e-Handbook §1.3.5 — Reference procedures for the Anderson-Darling test and normal probability (Q-Q) plotting
- Jarque & Bera (1987), International Statistical Review — The skewness-kurtosis test for normality used for larger samples
- AIAG SPC Reference Manual — Requires verifying normality before computing capability indices such as Cpk and Ppk
Frequently Asked Questions
What should I do if my data fails the normality test?
Options include: (1) Transform the data using log, Box-Cox, or Johnson transformation to achieve normality. (2) Use non-parametric methods that don't assume normality (e.g., Mann-Whitney instead of t-test). (3) Fit a different distribution (Weibull, lognormal, etc.) that better describes the data. (4) For large samples (n > 30), the Central Limit Theorem often makes normality violations less impactful for mean-based tests.
Why do different normality tests give different results?
Each test is sensitive to different aspects of non-normality. Shapiro-Wilk has the best overall power for detecting various departures. Anderson-Darling emphasizes tail deviations (important for reliability). Jarque-Bera focuses on skewness and kurtosis. With borderline data, one test may reject while others do not. Use the QQ-plot as the visual tiebreaker.