Regression to a Line
Let
 |
(4.86) |
be the equation of the line written in explicit form, with the measurement error entirely along the
axis.
With the error along the
axis, the cost function to be minimized is
 |
(4.87) |
The solution to the problem is the point at which the gradient of
at
and
vanishes:
 |
(4.88) |
that is:
 |
(4.89) |
where
is the mean of the samples
(the other quantities are denoted using the same notation).
The line passes through the point
, the centroid of the distribution.
This result can easily be modified when one wants to minimize the deviation along the
rather than along the
, or represent the equation of the line in implicit form.
Paolo medici
2026-10-01