Guides  /  shapiro wilk test

Testing for normality: Shapiro-Wilk and the alternatives

Normality testing is the most over-applied step in applied statistics. This guide explains what Shapiro-Wilk actually measures, why its p-value is unreliable at both ends of the sample-size range, how to read a Q-Q plot instead, and — most importantly — which of your tests genuinely require normality in the first place.

Hafiz Ahmad Tariq Written and reviewed by Hafiz Ahmad Tariq, Senior Biostatistician
Updated 17 August 202617 min read
What is the Shapiro-Wilk test?

The Shapiro-Wilk test assesses whether a sample could plausibly have come from a normally distributed population. Its null hypothesis is that the data are normal, so a significant result indicates a departure from normality. Its p-value depends heavily on sample size, missing real departures in small samples and flagging trivial ones in large samples, so it should be read alongside a Q-Q plot rather than on its own.

Definition

What a normality test does

A normality test asks whether your sample is consistent with having been drawn from a normal population. The null hypothesis is that it is, which reverses the usual logic: here a significant result is the unwelcome one.

TestHow it worksBest for
Shapiro-WilkCorrelates the data with the values normality would predictMost situations; the standard choice
Kolmogorov-SmirnovLargest gap between observed and expected cumulative distributionWeaker; only use with the Lilliefors correction
Anderson-DarlingWeights the tails more heavilyWhen tail behaviour matters
D'Agostino-PearsonCombines skewness and kurtosisLarger samples; says how it departs

Shapiro-Wilk is generally the most powerful of these and is the sensible default. Kolmogorov-Smirnov without the Lilliefors correction is genuinely poor — it assumes the population mean and standard deviation are known rather than estimated — yet it still appears in software menus and in student work.

Report the statistic as well as the p-value in every case, since the two carry different information and only one of them is independent of sample size.

Non-significant does not mean normal

Failing to reject the null means the data are consistent with normality, not that they are normal. With 15 observations, almost anything is consistent with normality, because the test has nowhere near enough information to say otherwise.

The core problem

Why the p-value misleads

The Shapiro-Wilk p-value confounds two things: how non-normal the data are, and how much data you have. This makes it unreliable at both ends of the range, and in opposite directions.

underpowered in small samples and oversensitive in large ones"> n = 20n = 50n = 200n = 1000 misses realdepartures borderline flags trivialdepartures Probability of rejecting normality, for the same mildly non-normal population, as n grows. The test answers “do I have enough data to detect non-normality?” — not “does it matter?”
For the same mildly non-normal population, the probability of rejecting normality rises steadily with sample size. The population has not changed; only the evidence about it has.
Sample sizeWhat happensConsequence
n < 30Very low powerReal departures go undetected; the test reassures you falsely
n = 30–100ReasonableThe range where the test is genuinely informative
n > 300Very high powerTrivial departures reach significance; you reject normality for data that are fine

The irony is exact and worth stating plainly. In small samples, where normality matters most because the central limit theorem cannot help you, the test is least able to detect a problem. In large samples, where normality matters least because the central limit theorem does most of the work, the test is most likely to flag one.

Simulation work has made this concrete. For the same population with mild skew, a normality test may reject about 15% of the time at n = 20 and close to 100% of the time at n = 1,000 — while the t-test's actual error rate stays acceptably near its nominal 5% throughout. The normality test and the test you care about are answering different questions, and only the second one bears on whether your conclusion is sound.

The rule that follows

Never let a normality test alone decide your analysis. Use it as one input alongside a Q-Q plot, a histogram, and knowledge of how robust your intended test actually is. A significant Shapiro-Wilk on n = 2,000 is almost meaningless; a non-significant one on n = 12 is entirely uninformative.

Diagnostics

Reading a Q-Q plot

A quantile-quantile plot compares your observed values against the values a normal distribution would produce. If the data are normal, the points fall along a straight line.

normal — points on the line right-skewed — curves up heavy tails — S-shape A Q-Q plot shows HOW the data depart from normal, which a p-value cannot. Skew and heavy tails matter for different reasons and call for different responses.
The shape of the departure tells you what kind of problem you have, which a single p-value cannot.
PatternMeansTypical response
Points on the lineApproximately normalProceed
Curves upwardRight skewLog or square-root transform
Curves downwardLeft skewSquare or reflect-and-transform
S-shapedHeavy tailsRobust methods or a rank-based test
Flattened SLight tailsRarely a practical problem
Points off at one endOutliersInvestigate individually

This diagnostic information is the reason plots beat tests. Knowing the data are “not normal” tells you nothing about what to do; knowing they are right-skewed points directly at a log transform, and knowing they have heavy tails points at a robust or rank-based method instead.

Histograms are worth plotting alongside, though they are less diagnostic than they look. The apparent shape of a histogram depends heavily on the bin width chosen, and the same data can look approximately normal or clearly bimodal depending on that arbitrary decision. A Q-Q plot has no such tuning parameter, which is why it is the more reliable of the two for judging normality specifically. Use the histogram to spot gross features — bimodality, floor effects, a spike at zero — and the Q-Q plot to judge the shape of the tails.

Expect wobble at the ends

Even genuinely normal data produce Q-Q plots that deviate at the extreme ends, because the most extreme observations are the most variable. Judge the middle of the plot strictly and the tails generously.

Assumptions

Which tests actually require normality

A great deal of unnecessary normality testing happens because people assume every test requires it. Most do not, and several that appear to actually require something subtly different.

TestRequires normality ofRobustness
One-sample t-testThe sampling distribution of the meanRobust above n ≈ 30
Independent t-testResiduals within each groupRobust with equal group sizes
Paired t-testThe differences, not the raw scoresOften overlooked
ANOVAResidualsRobust with reasonable n
Linear regressionResidualsRobust; matters mainly for small-sample intervals
Pearson’s rBivariate normalityAffects the p-value, not r itself
Chi-squareNothingNot applicable — categorical data
Mann-Whitney, Kruskal-WallisNothingRank-based by design
The paired t-test catches people out

It assumes the difference scores are normally distributed, not the before and after scores separately. Two heavily skewed sets of scores can produce perfectly well-behaved differences. Test the differences.

Not sure which assumptions your analysis actually needs?

Answer four questions about your design and be taken to the test that fits, with its assumptions listed and the fallback if they fail.

Use the test chooser

Common error

The assumption is about residuals, not raw data

For t-tests, ANOVA and regression, the normality assumption applies to the residuals — the part of each observation the model does not explain — not to the outcome variable as a whole.

This distinction has a practical consequence that regularly leads people astray. If two groups genuinely have different means, the combined distribution of the outcome will look bimodal or at least non-normal, even when each group is perfectly normal internally. Running Shapiro-Wilk on the pooled outcome variable will return a significant result, and it will be telling you about the group difference you are trying to test, not about a violated assumption.

For a t-test — check normality within each group separately, or of the residuals
For ANOVA — check the residuals, not the outcome
For regression — save the residuals and plot those
For a paired test — check the difference scores

The same logic explains a related confusion about predictors. Nothing in linear regression requires the predictor variables to be normally distributed. A binary predictor, a heavily skewed one, or a deliberately balanced experimental factor are all perfectly acceptable. The assumption concerns only the residuals, and testing your predictors for normality is effort spent on a requirement that does not exist.

A quick diagnostic

If your outcome looks strongly non-normal but the residuals look fine, your model is working correctly and there is nothing to fix. If the outcome looks fine but the residuals do not, you have a genuine problem — usually a missing predictor or the wrong functional form.

Worked example

Worked example: interpreting the output

Three studies report Shapiro-Wilk alongside their sample size. The correct response differs in each case.

StudynShapiro-WilkQ-Q plotWhat to do
A18W = .94, p = .289Mild upward curveNon-significant only because n is tiny. Trust the plot: consider a transform or a rank-based test
B64W = .91, p = .002Clear upward curveA genuine departure at an informative sample size. Transform, or use Mann-Whitney
C1,240W = .997, p = .019Points essentially on the lineSignificant only because n is large. W of .997 is near-perfect. Proceed with the parametric test

Study C is the case that causes most unnecessary work. A W statistic of .997 indicates the data are almost exactly normal; the significant p-value reflects only that with 1,240 observations the test can detect a departure far too small to affect anything. Switching to a non-parametric test here would sacrifice power for no benefit.

Study A is the one that most often goes wrong in the opposite direction. With 18 observations the researcher sees a comfortable p-value, records “normality was confirmed”, and proceeds. But the Q-Q plot shows a real curve, and at that sample size the central limit theorem offers little protection either. This is precisely the situation where the assumption matters most and where the test is least capable of detecting a violation — so the plot should override the p-value entirely.

Read W, not just p

The W statistic ranges from 0 to 1 and measures how closely the data track normality, independently of sample size. Values above about .95 indicate a close fit. Reporting W alongside p lets a reader judge whether a significant result reflects a real problem or merely a large sample.

Remedies

What to do when normality fails

In order of preference, and only once you have established that the departure is real and that your test genuinely requires the assumption.

OptionWhenCost
Do nothingn is large and the test is robustNone — often the right answer
TransformSkew, with a natural transformation availableResults are on a transformed scale
Rank-based testOrdinal data, or severe skewSlight power loss; different conclusion wording
Robust methodsOutliers or heavy tailsLess familiar to some readers
BootstrapSmall samples, any shapeComputationally heavier; needs justifying

The first row of that table deserves more weight than it usually gets. The central limit theorem says that the sampling distribution of the mean approaches normality as the sample grows, whatever the shape of the underlying data. That is what the t-test and ANOVA actually require — not that your observations are normal, but that the mean behaves normally across hypothetical repeated samples. For moderately skewed data this holds well by about n = 30 per group, and for severely skewed data by perhaps n = 50. Above those thresholds, a significant normality test is usually telling you something true and irrelevant.

There is a real cost to switching unnecessarily. A rank-based test discards information about the spacing between values, and the conclusion it supports is subtly weaker — a statement about which group tends to score higher rather than about how much higher. If the parametric test was valid, you have given up both power and precision of interpretation for nothing.

Choosing a transformation

PatternTransformationNote
Moderate right skew√xHandles zeros
Strong right skewlog(x)Requires all values > 0
Severe right skew1/xReverses the ordering
Left skew, or reflect then logReflection changes interpretation
Proportionsarcsin(√p)Now often considered unnecessary

One caution about transforming to satisfy a test rather than to reflect the data. If a variable is skewed because it genuinely is — income, reaction times, hospital length of stay — a log transform is often the more natural scale to think on, and the transformation is substantively justified as well as statistically convenient. If it is skewed because of a handful of data-entry errors or a floor effect, transforming hides a problem that should be fixed or reported instead. Ask why the skew is there before deciding what to do about it.

Transformations change what you are testing

After a log transform, a difference in means is a difference in geometric means, and back-transformed results are ratios rather than differences. That is often perfectly interpretable — sometimes more so — but it must be stated. Do not transform, analyse, and then report as though the units were unchanged.

Pitfalls

Six mistakes that cost marks

1. Testing the raw outcome instead of the residuals

With genuinely different group means, the pooled outcome will look non-normal even when every group is normal.

2. Treating a significant result in a large sample as a problem

Check W and the Q-Q plot. With n over a few hundred, significance is close to guaranteed.

3. Treating a non-significant result in a small sample as reassurance

With n under 30 the test has very little power. It has not established normality.

4. Testing normality for tests that do not require it

Chi-square, Mann-Whitney and Kruskal-Wallis have no normality assumption whatsoever. Running Shapiro-Wilk before them is wasted effort that occasionally leads people to abandon a perfectly appropriate test.

5. Using Kolmogorov-Smirnov without the Lilliefors correction

The uncorrected version assumes known population parameters and is badly conservative. Use Shapiro-Wilk.

6. Switching to non-parametric on the strength of the p-value alone

Decide from the plot, the sample size and the robustness of the intended test — not from one number.

Reporting

Reporting normality checks

SituationHow to write it
Assumption metShapiro-Wilk indicated no departure from normality, W = .97, p = .213
Large sample, trivial departureW = .997, p = .019; given n = 1,240 and near-linear Q-Q plots, the parametric test was retained
Genuine departureW = .91, p = .002; scores were right-skewed, so a Mann-Whitney U test was used
After transformationScores were log-transformed, after which residuals were approximately normal (W = .98, p = .341)
Report W as well as p so the reader can judge the size of the departure
State what you tested — residuals, difference scores, or within groups
Mention the Q-Q plot and what it showed
Give the sample size in the same sentence, since it governs interpretation
Justify the decision you took, rather than only reporting the test
Say if you transformed, and report on which scale the results sit
Have your assumption checks reviewed before submission

Send your dataset and draft analysis. A named statistician verifies the assumptions that actually apply, confirms the test suits the data, and returns annotated output with APA tables.

See SPSS data analysis

Answers

Frequently asked questions

What is the Shapiro-Wilk test used for?

To assess whether a sample is consistent with coming from a normally distributed population. Its null hypothesis is that the data are normal, so a significant p-value indicates a departure. It should be interpreted alongside a Q-Q plot and the sample size rather than on its own.

What does a significant Shapiro-Wilk result mean?

That the data depart from normality more than chance alone would produce — but not necessarily by an amount that matters. In samples above a few hundred, trivial departures reach significance routinely. Check the W statistic and the Q-Q plot before changing your analysis.

Is my data normal if Shapiro-Wilk is not significant?

Not necessarily. A non-significant result means the data are consistent with normality, which in a small sample is a very weak statement. With fewer than about 30 observations the test has little power to detect even substantial departures.

Should I test the raw data or the residuals for normality?

The residuals, for t-tests, ANOVA and regression. If group means genuinely differ, the pooled outcome will look non-normal even when each group is perfectly normal, so testing the raw variable will mislead you. For a paired t-test, test the difference scores.

What should I do if my data are not normally distributed?

First check whether your test actually requires normality and whether it is robust at your sample size — often nothing needs doing. Otherwise consider a transformation for skew, a rank-based test such as Mann-Whitney for ordinal or severely skewed data, or robust methods for heavy tails and outliers.

Which normality test is best?

Shapiro-Wilk is generally the most powerful and is the standard choice. Anderson-Darling is preferable when tail behaviour matters. Avoid Kolmogorov-Smirnov without the Lilliefors correction, since the uncorrected version assumes the population parameters are known rather than estimated.

How do I read a Q-Q plot?

Points falling along the diagonal indicate approximate normality. An upward curve indicates right skew, a downward curve left skew, and an S-shape heavy tails. Some deviation at the extreme ends is expected even for normal data, so judge the middle strictly and the tails generously.

Do I need normality for a chi-square test?

No. Chi-square works with categorical counts and has no normality assumption at all. Its requirements are independent observations, raw counts rather than percentages, and expected counts large enough — conventionally at least 5 in most cells.

Send the data. Get a fixed quote.

Attach your dataset or just describe the project. A named statistician replies with a price and a deadline, usually within one working day.