This preview shows pages 1–3. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: histogram is more like a normal graph, meaning the theoretical prediction is closer with 1000 samples nreps = 1000 nObs= 1000 average<matrix(0, nrow=nreps, ncol=1) for(i in 1:nreps) { sample < rnorm(nObs, 2, 2) average[i] = mean(sample) } mean(average) var(average) hist(average) nreps = 1000 nObs= 100 z<matrix(0, nrow=nreps, ncol=1) for(i in 1:nreps) { sample < rnorm(nObs, 2, 2) z[i] =sqrt(nObs)*( mean(sample)  2 )/ 2 } mean(z) var(z) hist(z) nreps = 1000 nObs= 1000 z<matrix(0, nrow=nreps, ncol=1) for(i in 1:nreps) { sample < rnorm(nObs, 2, 2) z[i] =sqrt(nObs)*( mean(sample)  2 )/ 2 } mean(z) var(z) hist(z)...
View
Full
Document
This note was uploaded on 02/02/2010 for the course MGRL 194 taught by Professor Kirkpatrick during the Spring '08 term at Vanderbilt.
 Spring '08
 Kirkpatrick

Click to edit the document details