Use the given data to answer the questions below: Cars data frame from a sample of 30(showing only the first five observations) Unnamed: 0 mpg cyl disp hp drat wt qsec vs am gear carb 24 Pontiac Firebird 19.2 8 400.0 175 3.08 3.845 17.05 0 0 3 2 0 Mazda RX4 21.0 6 160.0 110 3.90 2.620 16.46 0 1 4 4 15 Lincoln Continental 10.4 8 460.0 215 3.00 5.424 17.82 0 0 3 4 2 Datsun 710 22.8 4 108.0 93 3.85 2.320 18.61 1 1 4 1 26 Porsche 914-2 26.0 4 120.3 91 4.43 2.140 16.70 0 1 5 2 1) What are the coefficients of correlation between miles per gallon and horsepower? What are the coefficients of correlation 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? Use the information below to help answer. mpg wt hp mpg 1.000000 -0.871156 -0.786323 wt -0.871156 1.000000 0.656837 hp -0.786323 0.656837 1.000000 2. Write the multiple regression equation for miles per gallon as the response variable. Use weight and horsepower as predictor variables. How might the car rental company use this model? (Use the info below to help answer) OLS Regression Results ============================================================================== Dep. Variable: mpg R-squared: 0.840 Model: OLS Adj. R-squared: 0.828 Method: Least Squares F-statistic: 70.64 Date: Mon, 06 Feb 2023 Prob (F-statistic): 1.87e-11 Time: 03:05:42 Log-Likelihood: -69.404 No. Observations: 30 AIC: 144.8 Df Residuals: 27 BIC: 149.0 Df Model: 2 Covariance Type: nonrobust ============================================================================== coef std err t P>|t| [0.025 0.975] ------------------------------------------------------------------------------ Intercept 37.6181 1.618 23.257 0.000 34.299 40.937 wt -3.8709 0.634 -6.102 0.000 -5.173 -2.569 hp -0.0334 0.009 -3.684 0.001 -0.052 -0.015 ============================================================================== Omnibus: 4.325 Durbin-Watson: 2.350 Prob(Omnibus): 0.115 Jarque-Bera (JB): 3.132 Skew: 0.782 Prob(JB): 0.209 Kurtosis: 3.246 Cond. No. 588. ========================================================================
Use the given data to answer the questions below:
Cars data frame from a sample of 30(showing only the first five observations)
Unnamed: 0 |
mpg |
cyl |
disp |
hp |
drat |
wt |
qsec |
vs |
am |
gear |
carb |
|
24 |
Pontiac Firebird |
19.2 |
8 |
400.0 |
175 |
3.08 |
3.845 |
17.05 |
0 |
0 |
3 |
2 |
0 |
Mazda RX4 |
21.0 |
6 |
160.0 |
110 |
3.90 |
2.620 |
16.46 |
0 |
1 |
4 |
4 |
15 |
Lincoln Continental |
10.4 |
8 |
460.0 |
215 |
3.00 |
5.424 |
17.82 |
0 |
0 |
3 |
4 |
2 |
Datsun 710 |
22.8 |
4 |
108.0 |
93 |
3.85 |
2.320 |
18.61 |
1 |
1 |
4 |
1 |
26 |
Porsche 914-2 |
26.0 |
4 |
120.3 |
91 |
4.43 |
2.140 |
16.70 |
0 |
1 |
5 |
2 |
1) What are the coefficients of
mpg wt hp
mpg 1.000000 -0.871156 -0.786323
wt -0.871156 1.000000 0.656837
hp -0.786323 0.656837 1.000000
2. Write the multiple regression equation for miles per gallon as the response variable. Use weight and horsepower as predictor variables. How might the car rental company use this model? (Use the info below to help answer)
OLS Regression Results
==============================================================================
Dep. Variable: mpg R-squared: 0.840
Model: OLS Adj. R-squared: 0.828
Method: Least Squares F-statistic: 70.64
Date: Mon, 06 Feb 2023 Prob (F-statistic): 1.87e-11
Time: 03:05:42 Log-Likelihood: -69.404
No. Observations: 30 AIC: 144.8
Df Residuals: 27 BIC: 149.0
Df Model: 2
coef std err t P>|t| [0.025 0.975]
------------------------------------------------------------------------------
Intercept 37.6181 1.618 23.257 0.000 34.299 40.937
wt -3.8709 0.634 -6.102 0.000 -5.173 -2.569
hp -0.0334 0.009 -3.684 0.001 -0.052 -0.015 ==============================================================================
Omnibus: 4.325 Durbin-Watson: 2.350
Prob(Omnibus): 0.115 Jarque-Bera (JB): 3.132
Skew: 0.782 Prob(JB): 0.209
Kurtosis: 3.246 Cond. No. 588. ==============================================================================
1)
The response variable is miles per gallon (mpg).
Trending now
This is a popular solution!
Step by step
Solved in 2 steps