Tests for Normality

You can use the NORMALTEST option in the PROC CAPABILITY statement to request several tests of the hypothesis that the analysis variable values are a random sample from a normal distribution. These tests, which are summarized in the table labeled Tests for Normality, include the following:

  • Shapiro-Wilk test

  • Kolmogorov-Smirnov test

  • Anderson-Darling test

  • Cramér-von Mises test

Tests for normality are particularly important in process capability analysis because the commonly used capability indices are difficult to interpret unless the data are at least approximately normally distributed. Furthermore, the confidence limits for capability indices displayed in the table labeled Process Capability Indices require the assumption of normality. Consequently, the tests of normality are always computed when you specify the SPEC statement, and a note is added to the table when the hypothesis of normality is rejected. You can specify the particular test and the significance level with the CHECKINDICES option.

Shapiro-Wilk Test

If the sample size is 2000 or less, 1 the procedure computes the Shapiro-Wilk statistic (also denoted as to emphasize its dependence on the sample size ). The statistic is the ratio of the best estimator of the variance (based on the square of a linear combination of the order statistics) to the usual corrected sum of squares estimator of the variance. When is greater than three, the coefficients to compute the linear combination of the order statistics are approximated by the method of Royston (1992). The statistic is always greater than zero and less than or equal to one .

Small values of lead to rejection of the null hypothesis. The method for computing the -value (the probability of obtaining a statistic less than or equal to the observed value) depends on . For , the probability distribution of is known and is used to determine the -value. For , a normalizing transformation is computed:

     

The values of , , and are functions of obtained from simulation results. Large values of indicate departure from normality, and since the statistic has an approximately standard normal distribution, this distribution is used to determine the -values for .

EDF Tests for Normality

The Kolmogorov-Smirnov, Anderson-Darling and Cramér-von Mises tests for normality are based on the empirical distribution function (EDF) and are often referred to as EDF tests. EDF tests for a variety of non-normal distributions are available in the HISTOGRAM statement; see the section EDF Goodness-of-Fit Tests for details. For a thorough discussion of these tests, refer to D’Agostino and Stephens (1986).

The empirical distribution function is defined for a set of independent observations with a common distribution function . Under the null hypothesis, is the normal distribution. Denote the observations ordered from smallest to largest as . The empirical distribution function, , is defined as

     

Note that is a step function that takes a step of height at each observation. This function estimates the distribution function . At any value , is the proportion of observations less than or equal to , while is the probability of an observation less than or equal to . EDF statistics measure the discrepancy between and .

The EDF tests make use of the probability integral transformation . If is the distribution function of , the random variable is uniformly distributed between 0 and 1. Given observations , the values are computed. These values are used to compute the EDF test statistics, as described in the next three sections. The CAPABILITY procedures computes the associated p-values by interpolating internal tables of probability levels similar to those given by D’Agostino and Stephens (1986).

Kolmogorov-Smirnov Test

The Kolmogorov-Smirnov statistic (D) is defined as

     

The Kolmogorov-Smirnov statistic belongs to the supremum class of EDF statistics. This class of statistics is based on the largest vertical difference between and .

The Kolmogorov-Smirnov statistic is computed as the maximum of and , where is the largest vertical distance between the EDF and the distribution function when the EDF is greater than the distribution function, and is the largest vertical distance when the EDF is less than the distribution function.

     

PROC CAPABILITY uses a modified Kolmogorov statistic to test the data against a normal distribution with mean and variance equal to the sample mean and variance.

Anderson-Darling Test

The Anderson-Darling statistic and the Cramér-von Mises statistic belong to the quadratic class of EDF statistics. This class of statistics is based on the squared difference . Quadratic statistics have the following general form:

     

The function weights the squared difference .

The Anderson-Darling statistic () is defined as

     

Here the weight function is .

The Anderson-Darling statistic is computed as

     

Cramér-von Mises Test

The Cramér-von Mises statistic () is defined as

     

Here the weight function is .

The Cramér-von Mises statistic is computed as