pleaser answer all. thank you.
You MUST use R for problems 5 - 7:
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 petal length for Iris virginica (the last of the three species in the data set - sepals are the leaves" that surround the petals before a flower opens).
Without much explanation*,let's put the data into two variables called slength and plength:
slength <- iris$Sepal.Length[101:150] plength <- iris$Petal.Length[101:150]
* in brief, these commands pull out the last 50 values for sepal length and sepal width from the built in iris data set. Type
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.
6) You investigate the relationship between dbh (diameter (cm) at breast height) and height (m) of oak trees. You get the following results:
dbh (cm): height(m):
40 57 39 34 46 26 14 20 29 38 31 60 11 18 48 43 44 51 49 11.3 11.6 12.4 9.0 12.4 9.8 8.3 8.5 7.3 12.4 11.1 13.2 10.9 5.6 6.5 9.7 11.3 9.5 2.2 15.2
Read the data into R.
a) Calculate the following using R:x, y,SSx,SS,
(Note that to get SS, or SS,, you can just ask R for the variance (var) or standard deviation, and then do the appropriate calculation).
(b Perform a complete test of the hypothesis that there is no difference in height as dbh increases. Write out all the appropriate steps of a regular hypothesis test give Ho,Hi,a,your decision,etc.
(c) Give the equation of the least squares line (Write it out, don't just hand in a printout!!)
7) Finally do the following:
a create a scatter plot and residual plot for the analysis you did in 6 and comment on the residual plot (is it okay or do you see any problems?).
(b create a q-q plot of the residuals and comment on it.
(c) Write down the value of R, and interpet it (do not use adjusted R)