## Description

- 6-3 Jupyter Notebook (Discussion Prep)External Learning ToolThis activity will take you to the Jupyter Notebook containing the Python scripts for your Module One discussion. It is highly recommended that you read through the discussion prompt before completing your work in this notebook. When you are finished completing and running the Python scripts, begin work on your initial discussion post.Note: This task is not graded, but you will be required to attach your completed Jupyter notebook to your discussion post in the next activity.
- 6-4 Discussion: Creating a Multiple Regression ModelDiscussion Topic

Starts Jun 5, 2021 8:59 PM- 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)

- 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?

- Review your peer’s multiple regression model (#3 in their initial post). What is the predicted value of miles per gallon for a car that has 2.78 (2,780 lbs) weight and 225 horsepower? Suppose that this car achieves 18 miles per gallon, what is the residual based on this actual value and the value that is predicted using the regression equation?
- How do the plots and correlation coefficients of your peers compare with yours?
- Would you recommend this regression model to the car rental company? Why or why not?

### Unformatted Attachment Preview

Purchase answer to see full attachment

## Explanation & Answer

View attached explanation and answer. Let me know if you have any questions.

Module 6 Discussion

For the discussion, analysis was carried out to evaluate whether horsepower and weight of the

car are significant predictors of miles per gallon (MPG). The obtained results are as discussed

below.

Scatterplot

The first analysis involved plotting scatterplots of miles per gallon against horsepower and miles

per gallon against the weight of car. The obtained plots are as shown below.

Figure 1: Scatterplot of Miles per Gallon (MPG) against the Weight of the car.

Figure 2: Scatterplot of Miles per Gallon (MPG) against Horsepower

The scatterplots show that there is a negative linear relationship between the weight of a car and

the MPG. There is also a negative linear relationship between horsepower and the MPG. MPG

decreases as horsepower increases, and also MPG decreases as the weight of car increases and

vice versa. The results were as expected because as the weight of a car increases, then the

amount of fuel consumed per mile is more, thereby resulting in a lower MPG. In terms of

horsepower, the results were also as expected. The more power a car needs, then the more fuel it

uses per mile, thereby resulting in a lower MPG.

Correlation coefficients

The correlation coefficient confirms the results observed from the scatterplots. The correlation

coefficient between the weight of a car and the MPG is equal to -0.868. The correlation

coefficient indicates that there is a strong negative linear relationship between the weight of a car

and the MPG. MPG therefore strongly linearly decreases as the weight of a car increases. The

correlation coefficient between horsepower and the MPG is equal to -0.786. The correlation

coefficient also indicates that there is a strong negative linear relationship between the

horsepower of a car and the ...