# Shapiro-Wilk Test: What it is and How to Run it

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:
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.

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:
1. Click BASIC STATISTICS
2. Choose NORMALITY TEST
3. Type your data column in the VARIABLE BOX (do not fill in the reference
box)
4. Choose RYAN JOINER (this is the same as Shapiro-Wilk)
5. 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)