7) Suppose the EPA would like to investigate the linear relationship between the
ID: 2908534 • Letter: 7
Question
7) Suppose the EPA would like to investigate the linear relationship between the engine size of sedans and the miles per gallon they get. Engine size is in cubic liters and rates miles per gallons. Use alpha 0.05 and round to the nearest hundredth for all calculations Engine 2.5 2.2 2.4 Size 3.3 3.5 2.4 3.7 MPG 60 25 21 23 28 24 29 20 a. b. c. d. e. Calculate the 6 values needed to conduct a regression analysis. Calculate the correlation coefficient an interpret its meaning. Calculate the intercept and slope of the least squares regression line and interpret it. Calculate the SST, the SSR, the SSE, and the coefficient of determination. Interpret. Predict the MPG for a sedan with a 3.0-liter engine Chanter 15.Explanation / Answer
a) Since the value of MPG =60 at Engine_Size=2.2 can be treated as an outlier. So, we should remove it. Also, the Engine_Size 2.4 & 2 is repeated twice. We should keep one value corresponding to MPG & remove other. So,the sixth value to conduct a regression analysis is (2.5,26), (2.4,25), (3.3,21), (3.5), (2,28), (3.7,20).
b) The correlation coefficient between these variables on the above 6 values is -0.9377114. So, we can say that they are highly negatively correlated. If we draw a scatter diagram, then It can be seen clearly that if one variable increases other decreases.
c) The coefficient of intercept is 35.90 & regression coefficient i.e slope is -4.16. Since the regression coefficient is -4.16. That's why Engine_Size increases & MPG decreases.
d) SST=46.83333, the value of the total sum of square.
SSR=41.18067, the value of the regression sum of square.
SSE=5.652661, the value of the residual sum of square.
e) prediction of MPG when Engine_Size is3.0= 31
I am attaching my R-Code for the detailed solution.
data=data.frame(Engine_Size=c(2.5,2.2,2.4,3.3,3.5,2,2.4,2,3.7),MPG=c(26,60,25,21,23,28,24,29,20))
boxplot(data$MPG)
data=data[c(1,3,4,5,6,9),]
attach(data)
cor(Engine_Size,MPG)
model=lm(MPG~Engine_Size,data)
summary(model)
SST=sum((MPG-mean(MPG))^2)
SSR=sum((predict(model,data)-mean(MPG))^2)
SSE=sum(model$residual^2)
pred=predict(model,data.frame(Engine_Size=3.0))
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.