In R suppose that we have the following code:
require("UsingR") # required for "simple.sim" function below
f= function(n=100,mu=0,sigma=1) {
nos = rnorm(n,mu,sigma)
(mean(nos)-mu)/(sigma/sqrt(n))
}
simulations = simple.sim(100,f,100,5,5)
hist(simulations,breaks=10,prob=TRUE)
Does this basically simulate 100 normal random variables with mean 5 and standard deviation 5? In the simulations argument, what do the 5's indicate?
simple.sim? – whuber♦ May 15 '12 at 17:56