[R] shapiro.test
Richard A. Bilonick
rab at nauticom.net
Mon Feb 10 16:27:03 CET 2003
Ernesto Jardim wrote:
>Ok, let me put it the other way around.
>
>On another test I have W = 0.9907, p-value = 6.024e-06. The same
>question stands, with such huge W should it be expected to be normal ?
>
>EJ
>
>
>
>>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.
>>
>>______________________________________________
>>R-help at stat.math.ethz.ch mailing list
>>http://www.stat.math.ethz.ch/mailman/listinfo/r-help
>>
>>
>
>______________________________________________
>R-help at stat.math.ethz.ch mailing list
>http://www.stat.math.ethz.ch/mailman/listinfo/r-help
>
>
>
>
It depends on how non-Normal the distribution and the size of the
sample. A t-distribution with df = 30 isn't Normal but it is close to
being Normal. A small sample size probably won't detect it:
> shapiro.test(rt(100,30))
Shapiro-Wilk normality test
data: rt(100, 30)
W = 0.9927, p-value = 0.8708
But a large enough sample size will:
> shapiro.test(rt(2000,30))
Shapiro-Wilk normality test
data: rt(2000, 30)
W = 0.9968, p-value = 0.0003097
You haven't told us your sample size.
Rick B.
More information about the R-help
mailing list