A residual is the vertical miss between a shown value and a fitted value. Squared error turns those misses into one exact quantity to minimize.
highlighted = computed this step
Candidate line A
For line A, y=1 plus 1x. Each residual is computed as actual y minus fitted y.
r=y−(1+1x)
Why squared error
Squaring makes every miss positive and gives larger misses more weight. The trial residuals are 0, 1, -1, and 1; the table also derives a second candidate from the same data.
SSE=3
Summary
Line A has residual sum 1 and SSE 3. Line B has smaller SSE 27/10; later lessons show how least squares chooses it.