MATH 351 Homework 03

In this homework we will simulate RR sample means, each of which is determined from NN random variables, from the same distribution you worked with in Homework 02, let's call this distribution XX. The Central Limit Theorem for the sample mean dictates that the shape of the (many) sample means will be approximately Normal, with expectation equal to E[X]\mathbb{E}[X] and variance V[X]/N\mathbb{V}[X] / N. We will only need one for-loop, of length RR, for this entire assignment.

  1. For R=500R = 500, set up a for-loop that does the following each iteration:
    1. generates NN (you choose the size) random variables from your distirbution (from Homework 02) XX.
    2. stores the mean and variance of the random variables,
    3. approximates and stores the parameters you chose from Homework 02 for your distribution XX using only the mean and variance of the random variables
  2. Make a histogram of the one sample of size NN of your random variables, and one histogram each for the RR means, variances, and estimated parameter(s).
  3. On the histogram of the means, add a density plot of the expected Normal distribution. You'll need to calculate E[X]\mathbb{E}[X] and V[X]\mathbb{V}[X].