Question
indicates that you should use R and provide the R code for the question. 1.* The height (in feet) and volume of usable lumber (in
indicates that you should use R and provide the R code for the question.
1.* The height (in feet) and volume of usable lumber (in cubic feet) of 6 cherry trees are measured by a researcher.
X: Height (in feet) | 61 | 65 | 75 | 80 | 85 | 90 |
Y : Volume of usable lumber (in cubic feet) | 7 | 15 | 27 | 38 | 38 | 55 |
The data set can be read into R using the following code:
x <- c(61, 65, 75, 80, 85, 90)
y <- c(7, 15, 27, 38, 38, 55)
(a)* Use a scatter plot to decide whether it would be appropriate to use linear regression to summarize these data (i.e., do you observe a linear pattern in the scatter plot?). Please use suitable and informative title, x-axis label, and y-axis label in the scatter plot.
(b)* What is the correlation coefficient (r) between the height and the volume of usable lumber?
(c)* Consider the simple linear regression model: y = 0 + 1x + , where is the error term. Fit this model using R. What are the least square estimates of 0 and 1?
2. In business, do nice guys finish first or last? In baseball, there is an old saying that "nice guys finish last." Is this true in the business world? Researchers at Harvard University attempted to answer this question and reported their results in Nature (March 20, 2008). In the study, Boston-area college students repeatedly played a version of the game "prisoner's dilemma," where competitors choose cooperation, defection, or costly punishment. (Cooperation meant paying 1 unit for the opponent to receive 2 units; defection meant gaining 1 unit at a cost of 1 unit for the opponent; and punishment meant paying 1 unit for the opponent to lose 4 units.) At the conclusion of the games, the researchers recorded the average payoff and the number of times cooperation, defection, and punishment were used for each player. The scattergrams (below) plot average payoff (y) against level of cooperation use, defection use, and punishment use, respectively.
(a) Consider cooperation use (x) as a predictor of average payoff (y). Based on the scattergram, is there evidence of a linear trend?