Question: Overview The ISLR2 library contains a dataset called Auto. This dataset contains a list of American cars, with variables for the mpg, horsepower, weight, and


Overview The ISLR2 library contains a dataset called Auto. This dataset contains a list of American cars, with variables for the mpg, horsepower, weight, and acceleration. If you are unfamiliar with car terminology. MPG is a measure of fuel efficiency (more mpg, more efficient) and horsepower is a measurement of how much "power" an engine produces (more horsepower, more power) To complete this lab: create a Word document (or similar document) with results for all questions in the Lab Steps section. Include photos of plots. Set-up 1. Load the ISLR2 library into R 2. Load the Auto dataset Lab Steps 1. Using the Auto dataset: find the correlation between (mpg, horsepower), (mpg, weight), (mpg, accel- eration) 2. Graph a scatterplot for (mpg, horsepower), (mpg, weight) and (mpg, acceleration) and include a line of best fit 3. Describe the correlation in your own words. What types of relationships do you notice for each pair? Do you notice any similarities between the scatterplots? 4. Fit a simple linear regression model for: response (mpg), explanatory (horsepower) 5. Display the coefficients from this model 6. Repeat steps 4 and 5 for: response (mpg), explanatory (weight) 7. If we increase the horsepower of a car by 1, what happens to mpg in our model? 8. Predict the MPG for a car with 190 horsepower 9. Predict the MPG for a car that weighs 4000lbs
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
