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:
xi are the ordered random sample values
ai are constants generated from the covariances, variances and means of the sample (size n) from a normally distributed sample.
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:
- Click BASIC STATISTICS
- Choose NORMALITY TEST
- Type your data column in the VARIABLE BOX (do not fill in the reference
- 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:
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.
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.