Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribedimage text in transcribed

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:

image text in transcribedimage text in transcribed
\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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Algebra And Number Theory An Integrated Approach

Authors: Martyn R Dixon, Leonid A Kurdachenko, Igor Ya Subbotin

1st Edition

0470640537, 9780470640531

More Books

Students also viewed these Mathematics questions

Question

List the bones that make up the cranium and the face?

Answered: 1 week ago

Question

6. What information processes operate in communication situations?

Answered: 1 week ago

Question

3. How can we use information and communication to generate trust?

Answered: 1 week ago