Question: Can you please help me with this using R : correlation testing using the iris data. First, plot sepal width (Y) against sepal length (X).
Can you please help me with this using R :
correlation testing using the iris data.
- First, plot sepal width (Y) against sepal length (X). Use pch=20 and quickly color the points by species, taking advantage of the fact that the species are all chunked in the data set (see below). You'll see that the correlation between these two measures seems to be tighter among the red setosa specimens, as opposed to the virginica or versicolor specimens.
col=rep(c("red","lightblue","purple"), each=50)
- Calculate the observed correlation between sepal length and sepal width, using only the setosa specimens. This correlation should be based on 50 paired values.
- Test whether or not that observed correlation is significantly different from 0. Give your decision where you either reject or do not reject the null, as well as the p-value on which that decision was based.
- Provide an approximate 95% CI for the observed correlation. Is 0 in the CI?
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
