Statistics Definitions > Shapiro-Wilk Test

## What is the Shapiro-Wilk Test?

The Shapiro-Wilk test is a way to tell if a random sample comes from a normal distribution. The test gives you a W value; small values indicate your sample is *not *normally distributed (you can reject the null hypothesis that your population is normally distributed if your values are under a certain threshold). The formula for the W value is:

where:

x_{i} are the ordered random sample values

a_{i} are constants generated from the covariances, variances and means of the sample (size n) from a normally distributed sample.

The test has limitations, most importantly that the test has a bias by sample size. The larger the sample, the more likely you’ll get a statistically significant result.

## How to Perform a Shapiro-Wilk Test

It’s rare that you’ll want to calculate the Shapiro-Wilk by hand. Many software packages can make the calculations for you:

**Minitab:**- Click BASIC STATISTICS
- Choose NORMALITY TEST
- Type your data column in the VARIABLE BOX (do not fill in the reference

box) - Choose RYAN JOINER (this is the same as Shapiro-Wilk)
- Click OK

**R:**Although not as popular as SPSS or Excel, R does have the ability to perform the test. The argument is very simple:

> shapiro.test(sample)

You can find more information about the argument*here*.**SPSS:***This article*on Laerd.com shows how to perform the test in SPSS (it also incorporates the Kolmogorov-Smirnov test).**Excel:***This article*has a very good outline of how to run the test in Excel for samples up to 5,000. There are also instructions on how to handle larger samples.**MATLAB:**Instructions for the test are given on the*MathWorks site*.**SAS:**The SAS support site has comprehensive instructions for a variety of Goodness of Fit tests. You can find the documentation*here*.

Tip: Use this test in combination with a normal probability plot.

## References

Beyer, W. H. CRC Standard Mathematical Tables, 31st ed. Boca Raton, FL: CRC Press, pp. 536 and 571, 2002.

Everitt, B. S.; Skrondal, A. (2010), The Cambridge Dictionary of Statistics, Cambridge University Press.

Gonick, L. (1993). The Cartoon Guide to Statistics. HarperPerennial.

Vogt, W.P. (2005). Dictionary of Statistics & Methodology: A Nontechnical Guide for the Social Sciences. SAGE.

**CITE THIS AS:**

**Stephanie Glen**. "Shapiro-Wilk Test: What it is and How to Run it" From

**StatisticsHowTo.com**: Elementary Statistics for the rest of us! https://www.statisticshowto.com/shapiro-wilk-test/

**Need help with a homework or test question? **With **Chegg Study**, you can get step-by-step solutions to your questions from an expert in the field. Your first 30 minutes with a Chegg tutor is free!

**Comments? Need to post a correction?** Please post a comment on our ** Facebook page**.