In: Statistics and Probability
Do heavier cars really use more gasoline? Suppose 5 cars were chosen at random. Let x be the weight of the car (in hundreds of pounds) and y be gas mileage (in miles per gallon).
X- 34,46,33,47,23
y- 17,29,23,28,21
- What is the value of the correlation coefficient? Based on the correlation coefficient, as the weight of the car increases, does the gas mileage tend to increase or decrease?
-Find the equation of the least-squares regression line.
-What percentage of the variation in y can be explained by the corresponding variation in x and the least-squares line?
- Predict the gas mileage for a car that weighs x = 30 (hundred pounds). Is this interpolation or extrapolation?
X Values
∑ = 183
Mean = 36.6
∑(X - Mx)2 = SSx = 401.2
Y Values
∑ = 118
Mean = 23.6
∑(Y - My)2 = SSy = 99.2
X and Y Combined
N = 5
∑(X - Mx)(Y - My) = 151.2
R Calculation
r = ∑((X - My)(Y - Mx)) /
√((SSx)(SSy))
r = 151.2 / √((401.2)(99.2)) = 0.7579
As r is positive, so as x increases y also increases
Sum of X = 183
Sum of Y = 118
Mean X = 36.6
Mean Y = 23.6
Sum of squares (SSX) = 401.2
Sum of products (SP) = 151.2
Regression Equation = ŷ = bX + a
b = SP/SSX = 151.2/401.2 =
0.3769
a = MY - bMX = 23.6 -
(0.38*36.6) = 9.8066
ŷ = 0.3769X + 9.8066
Here r=0.7579
So r^2=0.7579^2=0.5744
So 57.44% of the variation in y can be explained by the corresponding variation in x and the least-squares line
For x=30,
ŷ = (0.3769*30) + 9.8066=21.1136