DATA604_Home_Work_1

Dilip Ganesan

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...?

(If you are unfamiliar with generating random variates in R, Google can help... rexp(), runif(), rpoi(),...)

For this discussion, going to use Chi-Squared Distribution.

iteration= 100
samplesize = 30

sample_means = c()
sample_mins = c()


for(i in 1:iteration){
   chisam  = rchisq(samplesize,3)
   sample_means[i] = mean(chisam)
   sample_mins[i] = min((chisam))
   }

The sampling distribution of the mean is nearly normally distributed from the below histogram in accordance with Central Limit Theorem.

hist(sample_means)

The sampling distribution of the minuimum does not look normally distributed.

hist(sample_mins)