In: Statistics and Probability
Given the following data:
x | 2 | 8 | 5 | 12 | 9 |
y | 6 | 11 | 7 | 14 | 10 |
a) draw/graph a scatter plot.
b) by hand, find the correlation coefficient r.
c) by hand, find b0 and b1.
d) write the regression equation.
Solution(a)
Scatter plot can be constructed as follows
Solution(b)
Correlation coefficient r can be calculated as
Correlation coefficient = ((n*Xi*Yi)-(Xi*Yi))/sqrt(((n*Xi^2)-(Xi)^2))*((n*Yi^2)-(Yi)^2)))
X | Y | X^2 | Y^2 | XY |
2 | 6 | 4 | 36 | 12 |
8 | 11 | 64 | 121 | 88 |
5 | 7 | 25 | 49 | 35 |
12 | 14 | 144 | 196 | 168 |
9 | 10 | 81 | 100 | 90 |
36 | 48 | 318 | 502 | 393 |
Correlation coefficient =
((5*393)-(36*48))/sqrt(((5*318)-(36*36))*((5*502)-(48*48))) =
237/sqrt(294*206) = 0.9630
Solution(c)
The slope of regression line b1 can be calculated as
Slope b1 = ((n*Xi*Yi)-(Xi*Yi))/((n*Xi^2)-(Xi)^2))
= ((5*393)-(36*48))/((5*318)-(36*36)) = 237/294 = 0.8061
The intercept of the regression line can be calculated as
Intercept b0 = ((Yi
- Slope *
Xi))/n = (48-0.8061*36)/5 = 18.98/5= 3.7959
Solution(d)
Regression equation can be written as
Y = b0+b1*X
Y = 3.7959 + 0.8061*X