Instructions

For each of the problems below (except in cases where you are asked to discuss your interpretation) write R code blocks that will compute appropriate solutions. A good rule of thumb for judging whether your solution is appropriately “computable” is to ask yourself “If I added or changed observations to this data set, would my code still compute the right solution?”

When completed, submit your R Markdown document (the file with the extension .Rmd) via Sakai.

Make your solutions computable

For each of the problems below (except in cases where you are asked to discuss your interpretaion) write R code blocks that will compute appropriate solutions. A good rule of thumb for judging whether your solution is appropriately “computable” is to ask yourself “If I added or changed observations to this data set, would my code still compute the right solution?”

When completed, submit your R Markdown document (the file with the extension .Rmd) and the knit HTML via Sakai.

Problems

Bivariate distribution of sepal morphology for three Iris species.

Bivariate distribution of sepal morphology for three Iris species.

  1. The figure above shows bivariate scatter plots for the sepal-related variable from the Iris data set. The lines show the “major axis” (first principal component) of each species’ bivariate distribution. The table below gives the slope of each of the major axes and centroids (bivariate means) for each species.

    1. Show how to compute the values in the table below (5 pts)
Species mean.Sepal.Length mean.Sepal.Width major.axis.slope
setosa 5.006 3.428 1.1027596
versicolor 5.936 2.770 0.4183821
virginica 6.588 2.974 0.2865562
  1. Calculate bootstrap 95% confidence intervals (percentile based) for the slope of the major axes for the sepal morphology variables of each species in the iris data set. If you were interested in the hypothesis that sepal traits had similar scaling relationships across all three species, what conclusions might you draw based on your bootstrap analyses? (12 pts)

  2. (Extra credit) Show how to re-create Figure 1. (5 pts)