times = NULL avgtime = NULL for (i in 1:N) { times = rexp(n,lambda) avgtime[i] = mean(times) } hist(avgtime) mean(avgtime) sd(avgtime)