MAT-243 - 6-4 Discussion - Creating a Multiple Regression Model
docx
keyboard_arrow_up
School
Southern New Hampshire University *
*We aren’t endorsed by this school
Course
243
Subject
Industrial Engineering
Date
Jan 9, 2024
Type
docx
Pages
4
Uploaded by EarlSteel9150
6-4 Discussion: Creating a Multiple
Regression Model
Use the link in the Jupyter Notebook activity to access your Python script. Once you have made
your calculations, complete this discussion. The script will output answers to the questions given
below. You must attach your Python script output as an HTML file and respond to the questions
below.
In this discussion, you will apply the statistical concepts and techniques covered in this week's
reading about multiple regression. Last week's 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:
1.
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.
2.
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.
3.
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?
In your follow-up posts to other students, review your peers' results and provide some analysis
and interpretation:
1.
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?
2.
How do the plots and correlation coefficients of your peers compare with yours?
3.
Would you recommend this regression model to the car rental company? Why or why
not?
In your initial post, address the following items:
1.
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.
2.
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.
3.
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?
Hello,
The scatterplots in the photos below show a trend, as we can see from the relationships between
the variables weight of the car and miles per gallon (mpg), as well as the relationship between
the other two variables horsepower and mpg.
This is a trend that I expect since, as we can see
from the graph, a heavier vehicle will need more fuel per mile, but a lighter vehicle will require
less fuel per mile. Similar to the mpg against horsepower, as the horsepower increases, the mpg
decreases because the more horsepower it needs to operate the more miles per gallon it needs to
operate.
The coefficient of correlation between miles per gallon and horsepower is -0.780127. Since the
strength of correlation can be described by the absolute value, the absolute value of -0.780127 is
0.780127. By comparing it to the strength of the correlation table, I can say that this coefficient
of correlation is a moderate correlation because it is 0.40 is less than 0.780127 and 0.780127 is
less than 0.80. The coefficient of correlation between miles per gallon and the weight of the car
is -0.876344.
Since the strength of correlation can be described by the absolute value, the
absolute value of -0.876344 is 0.876344. By comparing it to the strength of the correlation table,
I can say that this coefficient of correlation is a strong correlation because it is 0.80 is less than
0.876344, and 0.876344 is greater than 1.00. Because as one variable increases while the other
variable decreases this is a negative correlation. The coefficients of correlation indicate a strong
correlation between these variables.
The multiple regression equation that the car rental company can use is MPG = 37.1710 -
3.8944wt - 0.0306hp. This formula will help the car rental to charge its customers appropriately
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
based on the weight and the horsepower and how these factors affect the miles per gallon of the
cars.
In your follow-up posts to other students, review your peers' results and provide some analysis
and interpretation:
1.
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?
2.
How do the plots and correlation coefficients of your peers compare with yours?
3.
Would you recommend this regression model to the car rental company? Why or why
not?
Hello Roy,
Since your multiple regression equation is : mpg= 37.3147 - 3.9376(2.78) - 0.0317(225) =
19.235672. The predicted value of miles per gallon for a car that has 2.78(2,780lb) weight and
225 horsepower if we are going to use formula is 19.235672 or 19.2357 if rounded to 4 decimal
places. The residual value if the car archives 18 miles per gallon is: 18 - 19.2357 = -1.2357.
My plot and yours resemble each other. Your correlation coefficients are very similar to mine.
Since one variable increases while the other variable decreases, the mpg against weight and mpg
against horsepower are both negative correlation.
I would suggest your regression model to the car rental
because it will assist the car rental
company in calculating the miles per gallon of vehicles using the weight of the car and
horsepower.
Hello Braxton,
Following your multiple regression equation:
Ŷ
= 37.3421 - 3.8372(2.78) - 0.0326(225) =
19.339684. So, the predicted value of miles per gallon for a car that has 2.78 (2,780 lbs) weight
and 225 horsepower is 19.339684 or 19.3397. The residual value if the car archives 18 miles per
gallon is: 18 - 19.3397 = -1.3397.
Your scatterplot and mine are somewhat similar.
Your and mine have almost identical correlation coefficient values between mpg and horsepower
(mine is -0.780127 and yours is -0.790297) and also in correlation coefficient values between
mpg and weight (mine is -0.876344 and yours is -0.871552). Since one variable increases while
the other variable decreases, the mpg against weight and the mpg against horsepower are both
negative correlations.
I would suggest your regression model to the car rental because it will assist the car rental
company in calculating the miles per gallon of vehicles using the weight of the car and
horsepower.