Question: in R-studio (25 points) This question involves the use of simple linear regression on the Auto dataset from the ISLR library. (a) (2 points) Load

in R-studio

in R-studio (25 points) This question involves the use of simple linear

(25 points) This question involves the use of simple linear regression on the Auto" dataset from the ISLR library. (a) (2 points) Load the dataset and show how many rows and columns exist in it. (Hint: You may need to install this library first.) (b) (2 points) Plot the horsepower versus mpg. (c) (8 points) Do you think that we can apply linear regression to predict the "mpg" value for a horsepower of 250? If so, apply simple linear regression to find this value using your own code (without using the built-in functions). (d) (4 points) 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. Comment on the output. (e) (3 points) Compare the results obtained in part (c) with that of the Im function obtained in (d). (f) (2 points) What is the predicted mpg associated with a horsepower of 98? You may use the predict" function or the equation of straight line obtained in (c). (g) (2 points) Plot the response and the predictor. Use the abline() function to display the least squares regression line. (h) (2 points) Do you think that simple linear regression best fit this data? If not, what is the other regression technique that may result in a better fit

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!