Shapiro-Wilk Normality Test

Check whether your data is approximately normal before applying a t-test, ANOVA or regression. The Shapiro-Wilk test is the standard, most powerful test of normality, returning the W-statistic and p-value.

Run Shapiro-Wilk Test →

What is the Shapiro-Wilk Test?

The Shapiro-Wilk test is a statistical test of normality: it assesses whether a sample plausibly comes from a normally distributed population. It is widely regarded as one of the most powerful normality tests, particularly for small to moderate sample sizes, which makes it the default assumption check for many parametric methods.

The test produces a W-statistic between 0 and 1. Values close to 1 indicate the data closely matches a normal distribution, while smaller values indicate departure from normality. The accompanying p-value tests the null hypothesis that the data is normal.

Interpreting the result correctly requires attention to sample size. In very large samples the test becomes so sensitive that trivial, practically irrelevant departures from normality produce significant p-values, while in very small samples it may lack the power to detect real non-normality. The test should therefore be read alongside visual tools such as a Q-Q plot.

In plain terms: Many common tests assume your data is bell-shaped (normal). The Shapiro-Wilk test checks that assumption. A high p-value means normal enough to proceed; a low one means not normal, so you may need a non-parametric test instead. Always glance at a Q-Q plot too, because the test can over-react in big samples.

Key Points

Tests Normality

The null hypothesis is that the data is normal. A small p-value means you reject normality.

W-Statistic

Ranges from 0 to 1; values near 1 indicate close agreement with a normal distribution.

Sample-Size Sensitivity

Very large samples flag trivial departures; very small samples may miss real ones. Pair with a Q-Q plot.

Key Formulas

W = ( Σ ai x(i) )² / Σ(xi − ȳ)²
x(i) = ordered sample values
ai = constants from the normal order statistics
W near 1 = close to normal; small p-value = reject normality

Interpreting the Result

A small p-value (below your significance level) means you reject the hypothesis of normality: the data is significantly non-normal. A large p-value means there is not enough evidence to reject normality, so the assumption is reasonable.

Crucially, failing to reject is not proof of normality, and rejecting is not always practically important. In large samples, minor deviations become significant. Judge normality with both the test and a Q-Q plot, and remember that t-tests and ANOVA are fairly robust to mild non-normality.

Assumptions & Validation

Independent Sample

The data is an independent random sample.

If violated: Address dependence in the data.

Continuous Data

The variable is continuous.

If violated: Normality tests do not apply to categorical data.

Appropriate Sample Size

Interpret with sample size in mind; results are unstable at extremes.

If violated: Use a Q-Q plot to support the numeric result.

⚠️ Check assumptions first

The Shapiro-Wilk p-value must be read in light of sample size. In large samples it flags tiny, harmless departures from normality as significant, which can lead you to abandon a perfectly usable t-test or ANOVA; in very small samples it may fail to detect genuine non-normality. Always confirm the numeric result with a Q-Q plot, and remember that many parametric tests tolerate mild non-normality well.

When NOT to Use Shapiro-Wilk Normality Test

Testing Other Distributions

To test fit to a non-normal distribution, use the Kolmogorov-Smirnov or a distribution-specific test.

Very Large Samples

When samples are huge, rely more on Q-Q plots and effect of non-normality than on the p-value.

Categorical Data

Normality tests do not apply; use chi-square methods for categories.

Industry Applications

Assumption Checking

Verify the normality assumption before a t-test, ANOVA or regression.

Residual Diagnostics

Test whether regression or ANOVA residuals are approximately normal.

Capability Studies

Check normality before computing normal-based process capability indices.

Data Screening

Assess distributional shape early in an analysis to choose appropriate methods.

Frequently Asked Questions

What does the Shapiro-Wilk test do?

It tests whether a sample plausibly comes from a normally distributed population. The null hypothesis is that the data is normal, so a small p-value leads you to reject normality, while a large p-value means there is insufficient evidence against it. It is widely considered one of the most powerful normality tests, especially for small to moderate sample sizes, which is why it is a common assumption check before parametric tests.

What does the W-statistic mean?

The W-statistic ranges from 0 to 1 and measures how closely the ordered sample values match what would be expected from a normal distribution. Values close to 1 indicate strong agreement with normality, while smaller values indicate greater departure. The W-statistic is converted into a p-value to formally test the normality hypothesis.

Why does sample size affect the interpretation?

In very large samples the Shapiro-Wilk test becomes extremely sensitive, so even trivial, practically unimportant departures from normality yield significant p-values, tempting you to reject usable methods. In very small samples the test has little power and may miss genuine non-normality. Because of this, the p-value should always be interpreted alongside a visual tool such as a Q-Q plot rather than in isolation.

What should I do if my data fails the normality test?

First check whether the departure matters: t-tests and ANOVA are fairly robust to mild non-normality, especially with larger samples. If the departure is substantial, options include transforming the data, for example with a log transform, or switching to a non-parametric test such as the Mann-Whitney U, Wilcoxon signed-rank or Kruskal-Wallis test, which do not assume normality.

Does a high p-value prove my data is normal?

No. A high p-value means there is not enough evidence to reject normality, which is not the same as proving the data is normal. The test can simply lack power, particularly with small samples. Normality is best judged by combining the test result with a Q-Q plot and an understanding of how sensitive your intended analysis is to departures from normality.

How does Shapiro-Wilk compare to the Kolmogorov-Smirnov test for normality?

For testing normality specifically, the Shapiro-Wilk test is generally more powerful than the Kolmogorov-Smirnov test, especially at small sample sizes. The standard one-sample KS test also requires the distribution parameters to be specified in advance, whereas normality testing usually estimates them from the data, which makes the plain KS test conservative. Shapiro-Wilk, or the Lilliefors-corrected KS test, avoids that issue.

Check Normality Before You Test

Run the Shapiro-Wilk test with the W-statistic, p-value and Q-Q plot. Free during Beta.

Run Shapiro-Wilk Test →