MAT-243 - 5-3 Discussion - Simple Linear Regression
.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
5-3 Discussion: Simple Linear Regression
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 correlation coefficient and simple linear regression. A car rental company wants to evaluate the premise that heavier cars are less fuel efficient than lighter cars. In other words, the company expects that fuel efficiency (miles per gallon) and weight of the car (often measured in thousands of pounds) are correlated. Performing this analysis will help the company optimize its business model and charge its customers appropriately.
In this discussion, you will work with a cars data set that includes two variables:
Miles per gallon (coded as mpg in the data set)
Weight of the car (coded as wt 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.
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.
2.
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.
3.
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.
4.
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.
In your follow-up posts to other students, review your peers' calculations and provide some analysis and interpretation:
1.
How do their plots and correlation coefficients compare with yours?
2.
Would you recommend this regression model to the car rental company? Why or why not?
Remember to attach your Python output and respond to all questions in your initial and follow-
up posts. Be sure to clearly communicate your ideas using appropriate terminology.
In your initial post, address the following items:
1.
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.
2.
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.
3.
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.
4.
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.
A scatter plot shows a positive trend(positive correlation) when the values of y increase in line with the values of x. Here, the points form a line that slants up from the left to the right.
A scatter plot shows a negative trend(negative correlation) when the values of y decreases as the values of x increases. Hee, the points form a line that slants down from the left to the right.
A scatter plot shows no trend(no correlation) when the points are scattered randomly. Here, no line is formed.
A trend or a regression curve is a curve indeed to a scatter plot that shows the relationship between two variables. The image below shows that there is a trend because we can see the relationship between two variables which are the miles per gallon (mpg)
and the weight of the car.
This is a trend that I am expecting because if we look at the graph the heavier the vehicle it will need more gallons of fuel per mile and on the opposite, the lighter the car the less it needs a gallon of fuel per mile.
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