Shapiro-Wilk Test for Normality
The test is used to see if the (unknown) distribution function of a random sample is normal or not.
The sample is of size N where N<=50. If the sample is >50, then the script will estimate the W statistic using the Shapiro-Francis test. This will be indicated to the user through on-screen messages.
Script operation
This tool operates in much the same way as most of the others. Only one column of data is allowed. The column heading may be included in the selection range but is discarded by the script.
Click here for information about general script usage.
The test statistic,W, should be close to 1 if the sample behaves like a normal sample, or close to 0 if non-normal.
The script will calculate W, G (the approximate standard normal of W), and the p-value. For sample sizes less than 7, the G and p-value may be less accurate and should be checked against appropriate tables of values.
If the Shapiro-Francis test is used, only the W statistic is calculated.
Hypotheses:
H0: F(x) is a normal distribution function H1: F(x) is non-normal
In this example, a sample of 50 numbers is generated by computer:
23 23 24 27 29 31 32 33 33 35 36 37 40 42 43 43 44 45 48 48 54 54 56 57 57 58 58 58 58 59 61 61 62 63 64 65 66 68 68 70 73 73 74 75 77 81 87 89 93 97
The script output:
Shapiro-Wilk_W_Test_of_Normality_for_Small_Samples W: 0.96413 G: -0.75303 p-value:0.2257
Interpretation
Specific tables need to be consulted that indicate quantiles of the W statistic in order for the level of significance to be determined. In this example, the W value lies between the .1 and .5 quantiles indicating a p-value of approximately .29. However, the calculated p-value is more precise at .2257, indicating we can accept the hypothesis H0.