Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- mu <- 100
- s <- 50
- n <- 5
- nsim <- 10000 # number of simulations
- # theoretical standard error
- s / sqrt(n)
- # simulation of experiment and the standard deviations of their means
- y <- replicate( nsim, mean( rnorm(n, mu, s) ) )
- sd(y)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement