Question
For this question, use the program R (https://www.r-project.org/) to determine the simple linear regression on the 'Auto' data set. link to csv dataset: https://www.dropbox.com/s/rz085hmev62c8c2/Auto-rev.csv?dl=0 (a)
For this question, use the program "R" (https://www.r-project.org/) to determine the simple linear regression on the 'Auto' data set. link to csv dataset: https://www.dropbox.com/s/rz085hmev62c8c2/Auto-rev.csv?dl=0
(a) Use the lm() function to perform a simple linear regression with mpg as the response and horsepower as the predictor. Use the summary() function to print the results to include in your submission. Comment on the output.
i. Is there a relationship between the predictor and the response? ii. How strong is the relationship between the predictor and the response? iii. Is the relationship between the predictor and the response positive or negative? iv. What is the predicted mpg associated with a horsepower of 98? What are the associated 95% confidence and prediction intervals?
(b) Plot the response and the predictor. Use the abline() function to display the least squares regression line. Include this graph.
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