Answered step by step
Verified Expert Solution
Link Copied!

Question

00
1 Approved Answer

Answer the below questions: What are the coefficients of correlation between miles per gallon and horsepower? Between miles per gallon and the weight of the

Answer the below questions:

What are the coefficients of correlation between miles per gallon and horsepower? Between miles per gallon and the weight of the car? What are the directions and strengths of these coefficients? Do the coefficients of correlation indicate a strong correlation, weak correlation, or no correlation between these variables? See Step 4 in the Python script.

Write the multiple regression equation for miles per gallon as the response variable. Use weight and horsepower as predictor variables. See Step 5 in the Python script. How might the car rental company use this model?

STEP 4 and 5 output:

image text in transcribed
mpg wt hp mpg 1. 000000 -0.873635 -0. 766214 wt -0.873635 1. 000000 0 . 641488 hp -0. 766214 0. 641488 1. 000000 Step 5: Multiple regression model to predict miles per gallon using weight and horsepo This block of code produces a multiple regression model with "miles per gallon" as the response variable, ar Click the block of code below and hit the Run button above. In [6]: from statsmodels . formula. api import ols create the multiple regression model with mpg as the response variable; weight and hors model = ols( 'mpg - wtthp' , data=cars_df) . fit() print (model . summary ( ) ) OLS Regression Results Dep. Variable: mp g R-squared: 0 . 835 Model : OLS Adj. R-squared: 0 . 823 Method: Least Squares F-statistic: 68 .42 Date: Fri, 08 Apr 2022 Prob (F-statistic): 2. 69e-11 Time : 01 : 19:09 Log-Likelihood: -67.484 No. Observations: 30 AIC: 141 .0 Df Residuals: 27 BIC: 145 . 2 Df Model : 2 Covariance Type: nonrobust coof std err P> t [0 . 025 0.975] Intercept 36 .3849 1. 540 23.624 0.000 33. 225 39.545 wt -3. 8046 D. 597 -6.376 0. 000 -5. 029 -2.580 hp -0 . 0291 D. 008 -3.434 0.002 -0.047 -0 . 012 Omnibus : 6.483 Durbin-Watson: 1 . 827 Prob (Omnibus ) : 0.039 Jarque-Bera (JB) : 4. 801 Skew: 0. 911 Prob (JB ) : 0. 0907 Kurtosis : 3. 721 Cond. No. 592

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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

Managerial Accounting Decision Making and Motivating Performance

Authors: Srikant M. Datar, Madhav V. Rajan

1st edition

132816245, 9780132816243, 978-0137024872

Students also viewed these Mathematics questions