library(knitr)

(A) Using R, generate 100 simulations of 30 samples each from a distribution (other than normal) of your choice.

Function rexp() is used to generate random exponential distribution. We will use default rate=1.

Function replicate() will repeat the rexp() 100 times, producing hundred simulations

# generate 100 simulations of 30 samples
siml100 <- replicate(100,rexp(n=30))

(B) Graph the sampling distribution of means.

means_dist <- colMeans(siml100)
hist(means_dist, main="Distribution of Means")

(C) Graph the sampling distribution of the minimum.

min_dist <- apply(siml100,2,min)
hist(min_dist, main="Distribution of Minimums")

(D) What did the simulation of the means demonstrate? What about the distribution of the minimum?

The distribution of the means appears to be symmetric. Since we set the exponention function rate to 1, the distribution centers around 1.

The distribution of the minimums is skewed to the right and most of those values fall between 0 and 0.5.