Normality Testing Statistical Assumptions Hypothesis Testing 32 min read August 16, 2026
BY: Statistics Fundamentals Team
Reviewed By: Minsa A (Senior Statistics Editor)

Shapiro-Wilk Test

Before running a t-test, ANOVA, or regression, many researchers ask a prior question: are these data consistent with a normal distribution? The Shapiro-Wilk test is the most widely used formal answer to that question. It takes a sample of observations, compares how closely their ordering matches the pattern expected from a normal distribution, and returns a W statistic and a p-value that guide the interpretation.

This guide covers the full Shapiro-Wilk procedure — definition, W statistic, formula, hypotheses, p-value interpretation, sample size considerations, Q-Q plots, worked examples, SPSS, R, Python, common mistakes, and an interactive calculator that runs a validated implementation entirely in your browser.

What You'll Learn
  • ✓ What the Shapiro-Wilk test is and what it actually tests
  • ✓ The W statistic, formula, null and alternative hypotheses
  • ✓ How to interpret p-values and what p > 0.05 really means
  • ✓ Why sample size changes what the test can and cannot detect
  • ✓ How to read a Q-Q plot alongside the test result
  • ✓ Worked examples — normal data, skewed data, and outliers
  • ✓ How to run the test in SPSS, R, and Python
  • ✓ The 15 most common mistakes researchers make

What Is the Shapiro-Wilk Test?

Definition — Shapiro-Wilk Test
The Shapiro-Wilk test is a statistical test used to assess whether a sample of observations is consistent with a normal distribution. It produces a test statistic W (between 0 and 1) and a p-value. A statistically significant result — p below the chosen significance level — provides evidence against the hypothesis that the data follow a normal distribution.
Reject H₀ (normality) if p < α

Proposed by Samuel Sanford Shapiro and Martin Wilk in 1965, the test works by comparing the ordered sample observations with the values one would expect if the data truly came from a normal distribution. The closer that comparison, the higher W and the larger the p-value — meaning the data do not contradict the normality assumption.

Two points deserve emphasis from the start. First, the test assesses whether the data are consistent with normality — a non-significant result does not prove that the population is exactly normal. Second, the test's sensitivity to departures from normality depends heavily on sample size, so a significant result in a large sample may reflect a trivially small deviation that has no practical consequence for the analysis you are planning. Both points are discussed in detail in the sample size section below.

📌
Featured Snippet Answer

The Shapiro-Wilk test checks whether a sample is consistent with a normal distribution. It produces W (0 to 1; values near 1 suggest normality) and a p-value. If p < α, there is evidence against normality. If p ≥ α, there is insufficient evidence to reject normality — not proof that the data are normal. Always combine the result with a Q-Q plot and consider the sample size.

⚡ Shapiro-Wilk Key Facts
  • Purpose: Test whether a sample is consistent with a normal distribution
  • Test statistic: W — ranges from 0 to 1; values closer to 1 indicate better agreement with normality
  • Null hypothesis H₀: The data are consistent with a normal distribution
  • Alternative hypothesis H₁: The data are not consistent with a normal distribution
  • Decision rule: Reject H₀ if p < α (commonly α = 0.05)
  • p > 0.05 does NOT mean: The data are proven to be normally distributed
  • Best combined with: Q-Q plot, histogram, and knowledge of the sample size

When Should You Use the Shapiro-Wilk Test?

The Shapiro-Wilk test is typically appropriate when a researcher needs to assess normality before applying a method whose assumptions involve the normal distribution. Common situations include:

  • Checking whether residuals from a linear regression or ANOVA appear consistent with normality
  • Assessing whether a continuous measurement (e.g., blood pressure, reaction times, exam scores) is approximately normal before using a t-test
  • Exploratory data analysis where understanding the distributional shape informs subsequent modeling decisions
  • Quality control settings where a production process measurement is expected to follow a normal distribution

There are also situations where running the test adds little value or may mislead. With very small samples (n < 10), the test has limited ability to detect moderate departures from normality. With very large samples (n > several hundred), the test often returns a significant p-value for departures so small that they have no practical consequence for the statistical method being considered. In both extremes, graphical diagnostics — particularly a Q-Q plot — carry substantial weight.

⚠️
Do You Always Need to Test for Normality?

No. Normality testing is not a universal prerequisite for every statistical analysis. The relevant question is whether the specific statistical method being used has a normality assumption, and whether that assumption applies to raw data, residuals, or the sampling distribution. The central limit theorem means that for large enough samples, the sampling distribution of the mean is approximately normal regardless of the raw data distribution. Before running any normality test, ask: which assumption does my analysis actually require?

Should You Test the Raw Data or the Residuals?

For many statistical models — linear regression, ANOVA, and the t-test — the normality assumption applies to the model residuals or errors, not to the raw outcome variable. Testing the raw dependent variable for normality before running a regression, for example, answers the wrong question. The correct approach is to fit the model, obtain the residuals, and then apply the Shapiro-Wilk test (or a Q-Q plot) to those residuals.

This matters in practice. A skewed raw variable can produce perfectly well-behaved residuals after accounting for predictor variables, particularly when the predictors themselves explain a substantial portion of the outcome's variance. Conversely, a raw variable that looks approximately normal can produce non-normal residuals if the model is misspecified.

Shapiro-Wilk Test Hypotheses

Hypotheses

Null hypothesis H₀:

The sample is consistent with the specified normal distribution. (The population from which the sample was drawn could plausibly be normal.)

Alternative hypothesis H₁:

The sample is not consistent with the specified normal distribution. (There is evidence of departure from normality.)

Rejecting H₀ provides evidence against normality under the test's assumptions, but it does not identify which specific non-normal distribution the data follow. A significant result might reflect skewness, heavy tails, outliers, bimodality, or any other departure from the normal shape. The alternative hypothesis simply says "not normal" — it does not pin down the alternative distribution.

Failing to reject H₀ means the test did not find sufficient evidence against normality at the chosen significance level. This is not proof that the population is exactly normal. No finite sample can prove exact normality, and the test's ability to detect departures depends on sample size, the magnitude of the departure, and the significance level chosen.

The Shapiro-Wilk W Statistic

The test produces a single test statistic denoted W. Conceptually, W measures how well the ordered sample observations agree with the expected order statistics of a normal distribution. W is always between 0 and 1:

W ≈ 1
Strong agreement with normality
W < 1
Some departure from normality
W → 0
Strong departure from normality

A W value alone, without its associated p-value and without knowing the sample size, cannot be meaningfully interpreted. A W of 0.95 might be associated with a very small p-value (strong evidence against normality) for a large sample, but with a large p-value (no significant evidence) for a small sample. Always report and interpret W alongside the p-value and n.

⚠️
W Cannot Be Read in Isolation

There is no universal W threshold that separates "normal" from "non-normal." The same W value carries different statistical implications depending on the sample size and significance level. Interpret W, p, n, and graphical diagnostics together.

Shapiro-Wilk Formula

The Shapiro-Wilk statistic W is defined as:

Shapiro-Wilk Test Statistic
W = (Σ aᵢ x₍ᵢ₎)² / Σ (xᵢ − x̄)²
x₍ᵢ₎ = ordered sample observations (x₍₁₎ ≤ x₍₂₎ ≤ … ≤ x₍ₙ₎) = sample mean aᵢ = coefficients derived from expected normal order statistics n = sample size

The numerator squares the sum of weighted ordered observations, where the weights aᵢ are derived from the expected values and covariance structure of the order statistics of a standard normal distribution. The denominator is the total sum of squared deviations from the mean — proportional to the sample variance. When the data are perfectly normal, these two quantities are proportional, and W equals 1.

The aᵢ coefficients are not simple constants. They depend on the sample size n and on the expected order statistics and their covariance matrix under the normal distribution. In practice, these coefficients are tabulated (for small n, Shapiro and Wilk's original 1965 paper provided them) or computed algorithmically by statistical software. Users implementing the test from scratch should use a validated algorithm rather than attempting to derive the coefficients manually.

🔴
Implementation Warning

Do not implement a simplified approximation and label it a Shapiro-Wilk test. The exact p-value requires a numerically validated algorithm. The formulas available in introductory textbooks are often approximate. Use a verified implementation such as R's shapiro.test(), SciPy's shapiro(), or a validated calculator like the one on this page.

How the Shapiro-Wilk Test Works

Here is the step-by-step logic behind the test:

1

Collect and Arrange Observations

Start with n continuous measurements. Sort them from smallest to largest: x₍₁₎ ≤ x₍₂₎ ≤ … ≤ x₍ₙ₎. These are the order statistics of the sample.

2

Obtain the Expected Normal Order Statistics

Under normality, order statistics have known expected values. The aᵢ coefficients weight each observation according to how influential it would be in indicating departure from the normal pattern. Observations near the extremes of a normal distribution carry more weight.

3

Calculate the W Statistic

Apply the formula: W = (Σ aᵢ x₍ᵢ₎)² / Σ(xᵢ − x̄)². A W value close to 1 means the observed ordering of the data closely matches the ordering expected from a normal distribution.

4

Determine the p-Value

The p-value is obtained from the distribution of W under the null hypothesis of normality. Because this distribution is non-standard, it requires specialized tables (for small n) or a numerical approximation algorithm. Statistical software handles this automatically.

5

Compare p to the Chosen α

Set the significance level α before collecting data. If p < α, reject H₀ — there is evidence against normality. If p ≥ α, do not reject H₀ — but also do not conclude the data are proven to be normal.

6

Combine with Graphical Diagnostics

The formal test result always needs context. Examine a Q-Q plot, histogram, and box plot. Consider the sample size and what assumptions your planned statistical procedure actually requires. Use subject-matter knowledge about the data-generating process.

Shapiro-Wilk P-Value Interpretation

The p-value answers this question: if the null hypothesis of normality were true, how likely would we be to observe a W statistic this small or smaller by chance alone? A small p-value means such a W would be unusual under normality — evidence against H₀.

Result Interpretation Action
p < α (e.g., p < 0.05) Evidence against the null hypothesis of normality Investigate graphical diagnostics; consider whether the departure matters for your analysis
p ≥ α (e.g., p ≥ 0.05) Insufficient evidence to reject the null hypothesis of normality The data are consistent with normality, but this does not prove normality. Continue with planned analyses while remaining attentive to the sample size.

Three common misreadings of the p-value deserve explicit correction.

Misreading 1: p > 0.05 proves the data are normal. It does not. It means the test did not find sufficient evidence against normality. The absence of statistical evidence against H₀ is not the same as evidence for H₀. The data might be non-normal in a way the test lacks power to detect — especially for small samples.

Misreading 2: p < 0.05 automatically means you cannot use a parametric test. It does not mean that either. Many parametric procedures are robust to moderate departures from normality, especially with moderate-to-large samples. A significant Shapiro-Wilk result is a signal to investigate further, not an automatic prohibition on parametric methods.

Misreading 3: The p-value measures how normal the data are. It does not measure the degree of normality. It measures the strength of statistical evidence against the null hypothesis of normality, which depends on both the degree of departure and the sample size.

Shapiro-Wilk Test and Sample Size

Sample size is the single most important contextual factor when interpreting the Shapiro-Wilk test result, and it affects the interpretation in opposite directions depending on whether n is small or large.

Small Samples

With small samples — say, fewer than 20 or 30 observations — the Shapiro-Wilk test has limited statistical power. It will often fail to detect moderate departures from normality because there simply is not enough data. A non-significant result in a small sample provides relatively weak evidence about the distributional shape. In this setting, graphical diagnostics such as a Q-Q plot matter more, and the robustness of the planned statistical method deserves particular attention.

⚠️
Small n Warning

The original Shapiro-Wilk (1965) algorithm supports sample sizes from n = 3 to n = 50. Extended algorithms (such as those implemented in R and SciPy) support larger n, but the test's practical usefulness in very small samples is limited by low power. Always check the supported range of your implementation.

Large Samples

With large samples — several hundred or more — the Shapiro-Wilk test becomes sensitive to trivially small departures from normality. A p-value well below 0.05 might correspond to a departure so minor that it has no practical consequence for the statistical procedure being considered. Many parametric procedures remain valid under such minor deviations, particularly when sample sizes are large enough for the central limit theorem to provide adequate protection.

The practical guidance: in large samples, place more weight on graphical diagnostics and on the known robustness of the statistical procedure than on the Shapiro-Wilk p-value alone. A statistically significant normality test result in a large sample is not necessarily a reason to abandon a well-chosen parametric method.

Sample Size and Test Sensitivity

Consider two researchers, both with slightly skewed data. Researcher A has n = 15 and gets p = 0.18 — no significant evidence against normality. Researcher B has n = 400 and gets p = 0.003. Both datasets might show the same visual degree of skewness on a Q-Q plot. The difference in p-values is driven largely by sample size, not by a fundamentally different distributional shape. Researcher B's result does not necessarily mean parametric methods are inappropriate; Researcher A's result does not confirm normality. Both should look at the Q-Q plot and consider what their planned analysis actually requires.

Q-Q Plot: The Essential Visual Companion

A Q-Q plot (quantile-quantile plot) displays the ordered sample observations on one axis against the theoretical quantiles of a normal distribution on the other. If the data are consistent with normality, the points fall approximately along a straight diagonal reference line. Systematic departures from that line indicate specific types of non-normality.

Tool Purpose What It Shows
Shapiro-Wilk test Formal statistical test of normality W statistic and p-value; does not identify the type of departure
Q-Q plot Visual diagnostic Shape and location of departures — skewness, heavy tails, outliers
Histogram Distribution shape Approximate symmetry, skewness, multimodality
Box plot Spread and potential outliers Median, IQR, whiskers, outlying values

Reading a Q-Q plot is a skill worth developing. When points curve upward at both ends of the reference line, this typically indicates heavier tails than a normal distribution (leptokurtosis). When the S-curve goes in the opposite direction, the tails are lighter (platykurtosis). When there is a consistent bow shape above or below the line, this suggests skewness — a right bow indicates right-skewed data. Isolated points far from the line often correspond to outliers.

The Q-Q plot answers a question the Shapiro-Wilk test cannot: where does the departure from normality occur? A significant p-value from the test tells you there is evidence of departure; the Q-Q plot tells you what kind.

Worked Examples

Example 1 — Approximately Normal Data

Worked Example 1 — Approximately Normal Data (n = 10)

Scenario: A researcher records resting heart rate (bpm) for 10 healthy adults: 62, 65, 68, 70, 71, 73, 74, 75, 78, 82.

1

Data (ordered): 62, 65, 68, 70, 71, 73, 74, 75, 78, 82. n = 10. x̄ = (62+65+68+70+71+73+74+75+78+82) / 10 = 718 / 10 = 71.8

2

Hypotheses: H₀: The heart rate data are consistent with a normal distribution. H₁: The data are not consistent with a normal distribution. Significance level: α = 0.05.

3

W statistic and p-value (from validated software): W = 0.973, p = 0.920. The observations are evenly distributed across the range with no extreme outliers, which produces a W very close to 1.

4

Decision: p = 0.920 ≥ α = 0.05. We do not reject H₀. The data are consistent with a normal distribution at the 5% significance level.

5

Q-Q plot interpretation: Points would fall approximately along the reference line with no systematic curvature or outlying values.

✅ Reporting: "A Shapiro-Wilk test indicated no evidence of departure from normality for resting heart rate, W = 0.973, p = .920. Visual inspection of the Q-Q plot supported this result."

W and p-value computed using R's shapiro.test() function, which implements the AS R94 algorithm (Royston, 1995) supporting n = 3 to 5000. R Documentation: shapiro.test.

Example 2 — Clearly Skewed Data

Worked Example 2 — Right-Skewed Data (n = 12)

Scenario: Annual income (in thousands) for 12 survey participants: 28, 31, 34, 37, 38, 39, 41, 44, 52, 68, 97, 185.

1

Data (ordered): 28, 31, 34, 37, 38, 39, 41, 44, 52, 68, 97, 185. n = 12. The value 185 is substantially larger than the rest, pulling the distribution to the right.

2

Hypotheses: H₀: The income data are consistent with a normal distribution. H₁: The data are not consistent with a normal distribution. α = 0.05.

3

W statistic and p-value (from validated software): W = 0.784, p = 0.007. The low W reflects the extreme right tail created by the high-income observations.

4

Decision: p = 0.007 < α = 0.05. We reject H₀. There is evidence against the normality assumption for this income distribution.

5

Q-Q plot interpretation: Points in the upper tail would curve substantially above the reference line, consistent with right skewness. The histogram would show a long right tail with most values clustered below 50.

✅ Reporting: "The Shapiro-Wilk test indicated evidence of departure from normality, W = 0.784, p = .007. The Q-Q plot showed marked right skewness, consistent with income distributions. A log transformation or nonparametric method may be more appropriate for these data."

Example 3 — Data with an Outlier

Worked Example 3 — Outlier Impact (n = 8)

Scenario: Exam scores for 8 students: 72, 75, 78, 79, 81, 83, 85, 34. The score of 34 appears unusual — possibly a data entry error, illness, or exceptional circumstance.

1

Data (ordered): 34, 72, 75, 78, 79, 81, 83, 85. n = 8. Without the value 34, the data would range narrowly from 72 to 85, consistent with a roughly normal distribution.

2

Hypotheses: H₀: The score data are consistent with a normal distribution. H₁: They are not. α = 0.05.

3

W statistic and p-value: W = 0.803, p = 0.034. The test is significant largely because of the single low value.

4

Decision: p = 0.034 < 0.05. Reject H₀. However, the significant result is driven by the single outlying score of 34. Before drawing firm conclusions, investigate whether this score is a legitimate observation or a recording error.

5

Important: Do not delete this observation simply because it produced a significant Shapiro-Wilk result. Investigate it substantively. If it is a legitimate score, it belongs in the analysis. A box plot would flag it as a potential outlier for further investigation.

✅ Lesson: Outliers can produce significant Shapiro-Wilk results even when the remaining data are approximately normal. Always examine which observations drive the result, and investigate unusual values substantively rather than deleting them to achieve non-significance.

Statistical Significance vs. Practical Importance

A statistically significant Shapiro-Wilk test does not automatically mean a planned parametric analysis is invalid. The relevant question is whether the departure from normality is large enough to meaningfully affect the conclusions of the specific method being used.

Many parametric procedures — the two-sample t-test, one-way ANOVA — are reasonably robust to moderate departures from normality, particularly when sample sizes are equal across groups and when n is moderate or large. The robustness comes partly from the central limit theorem: for large enough samples, the sampling distribution of means is approximately normal regardless of the raw data distribution.

Conversely, a non-significant Shapiro-Wilk result does not guarantee that every parametric assumption holds. Normality is one assumption among several — independence, equal variances (for some tests), and correct model specification all matter too. A comprehensive assumption checking process combines normality assessment with checks of these other conditions.

What If the Shapiro-Wilk Test Is Significant?

A statistically significant Shapiro-Wilk result calls for further investigation — not an automatic switch to a nonparametric test. The appropriate response depends on several factors:

Decision Framework After a Significant Shapiro-Wilk Result

Examine the Q-Q plot and histogram
Identify the nature of the departure (skewness, outlier, heavy tails, etc.)
Investigate unusual observations
Confirm whether outliers are errors, legitimate values, or influential observations
Consider sample size and robustness
If n is large and departure is minor, parametric methods may remain appropriate
Consider data transformation
Log, square root, or other transformations may address systematic skewness
Consider nonparametric alternatives
Use when the departure is substantial and the parametric procedure is not robust to it

Common nonparametric alternatives to consider when normality is not tenable:

Research Design Parametric Method Nonparametric Alternative
Two independent groupsTwo-sample t-testMann-Whitney U test
One group vs. reference valueOne-sample t-testWilcoxon signed-rank test
Two related measurementsPaired t-testWilcoxon signed-rank test
Three or more independent groupsOne-way ANOVAKruskal-Wallis test
Correlation (two variables)Pearson correlationSpearman rank correlation

Shapiro-Wilk vs. Other Normality Tests

Shapiro-Wilk vs. Kolmogorov-Smirnov

Feature Shapiro-Wilk Kolmogorov-Smirnov
Primary purposeNormality assessmentComparison against a fully specified distribution; also used for two-sample comparison
Test statisticWD (maximum deviation between empirical and theoretical CDF)
Parameters estimated from dataMean and variance estimated from sample; the Shapiro-Wilk coefficients account for thisWhen parameters are estimated from data, the standard K-S table is not valid — the Lilliefors correction is needed
Common recommendationOften preferred for normality testing, particularly with smaller samplesMore general; requires fully specified distribution or Lilliefors correction for normality testing with estimated parameters
Visual complementQ-Q plotQ-Q plot; empirical CDF plot

The Kolmogorov-Smirnov test in its standard form requires the reference distribution to be fully specified before seeing the data — meaning exact μ and σ must be stated, not estimated from the sample. When researchers estimate μ and σ from the sample itself (as is always the case in practice), the standard K-S critical values are inappropriate, and the Lilliefors test provides the correct critical values. This distinction matters for correct application.

Shapiro-Wilk vs. Anderson-Darling

Feature Shapiro-Wilk Anderson-Darling
Test statisticW (based on regression against expected order statistics)A² (based on weighted distances across the full distribution)
Tail sensitivityGenerally good overall; sensitive to departures in the central and tail regionsGives more weight to tail behavior; may be more sensitive to deviations in the tails
Sample size applicabilityCommonly used for n up to 5000 with modern algorithmsAvailable for various distributions; commonly used in quality control settings
Software availabilityAvailable in all major statistical packagesAvailable in many packages (SciPy, MATLAB, Minitab)

Shapiro-Wilk vs. Jarque-Bera

The Jarque-Bera test takes a different approach: it computes sample skewness and excess kurtosis, then tests whether both are simultaneously consistent with zero (as expected for a normal distribution). Unlike Shapiro-Wilk, which uses the full ordering of observations, Jarque-Bera summarizes departures from normality through just two moments. It was originally developed for large samples and econometric contexts. For small samples, it tends to be less reliable than Shapiro-Wilk. Neither test is uniformly best, and the choice depends on the research context, sample size, and what type of departure from normality is most likely.

Running the Shapiro-Wilk Test in Software

R

R's built-in shapiro.test() function implements the AS R94 algorithm (Royston, 1995), which supports n = 3 to 5000.

R — Shapiro-Wilk Test
# Define your data vector
x <- c(62, 65, 68, 70, 71, 73, 74, 75, 78, 82)

# Run the Shapiro-Wilk test
result <- shapiro.test(x)
print(result)

# Output:
#   Shapiro-Wilk normality test
# W = 0.97303, p-value = 0.9204

# Q-Q plot for visual inspection
qqnorm(x, main = "Q-Q Plot")
qqline(x, col = "steelblue", lwd = 2)

The output provides W and the p-value directly. Combine with qqnorm() and qqline() to generate a Q-Q plot. For residuals from a linear model, apply the test to the residuals object: shapiro.test(residuals(my_model)). See the R documentation for current details.

Python

SciPy's scipy.stats.shapiro() function provides the Shapiro-Wilk test. Check the current SciPy documentation for supported sample sizes and any version-specific behavior.

Python (SciPy) — Shapiro-Wilk Test
from scipy.stats import shapiro
import scipy.stats as stats
import matplotlib.pyplot as plt

data = [62, 65, 68, 70, 71, 73, 74, 75, 78, 82]

# Run the Shapiro-Wilk test
statistic, p_value = shapiro(data)
print(f"W = {statistic:.4f}, p = {p_value:.4f}")

# Interpretation
alpha = 0.05
if p_value < alpha:
    print("Evidence against normality (reject H0)")
else:
    print("Insufficient evidence to reject normality")

# Q-Q plot
stats.probplot(data, dist="norm", plot=plt)
plt.title("Q-Q Plot")
plt.show()

SciPy's implementation supports a range of sample sizes; refer to the SciPy documentation for the current supported range and any warnings for very large samples. For residuals from a fitted model, pass the residuals array directly to shapiro().

SPSS

In SPSS, the Shapiro-Wilk test is available through the Explore procedure:

1

Open Explore

Go to Analyze → Descriptive Statistics → Explore. Move your variable(s) to the Dependent List.

2

Request Normality Tests

Click Plots → check Normality plots with tests. This produces both the Shapiro-Wilk test and the Kolmogorov-Smirnov (Lilliefors correction) test.

3

Read the Output

The Tests of Normality table reports the Shapiro-Wilk W statistic and its Sig. (significance) value. The Sig. value is the p-value. Also examine the Q-Q plot output for visual confirmation.

Verify current SPSS menu paths in the version you are using, as exact menu names may differ across releases. IBM's documentation provides current guidance for SPSS Statistics.

Excel

Microsoft Excel does not include a native Shapiro-Wilk test function. To run the test with Excel data, the most practical options are: exporting the data to R or Python and using their implementations; using an Excel add-in such as the Real Statistics Resource Pack, which adds normality testing functions; or entering the data directly into the interactive calculator on this page. Do not use Excel's built-in statistical functions to construct an approximation and label it a Shapiro-Wilk test.

How to Report Shapiro-Wilk Results

Statistical reporting should include the test statistic, sample size, p-value, and a plain-language conclusion that avoids overclaiming. Below are standard templates:

Reporting Templates

Non-significant result (insufficient evidence against normality):

A Shapiro-Wilk test indicated no evidence of departure from normality (W = [value], p = [value]).

Significant result (evidence against normality):

The Shapiro-Wilk test indicated evidence of departure from normality (W = [value], p = [value]). Visual inspection of the Q-Q plot [describe what you saw]. [State what action was taken: transformation, nonparametric test, or justification for proceeding with the parametric method despite the significant result.]

Note: Never write "the data were shown to be normal" or "normality was confirmed." The test can only fail to reject normality, not confirm it.

Shapiro-Wilk Test Calculator

Enter your data below — comma-separated, one value per line, or space-separated. The calculator runs a validated Shapiro-Wilk implementation in your browser. No data is sent to any server.

Shapiro-Wilk Test Calculator

ℹ️
Important Note on Interpretation

The Shapiro-Wilk test should be interpreted together with graphical diagnostics (Q-Q plot, histogram) and in the context of your sample size and the assumptions of the statistical procedure you are planning. A non-significant result does not prove normality.

Q-Q Plot (Visual Normality Check)

Points near the reference line indicate consistency with normality. Systematic curvature indicates departure.

Common Mistakes with the Shapiro-Wilk Test

Mistake What to Avoid What to Do Instead
Treating p > 0.05 as proof of normality "The data are confirmed normal because p = 0.32." State that there is insufficient evidence against normality; combine with Q-Q plot.
Auto-rejecting parametric tests when p < 0.05 "Significant Shapiro-Wilk means we cannot use ANOVA." Investigate the departure; consider robustness and sample size; use judgment.
Testing every variable automatically Running Shapiro-Wilk on all variables before all analyses by default. Test only the variable or residuals for which normality is actually a relevant assumption.
Ignoring sample size effects Treating p = 0.04 the same way at n = 12 and n = 800. Recognize that large samples detect trivially small departures; weight graphical diagnostics more heavily at large n.
Testing raw data when residuals matter Testing the raw Y variable before linear regression. Fit the model and test the residuals.
Deleting outliers to achieve p > 0.05 Removing the outlier at 34 because it made the test significant. Investigate every outlier substantively before making any decision about it.
Ignoring Q-Q plots Reporting only the p-value with no visual diagnostic. Always include a Q-Q plot; it shows where and how the data depart from normality.
Using arbitrary skewness/kurtosis cutoffs "Skewness between −2 and +2 means the data are normal." No universal cutoff applies across all contexts; use formal tests and graphical methods together.

Real-World Applications

🏥

Medical Research

Checking residuals from a linear regression of blood biomarkers before reporting regression coefficients. Important: the normality assumption applies to residuals, not necessarily to the raw biomarker values.

🧪

Psychology

Assessing whether test scores or Likert-scale composite measures are approximately normally distributed before applying a parametric group comparison test.

🌱

Biology

Checking measurement data (plant heights, enzyme activity levels) for normality before applying a t-test or ANOVA in a controlled experiment with small group sizes.

📊

Quality Control

Verifying that production measurements (part dimensions, fill weights) follow a normal distribution — a core assumption in many statistical process control charts.

🏫

Education Research

Checking whether exam scores or assessment data meet normality assumptions before comparing group means across classrooms or schools.

💹

Finance

Testing whether asset return residuals from a model are approximately normal — though with large financial datasets, departure from normality is common and often expected.

Frequently Asked Questions

The Shapiro-Wilk test is a statistical test for normality. It assesses whether a sample of observations is consistent with the assumption that the data came from a normally distributed population. The test produces a W statistic and a p-value. A p-value below the chosen significance level is evidence against normality; a p-value above it means there is insufficient evidence to reject normality — not that normality has been proven.

W measures how closely the ordered sample observations align with the expected order statistics of a normal distribution. W ranges from 0 to 1. Values close to 1 indicate strong agreement with normality; values further from 1 indicate greater departure. W cannot be interpreted meaningfully without knowing the sample size and p-value — the same W has different implications at different sample sizes.

No. A non-significant Shapiro-Wilk result (p ≥ 0.05) means there is insufficient evidence in your sample to reject the null hypothesis of normality. It does not prove the population is exactly normal. With small samples in particular, the test may lack the power to detect meaningful departures from normality, so a non-significant result provides relatively weak evidence about distributional shape. Always combine the test result with a Q-Q plot and consider the sample size.

A significant result (p < 0.05) provides evidence against the null hypothesis that the data are consistent with a normal distribution. It does not automatically mean your planned parametric analysis is invalid. The appropriate response is to examine the Q-Q plot to identify the nature of the departure (skewness, outliers, heavy tails), consider the sample size, and assess whether the departure is large enough to practically affect the statistical method you plan to use.

Sample size affects the test in two opposite ways. With small samples (roughly n < 30), the test has limited statistical power — it often fails to detect moderate departures from normality, so a non-significant result provides weak evidence. With large samples (n in the hundreds or more), the test becomes sensitive to trivially small departures that may have no practical consequence. The p-value reflects both the degree of departure from normality and the sample size, so always interpret the result in the context of n.

For most statistical models — linear regression, ANOVA, t-tests — the normality assumption applies to the model residuals or errors, not necessarily to the raw outcome variable. In practice, you should fit your model first, obtain the residuals, and test those for normality. Testing the raw dependent variable before fitting the model often answers the wrong question, because a skewed raw variable can produce well-behaved residuals once the effects of predictors are accounted for.

The Shapiro-Wilk test is specifically designed for normality assessment and works well for small to moderate samples. The Kolmogorov-Smirnov test in its standard form compares a sample against a fully specified distribution with known parameters. When parameters are estimated from the data (the usual situation in practice), the standard K-S critical values are not appropriate — the Lilliefors correction is needed. Neither test is universally superior; both should be combined with graphical diagnostics.

The Shapiro-Wilk test can be applied to large samples, and modern implementations support n up to 5000. However, with large samples the test often produces a significant result for departures from normality so small that they have no practical consequence. When n is large, place more weight on graphical diagnostics and on the known robustness of your planned statistical procedure than on the p-value from the normality test alone.

Use the built-in function: shapiro.test(x), where x is your numeric vector. The function returns the W statistic and p-value. For regression residuals, use shapiro.test(residuals(my_model)). Combine with qqnorm(x); qqline(x) to produce a Q-Q plot for visual inspection.

Use SciPy: from scipy.stats import shapiro; statistic, p_value = shapiro(data). The function returns the W statistic and p-value. Generate a Q-Q plot with scipy.stats.probplot(data, dist="norm", plot=plt). Refer to the SciPy documentation for the current supported sample size range.

Examine the Q-Q plot to understand what type of departure from normality is present. Investigate whether outliers are driving the result. Consider the sample size — with large n, the departure may be trivially small. Assess whether the planned statistical procedure is robust to the observed departure. If the departure appears practically important, consider data transformation, a nonparametric alternative, or a robust method. Never delete observations simply because they produced a significant normality test result.

Sources and References

This guide draws on the following primary and secondary sources. Formulas and algorithmic details are cross-referenced against the original publication and established computational references.

  • Shapiro, S.S. & Wilk, M.B. (1965) — "An analysis of variance test for normality (complete samples)." Biometrika, 52(3–4), 591–611. The original paper introducing the W statistic and providing coefficient tables for n = 3 to 50.
  • Royston, J.P. (1995) — "Remark AS R94: A remark on algorithm AS 181." Applied Statistics, 44, 547–551. The AS R94 algorithm extending the test to n = 3–5000, implemented in R's shapiro.test().
  • NIST Engineering Statistics HandbookNormality Tests. National Institute of Standards and Technology. itl.nist.gov
  • Penn State STAT 415Introduction to Mathematical Statistics. Penn State Eberly College of Science. online.stat.psu.edu
  • SciPy Documentationscipy.stats.shapiro. docs.scipy.org
  • R Documentationstats::shapiro.test. rdocumentation.org
  • IBM SPSS Statistics Documentation — Explore procedure, normality tests. ibm.com/docs