Goal of small residuals

When fitting a model to data, the fitted values are unlikely to match exactly the observed response values and the prediction 'errors' are the residuals,

ei  =  yi

'Small' residuals are desirable.

Least squares

The size of the residuals is described by their sum of squares,

SSResidual    

The least squares estimates of b0, b1 and b2 are the values that minimise this.

The solution can be obtained algebraically but the formulae are relatively complex and a computer should be used to evaluate the least squares estimates.