The least squares method (OLS: ordinary least squares)
The least squares method is used to calculate the coefficients so that the errors are as small as
possible.
We minimize the sum of squared residuals:
ݑଶ ൌ ሺݕ െ ݕොሻଶ ൌ ሺݕ െ ܾ െ ܾଵݔሻଶ
In a simple linear regression the coefficients are calculated as:
ሻݕ ,ݔሺݒܿ
ܾଵ ൌ
ሻݔሺݎܽݒ
ܾ ൌ ݕതെܾଵݔ̅