--- title: "R Problem due Tuesday 11/13" author: "YOUR NAME" output: pdf_document --- Acknowledgements: ADD NAMES HERE IF ANYONE ASSISTED YOU. **Email knitted pdf file to tleise@amherst.edu by 4pm on the due date.** We saw that the mean of $n$ independent random variables with common mean $\mu$ and variance $\sigma^2$ is a random variable with mean $\mu$ and variance $\sigma^2/n$. Let's explore this idea through simulations for several continuous distributions. a. Let $X_1$, $X_2$, $\dots$, $X_{30}$ be normally distributed with mean $\mu=1$ and variance $\sigma^2=4$. What is the mean and variance of $S_{30}/30$? Simulate $S_{30}/30$ by taking the mean of 30 normally distributed random numbers 10,000 times. Plot a histogram of the resulting distribution together with the exact density function (hint: use freq = FALSE in hist). Check that the mean and variance are consistent with your theoretical prediction. > ANSWER ```{r} ``` b. Let $X_1$, $X_2$, $\dots$, $X_{30}$ follow the beta distribution with common parameters $a=1$ and $b=4$. What is the mean and variance of $S_{30}/30$? > ANSWER Generate 10,000 random numbers following this beta distirbution and plot the resulting histogram. Then simulate $S_{30}/30$ by taking the mean of 30 such random numbers 10,000 times. Plot a histogram of this distribution and compare. What does it look roughly like? ```{r} ``` c. Let $X_1$, $X_2$, $\dots$, $X_{30}$ be exponentially distributed with common parameter $\lambda=1$. What is the mean and variance of $S_{30}/30$? > ANSWER Generate 10,000 random numbers following this exponential distirbution and plot the resulting histogram. Then simulate $S_{30}/30$ by taking the mean of 30 such random numbers 10,000 times. Plot a histogram of this distribution and compare. What does it look roughly like? ```{r} ```