Compute a residual and its sign
Check signs and decimal points before moving to the next value. · 178 words
A residual measures the difference between an observed value and a model's prediction. Use the convention residual = observed - predicted. Its sign tells us the direction of the mistake. For example, a soccer team actually scores 7 goals, but an intercept-only model predicts 5. The residual is 7 - 5 = +2. The positive sign means the model underpredicted the result by 2 goals. Squaring the residual, as squared-error training does, gives 4. Squaring removes the sign but also prevents positive and negative mistakes from canceling.
A negative residual means the opposite: the prediction was too high. At a parcel counter, a scale's true reading is 2.8 kilograms, while a model based only on recent averages predicts 3.2 kilograms. The residual is 2.8 - 3.2 = -0.4, so the model overpredicted the weight by 0.4 kilograms. Its squared error is (-0.4)^2 = 0.16 square kilograms. If the observed value and prediction are exactly equal, the residual is zero and the model is correct for that record. Always state the subtraction order because reversing it changes the sign.
Check your recall
If the observed value is 120 and the prediction is 100, what is the residual, and what does its sign mean?
Check your answer
Using observed minus predicted, the residual is 120 - 100 = +20. The positive sign means the model underpredicted by 20.
Sources and credits
Original KeyTouch lesson. Background reading · Google · Linear regression.