Question: You will apply the statistical concepts and techniques covered in this week's reading about correlation coefficient and simple linear regression. A car rental company wants


You will apply the statistical concepts and techniques covered in this week's reading about correlation coefficient and simple linear regression. A car rental company wants to evaluate the premise that heavier cars are less fuel efficient than lighter cars. In other words, the company expects that fuel efficiency (miles per gallon) and weight of the car (often measured in thousands of pounds) are correlated. Performing this analysis will help the company optimize its business model and charge its customers appropriately.
You will work with a cars data set that includes two variables:
- Miles per gallon (coded as mpg in the data set)
- Weight of the car (coded as wt in the data set)
1. You created a scatterplot of miles per gallon against weight. Does the graph show any trend? If yes, is the trend what you expected? Why or why not? See graph below:


\fIn [5]: from statsmodels . formula. api import ols # create the simple linear regression model with mpg as the response variable and weight as the model = ols ( 'mpg ~ wt', data=cars_df) .fit() #print the model summary print (model . summary ( ) )| OLS Regression Results Dep. Variable: mpg R-squared : 0 . 759 Model : OLS Adj. R-squared: 0 . 750 Method : Least Squares F-statistic: 88 . 19 Date: Tue, 31 May 2022 Prob (F-statistic) : 3. 78e-10 Time : 21 :53 :48 Log-Likelihood: -75 . 098 No. Observations : 30 AIC: 154 .2 Df Residuals : 28 BIC : 157 .0 Df Model : 1 Covariance Type: nonrobust coef std err t P> | t| [0 . 025 0 . 975] Intercept 37 . 2592 1. 887 19. 742 0 . 000 33.393 41 . 125 wt -5. 2936 0 . 564 -9. 391 0. 000 -6 . 448 -4. 139 Omnibus : 2 . 668 Durbin-Watson : 1 . 594 Prob ( Omnibus ) : 0. 263 Jarque-Bera (JB) : 2. 136 Skew : 0 . 648 Prob ( JB ) : 0 . 344 Kurtosis : 2. 823 Cond. No. 12 .2 Warnings : [1] Standard Errors assume that the covariance matrix of the errors is correctly specified
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
