This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: ﬁndings. Assuming normalityy of the measurements: test12=t.test(dt[,1],dt[,2]);test13=t.test(dt[,1],dt[,3]); test23=t.test(dt[,2],dt[,3]); In all three tests, we reject the hypothesis of equality of means. 2. Suppose U 1 and U 2 are uniformly generated. Someone claims that that the random value Z = p-2log( U 1 )cos (2 πU 2 ) , Page 2 has a standard normal distribution. Without using a ”for” loop, write an R code to generate 10 , 000 such values Z . Use these values to ﬁll up the following table and assess whether it appears to behave like a normally distributed value. Use a normal qqplot as an alternative approach to validate that claim. n=10000 U1=runif(n);U2=runif(n) Z=sqrt(-2*log(U1))*cos(2*pi*U2) p1=sum(Z>=0)/n; p2=sum((0<Z)&(Z<=1))/n p3=sum((1<Z)&(Z<=2))/n; p4=sum(Z>2)/n...
View Full Document
- Fall '09
- Normal Distribution, Student's t-distribution, petal length, mean petal lengths, variables sepal length