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 <- 200
meansample<-replicate(n,mean(sample(rexp(10))))
meansample <- as.data.frame(meansample)
meanplot <- ggplot(meansample,aes(x=meansample)) + stat_bin(binwidth=0.1, position="identity",fill="red", colour="black")
meanplot
minsample <- replicate(n, min(sample(rexp(10))))
minsample <- as.data.frame(minsample)
minplot <- ggplot(minsample, aes(x=minsample)) + stat_bin(binwidth =0.1, position = "identity",fill="red", colour="black")
minplot
The graph of the mean sample is nearly normal and it obvious using the center theorem approach. The graph of minimum sample is skewed to the right.