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

Atte Tenkanen attenka at utu.fi
Fri Apr 16 18:11:19 CEST 2010


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)
}

-------------------------------------------------------------------------------
I have marked the border values given by this script to the histogram of the original random distribution:

http://www.ag.fimug.fi/~Atte/62Hist100410.pdf

Atte Tenkanen
University of Turku, Finland
Department of Musicology
+35823335278
http://users.utu.fi/attenka/



More information about the R-help mailing list