Answered step by step
Verified Expert Solution
Question
1 Approved Answer
You created a scatterplot of miles per gallon against weight; check to make sure it was included in your attachment. Does the graph show any
- You created a scatterplot of miles per gallon against weight; check to make sure it was included in your attachment. Does the graph show any trend? If yes, is the trend what you expected? Why or why not? See Step 2 in the Python script.
- What is the coefficient of correlation between miles per gallon and weight? What is the sign of the correlation coefficient? Does the coefficient of correlation indicate a strong correlation, weak correlation, or no correlation between the two variables? How do you know? See Step 3 in the Python script.
- Write the simple linear regression equation for miles per gallon as the response variable and weight as the predictor variable. How might the car rental company use this model? See Step 4 in the Python script.
- What is the slope coefficient? Is this coefficient significant at a 5% level of significance (alpha=0.05)? (Hint: Check the P-value,, for weight in the Python output.) See Step 4 in the Python script.
My results are below: 8 Honda Civic 30.4 4 75.7 52 4.93 1.615 18.52 1 1 4 2 13 Merc 450SLC 15.2 8 275.8 180 3.07 3.780 18.00 0 0 3 3 31 Volvo 142E 21.4 4 121.0 109 4.11 2.780 18.60 1 1 4 2 25 Fiat X1-9 27.3 4 79.0 66 4.08 1.935 18.90 1 1 4 1 1 Mazda RX4 Wag 21.0 6 160.0 110 3.90 2.875 17.02 0 1 4 4 mpg wt mpg 1.000000 -0.866366 wt -0.866366 1.000000
OLS Regression Results ============================================================================== Dep. Variable: mpg R-squared: 0.751 Model: OLS Adj. R-squared: 0.742 Method: Least Squares F-statistic: 84.27 Date: Wed, 29 Sep 2021 Prob (F-statistic): 6.15e-10 Time: 18:07:25 Log-Likelihood: -75.979 No. Observations: 30 AIC: 156.0 Df Residuals: 28 BIC: 158.8 Df Model: 1 Covariance Type: nonrobust ============================================================================== coef std err t P>|t| [0.025 0.975] ------------------------------------------------------------------------------ Intercept 37.2852 1.945 19.169 0.000 33.301 41.269 wt -5.3419 0.582 -9.180 0.000 -6.534 -4.150 ============================================================================== Omnibus: 2.539 Durbin-Watson: 2.225 Prob(Omnibus): 0.281 Jarque-Bera (JB): 2.158 Skew: 0.639 Prob(JB): 0.340 Kurtosis: 2.692 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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started