# Statistics Lab Math M5 - simulated teaching model
set.seed(2026)
pop_sd <- 12
se25 <- pop_sd/sqrt(25)
se100 <- pop_sd/sqrt(100)
c(se25=se25, se100=se100)
# Compare mean of skewed exponential samples with normal approximation
means <- replicate(5000, mean(rexp(50, rate=1)))
hist(means, main='Sampling distribution of a mean')
c(mean=mean(means), standard_error=sd(means))
