Detecting problems with the model
If outliers or curvature are present in a data set, they are often visible in a scatterplot of the response against the explanatory variable. However these features are usually clearer if the residuals are plotted against X rather than the original response.
Plot residuals against X to look for problems in the model
Atmospheric pressure and boiling point
In the mid 19th century, J. D. Forbes took measurements of the boiling point of water (degrees Fahrenheit) and barometric pressure (inches of mercury) at 17 locations in the Alps and in Scotland.
The data were collected with the aim of predicting barometric pressure (and hence altitude) from the boiling point, an easily measured quantity. We therefore treat pressure as the response variable in our model.
Although the scatterplot of the raw data on the left seems to conform quite well to a simple linear model, the plot of residuals on the right highlights two problems with the model.
The outlier is likely to have been caused by an incorrect measurement, but this is now impossible to check. Click Delete Outlier to remove the outlier.
We will examine solutions to the problem of nonlinearity later.