Skip to main content icon/video/no-internet

The most popular nongraphical procedure for testing for fit to the normal distribution is the Shapiro-Wilk test. The test can be obtained easily from leading statistical packages such as R, SAS, and SPSS. This is fortunate because the Shapiro-Wilk test statistic W is laborious to calculate by hand. The Shapiro-Wilk test statistic is obtained by dividing the square of an appropriate linear combination of the sample order statistics by the sum of squares error. The formula is

None

where ai represents special coefficients obtained from a table in Shapiro and Wilk's 1965 report or a source such as Conover. A computer algorithm given by Royston will also approximate these coefficients. The formulas are also found online in the Wikipedia. After W is calculated, the hypothesis of normality is rejected if W is less than a quantile from a value in another special table.

One major flaw in the original form of the Shapiro-Wilk test was that the table with the necessary coefficients and percentage points was available only for samples of size 50 or less. To deal with this flaw, Shapiro and Francia adapted the W statistic so that the necessary coefficients for the linear combinations depended only on the expected values of the normal order statistics, which are more readily available. Another table of empirically obtained percentage points was given. Royston extended the Shapiro-Wilk test for sample sizes up to 2,000. Royston's method involves an approximate normalizing transformation on the W statistic, which is not asymptotically normal. The calculations are tedious by hand but easily programmed into a computer. In 1989, Royston provided a correction for cases in which ties are present in the data. Royston's version of the Shapiro-Wilk test is available on SAS.

In the Shapiro-Wilk test, the null hypothesis is defined to be that the data are normally distributed (with some unspecified mean and standard deviation), and the alternative hypothesis is that the data are not normal. Therefore, a rejection of the null hypothesis, which will occur when the value of the W statistic is small and the p value is less than the specified level of significance (usually α= .05), indicates a significant deviation from normality. A value of W close to its maximum of 1 indicates a close fit to normality, which is indicated by a p value that is above α= .05, and a failure to reject the null.

Unfortunately, the Shapiro-Wilk test shares many of the standard flaws of most goodness-of-fit tests. When the sample is small, the test lacks power, and often the test will fail to reject a sample that arises from a non-normal population. This is troublesome because it is these small sample situations in which most analysts are the most concerned with testing for normality. The usual reason to perform a goodness-of-fit test for normality is to determine whether the assumption of normality is met well enough for the analyst to perform standard parametric tests (e.g., t test, ANOVA). If the assumption is not met, then the researcher may need to make a transformation or pursue alternatives such as nonparametrics, bootstrapping, or Bayesian methods. Also, the Shapiro-Wilk test will almost always reject its null hypothesis when the sample is very large. With a data set of several thousands, even minor deviations present in data generated from a known normal distribution will lead to rejection of normality.

...

  • Loading...
locked icon

Sign in to access this content

Get a 30 day FREE TRIAL

  • Watch videos from a variety of sources bringing classroom topics to life
  • Read modern, diverse business cases
  • Explore hundreds of books and reference titles

Sage Recommends

We found other relevant content for you on other Sage platforms.

Loading