A consumer organization wants to develop a regression model to predict mileage (
ID: 3301492 • Letter: A
Question
A consumer organization wants to develop a regression model to predict mileage (as measured by miles per gallon) based on the horsepower of the car’s engine and the weight of the car (in pounds). Data were collected from a sample of 50 rental car models.
1. Determine the regression coefficient, b0, b1, and b2. State the multiple regression equation.
2. Interpret the meaning of b0, b1, and b2.
3. Explain why the regression coefficient b0 has no practical meaning in the context of this problem.
4. Predict the miles per gallon for cars that have 60 horsepower and weight 2,000 pounds.
5. If you were consulting for this organization and were provided these data to make a preliminary analysis, what would be your recommended next steps for the organization? (100 words)
MPG Horsepower Weight 43.1 48 1985 19.9 110 3365 19.2 105 3535 17.7 165 3445 18.1 139 3205 20.3 103 2830 21.5 115 3245 16.9 155 4360 15.5 142 4054 18.5 150 3940 27.2 71 3190 41.5 76 2144 46.6 65 2110 23.7 100 2420 27.2 84 2490 39.1 58 1755 28.0 88 2605 24.0 92 2865 20.2 139 3570 20.5 95 3155 28.0 90 2678 34.7 63 2215 36.1 66 1800 35.7 80 1915 20.2 85 2965 23.9 90 3420 29.9 65 2380 30.4 67 3250 36.0 74 1980 22.6 110 2800 36.4 67 2950 27.5 95 2560 33.7 75 2210 44.6 67 1850 32.9 100 2615 38.0 67 1965 24.2 120 2930 38.1 60 1968 39.4 70 2070 25.4 116 2900 31.3 75 2542 34.1 68 1985 34.0 88 2395 31.0 82 2720 27.4 80 2670 22.3 88 2890 28.0 79 2625 17.6 85 3465 34.4 65 3465 20.6 105 3380Explanation / Answer
I am using R software to solve this problem.
First we can import the data into R environment using read.table function as follows:
Data <- read.table("Data.txt",sep=" ",header = T)
Linear Regression model can be fit in R using the lm() function
model <- lm(MPG ~ Horsepower + Weight, data = InputData)
Once model is fit, we can find the summary of the model using the summary function as below:
summary(model)
Call:
lm(formula = MPG ~ Horsepower + Weight, data = InputData)
Residuals:
Min 1Q Median 3Q Max
-7.596 -2.403 -0.518 2.565 10.579
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 58.157082 2.658248 21.878 < 2e-16 ***
Horsepower -0.117525 0.032643 -3.600 0.000763 ***
Weight -0.006871 0.001401 -4.903 1.16e-05 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 4.177 on 47 degrees of freedom
Multiple R-squared: 0.7494, Adjusted R-squared: 0.7388
F-statistic: 70.28 on 2 and 47 DF, p-value: 7.505e-15
1) So from the summary we can see that regression coefficients are as below:
b0 = 58.157082, b1 = -0.117525, b2 = -0.006871
So multiple regression equation is :
MPG = 58.157082 - 0.117525 * Horsepower - 0.006871 * Weight
2) b0 ---> When horsepower and weight both are 0, the MPG value is 58.157
b1 ---> For every one unit increase in Horsepower, the MPG value is expected to go down by 0.117525
b2 ---> For every one unit increase in Weight, the MPG value is expected to go down by 0.006871
3) Here the regression coefficent b0 has no practical meaning as this is practically impossible to have a car of zero weight and zero horsepower.
4) To predict using the above model, we can make use of the predict() function as below:
predict(model,newdata = data.frame(Horsepower = 60,Weight = 2000))
= 37.36427
So the model predicts 37.36427 mpg for a car having 60 horsepower and weighing 2000 pounds.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.