Start with the Statistical Model
Least squares becomes a statistical estimator only after we state how the observations were generated. Let
In this model, is a fixed design matrix, is the unknown parameter vector, and contains the observations. For ordinary Gaussian least squares, assume
The second assumption is that has full column rank. Under these two assumptions, the observation vector follows . Its mean is , and its covariance matrix is .
Fisher Information and Estimator Covariance
Up to a constant that does not depend on , the log-likelihood is
Its score, Hessian, and Fisher information are
is the Fisher information only in the standardized case . Solving the score equation gives
Because a linear transformation of a Gaussian vector is Gaussian,
The covariance is exactly the inverse Fisher information under this model:
The diagonal entry is the variance of . An off-diagonal entry measures how two coefficient estimates vary together, and their correlation is
Confidence Intervals When the Variance Is Unknown
If is unknown and , estimate it from the residuals:
Under the Gaussian model, an exact two-sided confidence interval for coefficient is
The interval is a repeated-sampling statement about the procedure. It is not the probability that a fixed parameter lies in one already computed interval.
Stable Computation from an Orthogonal Decomposition
Let be the reduced decomposition, where has orthonormal columns and is nonsingular upper triangular. Then
In numerical code, solve the triangular system directly. This avoids forming . also avoids squaring the condition number through .
Weighted and Generalized Least Squares
Suppose instead that the errors have known positive-definite covariance :
Generalized least squares minimizes
The generalized least-squares solution, Fisher information, and estimator covariance are
For independent errors with variances , use . The objective becomes
Each observation receives weight . Whitening with converts the problem to ordinary least squares for and .
Fitting a Weighted Linear Model
Consider three observations for an intercept and slope:
The third observation has standard deviation , so it receives only one quarter of the weight of either of the first two. The weighted normal equations are
Writing the two equations and eliminating the intercept makes the parameter calculation explicit:
| Observation | Standard deviation | Inverse-variance weight |
|---|---|---|
| 1 | 1 | 1 |
| 2 | 1 | 1 |
| 3 | 2 |
Solving the weighted normal equations gives
The weighting has a probabilistic meaning only if the variance model is defensible. Incorrect weights can produce misleading standard errors, and exact Gaussian confidence intervals also require the linear mean, covariance, and normal-error assumptions to be adequate.