For the first week, we have a simple warm-up exercise for the discussion. Using R, generate 100 simulations of 30 samples each from a distribution (other than normal) of your choice. Graph the sampling distribution of means. Graph the sampling distribution of the minimum. Share your graphs and your R code. What did the simulation of the means demonstrate? What about the distribution of the minimum…?

library(ggplot2)

n <- 100

sim <-replicate(n,mean(sample(rexp(10))))

sim <- as.data.frame(sim)

mean.plt <- ggplot(sim,aes(x=sim)) + stat_bin(binwidth=0.1, position="identity")

mean.plt

sim.min <- replicate(n, min(sample(rexp(10))))
sim.min <- as.data.frame(sim.min)
min.plt <- ggplot(sim.min, aes(x=sim.min)) + stat_bin(binwidth = .1, position = "identity")
min.plt