In: Statistics and Probability
-Compute the sample correlation coefficient between the price and the number of flash drives sold. Also, develop a least-squares estimated regression line.
Price (x) | Units sold (y) |
34 | 4 |
36 | 4 |
32 | 6 |
35 | 5 |
31 | 9 |
38 | 2 |
39 | 1 |
Solution :
X | Y | XY | X^2 | Y^2 |
34 | 4 | 136 | 1156 | 16 |
36 | 4 | 144 | 1296 | 16 |
32 | 6 | 192 | 1024 | 36 |
35 | 5 | 175 | 1225 | 25 |
31 | 9 | 279 | 961 | 81 |
38 | 2 | 76 | 1444 | 4 |
39 | 1 | 39 | 1521 | 1 |
n | 7 |
sum(XY) | 1041.00 |
sum(X) | 245.00 |
sum(Y) | 31.00 |
sum(X^2) | 8627.00 |
sum(Y^2) | 179.00 |
Numerator | -308.00 |
Denominator | 326.02 |
r | -0.9447 |
r square | 0.8925 |
Xbar(mean) | 35.0000 |
Ybar(mean) | 4.4286 |
SD(X) | 2.3570 |
SD(Y) | 2.1602 |
b | -0.8462 |
a | 34.0440 |
sample correlation coefficient = r = -0.9447
Regression line = 34.0440 - 0.8462 x