We first consider the most common case in practical applications, where the noise in the observations is additive white Gaussian noise.
Let
The function may differ across samples, so that different quantities are observed, each depending on the same parameters
.
In this case, Equation (4.3) can be generalized as
We introduce the vector , defined as
| (4.5) |
To obtain a maximum likelihood estimator, the quantity to minimize is the negative log likelihood (Section 2.7) of the function (4.3).
In the case of Gaussian noise, the likelihood function is given by
Least squares regression is a standard optimization technique for overdetermined systems. It finds the parameters
of a function
that minimize an error
, calculated as the sum of the squared errors (Sum Of Squared Errors) of the residuals
over a set of
observations
:
is a function whose minimum value is sought as the parameters
vary:
From a computational standpoint, finding a global minimum is difficult, and techniques are generally used to find only local minima.
Let
4.1 be differentiable, that is, let
be differentiable.
A necessary condition for
to be a minimum is that, at that point in parameter space, the gradient of
vanishes:
A sufficient condition for a stationary point (
) to be a minimum is that
(the Hessian) be positive definite.
Clearly, the existence of a local minimum guarantees only that there is a neighborhood
of
such that the function
.
The discussion so far has assumed that the noise is additive with constant variance across all samples (homoscedasticity).
If the measurement noise is still additive, zero-mean Gaussian noise, but its variance is not constant, each observation
is an independent random variable with associated variance
.
Intuitively, the optimal regression in this case should assign greater weight to samples with low variance and less weight to samples with high variance.
To achieve this, a normalization is used, similar to the one shown in Section 2.4.1 and arising directly from the likelihood in Equation (4.6). Thus, rather than minimizing the unweighted sum of squared residuals, we minimize the weighted sum of squared residuals:
| (4.10) |
More generally, when the observation is affected by Gaussian noise with known covariance matrix
, the Weighted Sum of Squared Errors (WSSE) can be written as
| (4.12) |
Any Weighted Least Squares problem can be reduced to an unweighted problem
by premultiplying the residuals
(and consequently their derivatives) by a matrix
such that
, using, for example, a Cholesky decomposition when the matrix is not diagonal.
All these estimators, which account for the observation variance, coincide with the negative log likelihood for the variable perturbed by zero-mean Gaussian noise with covariance
.