Advertisement
Guest User

Untitled

a guest
Dec 20th, 2014
166
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. mu <- 100
  2. s <- 50
  3. n <- 5
  4. nsim <- 10000 # number of simulations
  5. # theoretical standard error
  6. s / sqrt(n)
  7. # simulation of experiment and the standard deviations of their means
  8. y <- replicate( nsim, mean( rnorm(n, mu, s) ) )
  9. sd(y)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement