On 10/22/2009 9:48 AM, rkevinburton at charter.net
wrote:> I am having a hard time interpreting the results of the
'shapiro.test' for normality. If I do ?shapiro.test I see two examples
using rnorm and runif. When I run the test using rnorm I get a wide variation of
results. Most of this may be from variability of rnorm, samll sample size
(limited to 5000 for the test), etc but if I repeat the test multiple times I
can get:
>
>> shapiro.test(rnorm(4900, mean = 5, sd = 3))
>
> Shapiro-Wilk normality test
>
> data: rnorm(4900, mean = 5, sd = 3)
> W = 0.9994, p-value = 0.09123
>
> With a p-value of 0.09 it doesn't give me alot of confidence that
either rnorm is producing a normal distirbution of this test is very reliable.
Obivously this test has gained wide acceptance so I was wondering if I am
expecting too much? Is there a "better" test?
I think you don't understand what p-values mean. If the null is true, p
is distributed as U(0,1).
You can see
Murdoch, D.J., Tsai, Y.-L. and Adcock, J. (2008). P-values are random
variables. {\em The American Statistician}, 242-245.
for more details (and exceptions to this very general rule).
Duncan Murdoch