Now let's do some R. First we'll explore our Irises a bit more. Let's extract the data we want. This time we'll use all 50 values for sepal length and sepal width for Iris setosa (the first of the three species in the data set). Without much explanation*, let's put the data into two variables called slength and swidth: slength <- iris$Sepal.Length[1:50] swidth <- iris$Sepal.Width[1:50] * in brief, these commands pull out the first 50 values for petal length and petal width from the built in iris data set. Type “iris” at the command prompt to see the data set, and you should be able to figure out how these commands work. (a) Now perform a correlation test of sepal length vs. sepal width. Incidentally, should this test be one sided? Why or why not? (b) Now perform the correlation test again, this time do sepal width vs. sepal length. The results should be identical. Why?? (c) Create a scatterplot of the data.
5) Now let's do some R. First we'll explore our Irises a bit more. Let's extract the data we want. This time we'll use all 50 values for sepal length and sepal width for Iris setosa (the first of the three species in the data set).
Without much explanation*, let's put the data into two variables called slength and swidth: slength <- iris$Sepal.Length[1:50]
swidth <- iris$Sepal.Width[1:50]
* in brief, these commands pull out the first 50 values for petal length and petal width from the built in iris data set. Type “iris” at the command prompt to see the data set, and you should be able to figure out how these commands work.
(a) Now perform a
(b) Now perform the correlation test again, this time do sepal width vs. sepal length. The results should be identical. Why??
(c) Create a

Trending now
This is a popular solution!
Step by step
Solved in 5 steps with 5 images









