Question
In this discussion, you will apply the statistical concepts and techniques covered in this week's reading about multiple regression. Last weeks discussion involved a car
In this discussion, you will apply the statistical concepts and techniques covered in this week's reading about multiple regression. Last weeks discussion involved a car rental company that wanted to evaluate the premise that heavier cars are less fuel efficient than lighter cars. The company expected fuel efficiency (miles per gallon) and weight of the car (often measured in thousands of pounds) to be correlated. The company also expects cars with higher horsepower to be less fuel efficient than cars with lower horsepower. They would like you to consider this new variable in your analysis.
In this discussion, you will work with a cars data set that includes the three variables used in this discussion:
- Miles per gallon (coded as mpg in the data set)
- Weight of the car (coded as wt in the data set)
- Horsepower (coded as hp in the data set)
The random sample will be drawn from a CSV file. This data will be unique to you, and therefore your answers will be unique as well. Run Step 1 in the Python script to generate your unique sample data.
In your initial post, address the following items:
- Check to be sure your scatterplots of miles per gallon against horsepower and weight of the car were included in your attachment. Do the plots show any trend? If yes, is the trend what you expected? Why or why not? See Steps 2 and 3 in the Python script.
- 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?
-
Cars data frame (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 21 Dodge Challenger 15.5 8 318.0 150 2.76 3.520 16.87 0 0 3 2 31 Volvo 142E 21.4 4 121.0 109 4.11 2.780 18.60 1 1 4 2 20 Toyota Corona 21.5 4 120.1 97 3.70 2.465 20.01 1 0 3 1 30 Maserati Bora 15.0 8 301.0 335 3.54 3.570 14.60 0 1 5
-
mpg wt hp mpg 1.000000 -0.869762 -0.766450 wt -0.869762 1.000000 0.664804 hp -0.766450 0.664804 1.000000
OLS Regression Results ============================================================================== Dep. Variable: mpg R-squared: 0.820 Model: OLS Adj. R-squared: 0.807 Method: Least Squares F-statistic: 61.49 Date: Wed, 01 Dec 2021 Prob (F-statistic): 8.85e-11 Time: 23:25:59 Log-Likelihood: -70.448 No. Observations: 30 AIC: 146.9 Df Residuals: 27 BIC: 151.1 Df Model: 2 Covariance Type: nonrobust ============================================================================== coef std err t P>|t| [0.025 0.975] ------------------------------------------------------------------------------ Intercept 37.1674 1.700 21.868 0.000 33.680 40.655 wt -3.9552 0.670 -5.906 0.000 -5.329 -2.581 hp -0.0300 0.010 -3.086 0.005 -0.050 -0.010 ============================================================================== Omnibus: 5.693 Durbin-Watson: 1.730 Prob(Omnibus): 0.058 Jarque-Bera (JB): 4.388 Skew: 0.922 Prob(JB): 0.111 Kurtosis: 3.328 Cond. No. 601. ============================================================================== 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