Residuals Math Example 1

Follow the full solution, then compare it with the other examples linked below.

Example 1

easy
Given y^=2+3x\hat{y} = 2 + 3x, and observed point (4,15)(4, 15): calculate the residual and interpret whether the model over- or under-predicts.

Solution

  1. 1
    Calculate predicted value: y^=2+3(4)=2+12=14\hat{y} = 2 + 3(4) = 2 + 12 = 14
  2. 2
    Calculate residual: e=yโˆ’y^=15โˆ’14=1e = y - \hat{y} = 15 - 14 = 1
  3. 3
    Positive residual: actual value (15) is ABOVE the predicted value (14)
  4. 4
    Interpretation: the model under-predicts by 1 unit for this observation

Answer

e=15โˆ’14=1e = 15 - 14 = 1 (positive). The model under-predicts by 1 unit.
A residual e=yโˆ’y^e = y - \hat{y} measures the vertical distance between observed and predicted. Positive residual = point above the line (model under-predicts); negative residual = point below the line (model over-predicts). Residuals should average to zero for a good model.

About Residuals

The difference between an observed value and its predicted value from a regression model: residual=yโˆ’y^\text{residual} = y - \hat{y} (observed minus predicted).

Learn more about Residuals โ†’

More Residuals Examples