This assignment is designed to review the materials you learn in the lab. Be sure to comment your code to clarify what you are doing. Not only does it help with grading, but it will also help you when you revisit it in the future. Please post any questions on Piazza.

Expectation, Variance, and Asymptopia

1) Checking Intuition

Think about a random variable \(X\) that you’re interested in for your research. That variable should have some unknown population mean \(\mu\) and variance \(\sigma^2\). Explain, in words, a) what \(\mu\) and \(\sigma^2\) mean in your context; and b) how you might use data to make estimates of \(\mu\) and \(\sigma^2\) using the information we’ve covered in class and/or in the lab.

2) Math

Let \(X\) be an i.i.d. random variable. Show that \(\hat{\sigma}^2 \equiv \frac{1}{n-1}\displaystyle \sum_{i=1}^{n} \left(X_i - \hat{\mu}\right)^2\) makes \(\frac{\hat{\sigma}^2}{n}\) an unbiased estimator for \(\frac{\sigma^2}{n}\) (Hint: use a well-chosen zero).

Working with a Data Set in R

3) Coding in R
Load the iris dataset in base R. Using this data:

  1. Explain what each of the variables mean (you may have to do some Googling). What are the exact units of measurement?.
  2. Report the mean and variance for one variable, grouped by Species.
  3. Pick another variable and plot a histogram. Explain your choice of bin size. Label your histogram with a meaningful title and x-axis. Report the mean of the variable using a vertical line.
  4. Pick the last two variables. Create a plot with one variable on the x-axis and the other on the y-axis. Group your points by Species. Label your plot with meaningful titles and axis labels.