Dataplot Vol 1 Vol 2

# WILKS SHAPIRO NORMALITY TEST

Name:
WILKS SHAPIRO NORMALITY TEST
Type:
Analysis Command
Purpose:
Perform a Wilks Shapiro test for normality.
Description:
The Wilks Shapiro test statistic is defined as:

$$W = \frac{(\sum_{i=1}^{n}{w_iX'_i})^2} {\sum_{i=1}^{n}{(X_i - \bar{X})^2}}$$

where the summation is from 1 to n and n is the number of observations. The array X contains the original data, X' are the ordered data, $$\bar{X}$$ is the sample mean of the data, and w'=(w1, w2, ... , wn) or

$$w' = MV^{-1}[(M'V^{-1})(V^{-1}M)]^{-1/2}$$

M denotes the expected values of standard normal order statistics for a sample of size n and V is the corresponding covariance matrix.

W may be thought of as the squared correlation coefficient between the ordered sample values (X') and the wi. The wi are approximately proportional to the normal scores Mi. W is a measure of the straightness of the normal probability plot, and small values indicate departures from normality. Note that the Dataplot PPCC PLOT command is based on a similar concept.

Monte Carlo simulations studies have indicated that the Wilks-Shapiro test has good power properties for a wide range of alternative distributions.

Syntax:
WILKS SHAPIRO NORMALITY TEST <y>
<SUBSET/EXCEPT/FOR qualification>
where <y> is the response variable being tested;
and where the <SUBSET/EXCEPT/FOR qualification> is optional.
Examples:
WILKS SHAPIRO NORMALITY TEST Y1
WILKS SHAPIRO NORMALITY TEST Y1 SUBSET TAG > 2
Note:
Dataplot uses Algorithm AS R94 (SWILK sub routine) from the Applied Statistics Journal, 1995, Vol. 44, No. 4. This routine should produce accurate critical values for N <= 5,000.
Note:
The following statistics are also supported:

LET A = WILK SHAPIRO TEST Y
LET A = WILK SHAPIRO TEST PVALUE Y

In addition to the above LET command, built-in statistics are supported for about 20+ different commands (enter HELP STATISTICS for details).

Default:
None
Synonyms:
The following are synonyms for the WILKS SHAPIRO NORMALITY TEST.

WILKS SHAPIRO TEST Y
WILKS SHAPIRO Y
Related Commands:
 ANDERSON DARLING TEST = Compute the Anderson-Darling test for normality. CHI-SQUARE GOODNES OF FIT = Compute the Chi-Square goodness of fit test. KOLMOGOROV-SMIRNOV GOODNES OF FIT = Compute the Kolmogorov-Smirnov goodness of fit test. PROBABILITY PLOT = Generates a probability plot. PPCC PLOT = Generates a ppcc plot.
Reference:
Shapiro, S. S. and Wilk, M. B. (1965). Biometrika, 52, 591-611.
Applications:
Distributional Fitting, Assumption Testing
Implementation Date:
2000/1
Program:

SKIP 25
SET WRITE DECIMALS 5
WILKS SHAPIRO NORMALITY TEST Y

The following outpout is generated:
             Wilk-Shapiro Test for Normality

Response Variable: Y

H0: The Data Are Normally Distributed
Ha: The Data Are Not Normally Distributed

Summary Statistics:
Total Number of Observations:             195
Sample Mean:                              9.26146
Sample Standard Deviation:                0.02279
Sample Minimum:                           9.19685
Sample Maximum:                           9.32797

Test Statistic Value:                     0.99827
P-Value:                                  0.99923

Conclusions

------------------------------------------------------------
Null Hypothesis           Null
Null     Confidence        Acceptance     Hypothesis
Hypothesis          Level          Interval     Conclusion
------------------------------------------------------------
Normal          50.0%         (0.500,1)         ACCEPT
Normal          80.0%         (0.200,1)         ACCEPT
Normal          90.0%         (0.100,1)         ACCEPT
Normal          95.0%         (0.050,1)         ACCEPT
Normal          97.5%         (0.025,1)         ACCEPT
Normal          99.0%         (0.010,1)         ACCEPT
Normal          99.9%         (0.001,1)         ACCEPT


Date created: 06/05/2001
Last updated: 12/11/2023