[R] shapiro.test

Richard A. Bilonick rab at nauticom.net
Mon Feb 10 15:41:02 CET 2003

Ernesto Jardim wrote:

>The shapiro.test function outputs a value of the W statistic, which
>should be 1 if the distribution is normal, and a p-value for the test
>(as the documentation states).
>I'm a bit confused with some results. I'm getting a W=0.9977 and a
>I was expecting that a W of 0.9977 would tell me that the distribution
>is normal so p-value should be small ...
>What am I missing ?
>R-help at stat.math.ethz.ch mailing list
You have it backwards. The null hypothesis is that the distribution is 
Normal. You reject this null when the p-value is small. If the 
distribution is Normal, the p-value will tend to be large.

 > shapiro.test(rnorm(100))

        Shapiro-Wilk normality test

data:  rnorm(100)
W = 0.9877, p-value = 0.4894

Rick B.

More information about the R-help mailing list