Let x1 x5 02 09 04 06 04 Let y1 y5 04 03 03 05 11
Let (x1, . . . , x5) = (0.2, 0.9, 0.4, 0.6, 0.4). Let (y1, . . . , y5) = (0.4, 0.3, 0.3, 0.5, 1.1).
(a) Find Pearson’s correlation coefficient for x and y.
(b) Estimate the regression line to predict y from x.
(c) Estimate the regression line to predict x from y.
(d) In R, draw a scatterplot of the data and add the two regression lines on the same graph.
(This will require rearranging the line you got in (c) to make y the subject.) Are the lines the same?
Solution
