A normality test is a statistical procedure used to determine whether a sample of data comes from a population that follows a normal (Gaussian) distribution. You enter your data values, and the test returns a test statistic and a p-value; a p-value below your chosen significance level (commonly 0.05) indicates the data deviate significantly from normality. These tests are a standard prerequisite for many parametric statistical methods, such as t-tests, ANOVA, and linear regression, which assume normally distributed residuals.
Why Normality Matters
Many classic statistical tests rely on the assumption that the data (or the residuals from a model) are drawn from a normal distribution. This assumption underpins the mathematics that gives these tests their known sampling distributions (like the t-distribution or F-distribution). When the normality assumption is badly violated, the p-values from these tests can be misleading—either too liberal (finding effects that don’t exist) or too conservative (missing real effects). Normality tests help you decide whether it is safe to proceed with these parametric methods or whether you should use a non-parametric alternative like the Mann-Whitney U test or Kruskal-Wallis test.
How a Normality Test Works
Normality tests work by comparing the observed distribution of your sample to the theoretical normal distribution. They do this in different ways:
- Shapiro-Wilk test: The most powerful test for normality, especially with small sample sizes (n < 50). It calculates a statistic W that measures how well the ordered sample values fit a normal distribution, giving more weight to the tails.
- Kolmogorov-Smirnov test: Compares the empirical cumulative distribution function of the sample to the normal distribution’s cumulative distribution function. It is less powerful than Shapiro-Wilk but works for any sample size.
- Anderson-Darling test: A modification of the Kolmogorov-Smirnov test that gives more weight to the tails of the distribution, making it more sensitive to deviations in the extremes.
- Jarque-Bera test: Uses the sample skewness and kurtosis to test whether they match the expected values for a normal distribution (skewness = 0, excess kurtosis = 0).
Each test produces a test statistic and a p-value. The p-value is the probability of observing a test statistic as extreme as the one computed from your data, assuming the data are truly normal. A small p-value (e.g., < 0.05) means it is unlikely the data came from a normal distribution.
Choosing the Right Normality Test
No single normality test is best for all situations. Here are some guidelines:
- Sample size under 50: Use the Shapiro-Wilk test. It has the highest statistical power among normality tests for small samples.
- Sample size 50–200: Shapiro-Wilk is still good, but the Anderson-Darling test is also reliable.
- Sample size over 200: The Kolmogorov-Smirnov test can be used, but be aware that with large samples, even trivial deviations from normality become statistically significant. In this case, visual inspection (histogram, Q-Q plot) often matters more than the p-value.
- When you care about the tails: Use Anderson-Darling, as it is more sensitive to outliers in the tails.
In practice, many statisticians recommend always using the Shapiro-Wilk test unless you have a specific reason to use another. It is a good default because of its power.
Assumptions
- The data are a random sample from the population of interest.
- Observations are independent of each other.
- The measurement scale is at least interval (continuous or discrete with many possible values).
- The test is valid only for the specific distribution being tested (normal), not for comparing two samples or testing other distributions.
Common Mistakes and Pitfalls
Several errors are common when using normality tests:
- Testing the wrong variable: For regression or ANOVA, you should test the residuals, not the raw data. The assumption is that residuals are normally distributed, not the original measurements.
- Ignoring sample size: With very small samples (n < 10), normality tests have low power and may fail to detect non-normality. With very large samples, they may flag minor deviations that have little practical impact.
- Using the p-value as a binary decision: A p-value of 0.051 is not fundamentally different from 0.049. Consider the effect size and the robustness of your planned test.
- Not checking for outliers: A single extreme outlier can make a normal-looking dataset fail a normality test. Examine boxplots and scatterplots first.
- Rounding data too coarsely: If you round data to whole numbers when the underlying variable is continuous, normality tests may fail due to ties.
Alternatives to Formal Tests
Formal tests are not the only way to assess normality. Visual methods are often more informative:
- Histogram: Overlay a normal density curve to see if the shape matches.
- Q-Q plot (quantile-quantile plot): Plot the sorted data against the theoretical quantiles of a normal distribution. Points falling roughly along a straight line suggest normality.
- Boxplot: Look for symmetry and the absence of extreme outliers.
Some statisticians argue that for moderate sample sizes, parametric tests are robust to mild violations of normality (especially with equal variances), so you might not need a formal test at all. Instead, you can use a non-parametric test if the data are clearly skewed or have many outliers.
Interpreting the Results
When you run a normality test, you get a p-value. Here is how to interpret it:
- p ≥ 0.05: Fail to reject the null hypothesis. There is not enough evidence to say the data are non-normal. You can proceed with parametric tests.
- p < 0.05: Reject the null hypothesis. The data are likely not normal. Consider data transformations (e.g., log, square root) or non-parametric tests.
Remember that the null hypothesis of a normality test is that the data are normally distributed. So a low p-value means the data are not normal, not that they are normal.
Frequently Asked Questions
What is the best normality test?
The Shapiro-Wilk test is generally considered the best for most situations because it has high statistical power across a wide range of sample sizes and alternative distributions. For very large samples, the Anderson-Darling test is also a strong choice.
Can I use a t-test if my data are not normal?
If your sample size is large (typically n > 30), the Central Limit Theorem ensures that the sampling distribution of the mean is approximately normal even if the original data are not. In that case, a t-test is often still valid. For small samples with non-normal data, use a non-parametric alternative like the Mann-Whitney U test.
What should I do if my data fail the normality test?
First, check for outliers and data entry errors. If the data are still non-normal, you can try a data transformation (e.g., log, square root, Box-Cox). If that doesn’t work, use a non-parametric test that does not require normality.
Is it necessary to test normality before every t-test?
For small samples, yes, because the t-test is sensitive to non-normality. For large samples, the t-test is robust, so normality testing is less critical. However, it is good practice to at least look at a histogram or Q-Q plot.
What is the difference between a normality test and a goodness-of-fit test?
A normality test is a specific type of goodness-of-fit test. Goodness-of-fit tests check whether data follow any specified distribution (e.g., Poisson, exponential), while normality tests specifically check the normal distribution.
Related
Formula used
in list | Data values (comma-separated) | 5.1, 4.9, 5.7, 4.6, 5.3, 5.0, 5.8, 4.7, 5.2, 5.4 out p | Shapiro-Wilk p-value | - | 0.789 | 3
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
- Normality to g/L Converter & Formula29.220 g/L
- Normality to meq/mL Conversion Calculator1.0000 meq/mL
- Normality Test Q-Q Plot: How to Read It
- Normality Test Results: How to Analyze Them
- Normality Slay the Spire?
- Normality Test for Paired t Test: How to Check