Here are advertised horsepower ratings and expected gas mile
Here are advertised horsepower ratings and expected gas mileage for several 2003 vehicles.
Vehicle,Horsepower,Gas Mileage
A, 285, 13
B, 215, 21
C, 194, 21
D, 140, 25
E, 205, 20
F, 127, 29
G, 140, 23
H, 170, 22
Find the correlation between horsepower and miles per gallon.
Solution
correlation = E(X-mean(X)) E(Y-Mean(Y)) / std(X) std(Y)
=
| 285 | 13 |
| 215 | 21 |
| 194 | 21 |
| 140 | 25 |
| 205 | 20 |
| 127 | 29 |
| 140 | 23 |
| 170 | 22 |
| correlation | -0.9414079023 |
