Lab Worksheet 1

This worksheet uses the iris data set available in R. This data set gives the measurements in centimeters of the variables sepal length and width and petal length and width, respectively, for 50 flowers from each of 3 species of iris. The species are Iris setosa, versicolor, and virginica:

head(iris)
##   Sepal.Length Sepal.Width Petal.Length Petal.Width Species
## 1          5.1         3.5          1.4         0.2  setosa
## 2          4.9         3.0          1.4         0.2  setosa
## 3          4.7         3.2          1.3         0.2  setosa
## 4          4.6         3.1          1.5         0.2  setosa
## 5          5.0         3.6          1.4         0.2  setosa
## 6          5.4         3.9          1.7         0.4  setosa

Problem 1: Is there a difference in sepal length between species setosa and species virginica? Perform a t test and discuss your results (1-2 sentences).

# R code goes here

Discussion goes here.

Problem 2: Make side-by-side box plots of sepal length for the three species. Discuss what patterns you observe (1-2 sentences).

# R code goes here.

Discussion goes here.

Problem 3: Make a scatter plot of sepal length vs. petal length for the three species. Make a single plot that shows the data for all three species at once, in different colors. Hint: To see all data in one plot, you will have to manually set the plot limits, using the xlim and ylim parameters of the plot function. Discuss your results (1-2 sentences).

# R code goes here.

Discussion goes here.