[R] T-test & for loop

level lev_lambert at hotmail.co.uk
Wed May 5 20:31:39 CEST 2010

I have been set a question which i understand statistically but my inability
with R is preventing me from finishing it..

My question is that we to calculate the frequency of Type 1 errors

starting with  x = rnorm(10, 0.1, 1)

then doing a t-test seeing whether you reject the null hypothesis  (Ho  mu =
0) alternative is mu > 0

Then i am supposed to use a for loop to do this procedure 10 000 times
keeping track whether the null has been rejected or not.  If anyone can help
with me it would be great help


View this message in context: http://r.789695.n4.nabble.com/T-test-for-loop-tp2131458p2131458.html
Sent from the R help mailing list archive at Nabble.com.

R-help at r-project.org mailing list

PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

More information about the R-help mailing list