[R] Is it ok to apply the z.test this way?

David Winsemius dwinsemius at comcast.net
Fri Apr 16 20:56:59 CEST 2010


On Apr 16, 2010, at 12:11 PM, Atte Tenkanen wrote:

> Dear R-users,
>
> I want to check if certain values are from random distribution, that  
> includes values between 0-1. So, it is not really normal even though  
> shapiro.test says it is highly normal... Can I do something like  
> this and think that the values given are right. z.test is from  
> package TeachingDemos.
> -------------------------------------------------------------------------------
> SelectedVals=c()
> for(i in seq(0,1,by=0.001))
> {
> 	if((z.test(i, mu=mean(Distribution), stdev=sd(Distribution)) 
> $p.value)<=0.05) SelectedVals=c(SelectedVals,i)
> }
>

You are attempting to do statistics on a single number at a time. If  
you do not immediately appreciate the absurdity of this effort, then  
you should consult a real statistician without delay. There are many  
fine statisticians at your university.

-- 

David Winsemius, MD
West Hartford, CT



More information about the R-help mailing list