Lab - week 2
Data
presidents.csv
USpop.csv
Exercise 1
- Read in the
USpop data
- Create a scatterplot of
Year and Population from the USpop data set.
- Fit a linear model to
USpop with Population as the response and Year as the predictor.
- Look at the summary of he model. Plot the model against the scatterplot.
Fit a quadratic regression model.
- Use the model to predict what will happen in year 2030, 2040, and 2050. Is this realistic?
Exercise 2
- Read in the
presidents data
- Create a scatterplot of
actual and expected from the presidents data set.
- Fit a linear model to
presidents with actual as the response and expected as the predictor.
- Look at the summary of he model. Plot the model against the scatterplot. How well does the model fit?