9.2: Residuals
The key to creating any statistical model is to verify if the model actually explains the data. In addition to simple visual inspection, residuals provide a pathway for making a rigorous estimate of model accuracy when applying any form of regression. Read this overview of how residuals are applied.
Use this video to tie up any conceptual loose ends and see more examples of how residuals can help evaluate model accuracy.
Work through this project to put together the concepts introduced so far. To navigate to the notebook portion of the project, click on the SLRProject.ipynb link near the top of the page to run it in Google Colab. Assuming the following command has been invoked:
import pandas as pd
you can run the commands:
data = pandas.read_csv("http://www.econometrics.com/intro/SALES.txt")
data.head()to access the dataset and see the first few lines printed to the screen.