Fitted values
A linear model,
y = b0 + b1 x
involves two constants (the slope and intercept) whose values are unknown; they are called unknown parameters of the model. How should we set their values to match a particular data set?
To assess how well a particular linear model fits any one of our data points, (xi, yi), we might consider how well the model would predict the y-value of the point,
![]() |
= b0 + b1 xi |
These predictions for the x-values in the data set are called fitted values.
Residuals
The difference between the fitted values for a data point and its actual y-value is called the point's residual.
ei = yi − | ![]() |
The residuals describe the 'errors' that would have resulted from using the model to predict the response for the x-values in the data.
Temperature and latitude
The scatterplot below shows the maximum January temperature (y, in degrees Fahrenheit) and latitude (x, in degrees) of various cities in the USA.
A line that we may consider as a linear model for these data is drawn in grey on the plot.
Click on individual crosses to determine the cities from which the measurements were made. The fitted values and residuals are also displayed above the scatterplot. For example, Seattle Tacoma, one of the crosses above the line at the bottom right, has an actual temperature of 44 degrees (the vertical position of the cross), a fitted temperature of 33.18 degrees, and a residual of 10.82.
Note that the residuals are the vertical distances of the crosses to the line.