# Gauss–Markov theorem

Template:Distinguish2 {{#invoke:Hatnote|hatnote}}Template:Main other Template:Regression bar

In statistics, the Gauss–Markov theorem, named after Carl Friedrich Gauss and Andrey Markov, states that in a linear regression model in which the errors have expectation zero and are uncorrelated and have equal variances, the best linear unbiased estimator (BLUE) of the coefficients is given by the ordinary least squares (OLS) estimator. Here "best" means giving the lowest variance of the estimate, as compared to other unbiased, linear estimators. The errors don't need to be normal, nor do they need to be independent and identically distributed (only uncorrelated and homoscedastic). The hypothesis that the estimator be unbiased cannot be dropped, since otherwise estimators better than OLS exist. See for examples the James–Stein estimator (which also drops linearity) or ridge regression.

## Statement

Suppose we have in matrix notation,

${\underline {y}}=X{\underline {\beta }}+{\underline {\varepsilon }},\quad ({\underline {y}},{\underline {\varepsilon }}\in {\mathbb {R} }^{n},\beta \in {\mathbb {R} }^{K}{\text{ and }}X\in {\mathbb {R} }^{n\times K})$ expanding to,

$y_{i}=\sum _{j=1}^{K}\beta _{j}X_{ij}+\varepsilon _{i}\quad \forall i=1,2,\ldots ,n$ where $\beta _{j}$ are non-random but unobservable parameters, $X_{ij}$ are non-random and observable (called the "explanatory variables"), $\varepsilon _{i}$ are random, and so $y_{i}$ are random. The random variables $\varepsilon _{i}$ are called the "disturbance", "noise" or simply "error" (will be contrasted with "residual" later in the article; see errors and residuals in statistics). Note that to include a constant in the model above, one can choose to introduce the constant as a variable $\beta _{K+1}$ with a newly introduced last column of X being unity i.e., $X_{i(K+1)}=1$ for all $i$ .

The Gauss–Markov assumptions are

(i.e., all disturbances have the same variance; that is "homoscedasticity"), and

for $i\neq j$ that is, the error terms are uncorrelated. A linear estimator of $\beta _{j}$ is a linear combination

${\widehat {\beta }}_{j}=c_{1j}y_{1}+\cdots +c_{nj}y_{n}$ in which the coefficients $c_{ij}$ are not allowed to depend on the underlying coefficients $\beta _{j}$ , since those are not observable, but are allowed to depend on the values $X_{ij}$ , since these data are observable. (The dependence of the coefficients on each $X_{ij}$ is typically nonlinear; the estimator is linear in each $y_{i}$ and hence in each random $\varepsilon$ , which is why this is "linear" regression.) The estimator is said to be unbiased if and only if

$E({\widehat {\beta }}_{j})=\beta _{j}\,$ regardless of the values of $X_{ij}$ . Now, let $\sum _{j=1}^{K}\lambda _{j}\beta _{j}$ be some linear combination of the coefficients. Then the mean squared error of the corresponding estimation is

$E\left(\left(\sum _{j=1}^{K}\lambda _{j}({\widehat {\beta }}_{j}-\beta _{j})\right)^{2}\right);$ i.e., it is the expectation of the square of the weighted sum (across parameters) of the differences between the estimators and the corresponding parameters to be estimated. (Since we are considering the case in which all the parameter estimates are unbiased, this mean squared error is the same as the variance of the linear combination.) The best linear unbiased estimator (BLUE) of the vector $\beta$ of parameters $\beta _{j}$ is one with the smallest mean squared error for every vector $\lambda$ of linear combination parameters. This is equivalent to the condition that

$V({\tilde {\beta }})-V({\widehat {\beta }})$ is a positive semi-definite matrix for every other linear unbiased estimator ${\tilde {\beta }}$ .

The ordinary least squares estimator (OLS) is the function

${\widehat {\beta }}=(X'X)^{-1}X'y$ $\sum _{i=1}^{n}\left(y_{i}-{\widehat {y}}_{i}\right)^{2}=\sum _{i=1}^{n}\left(y_{i}-\sum _{j=1}^{K}{\widehat {\beta }}_{j}X_{ij}\right)^{2}.$ The theorem now states that the OLS estimator is a BLUE. The main idea of the proof is that the least-squares estimator is uncorrelated with every linear unbiased estimator of zero, i.e., with every linear combination $a_{1}y_{1}+\cdots +a_{n}y_{n}$ whose coefficients do not depend upon the unobservable $\beta$ but whose expected value is always zero.

## Proof

Let ${\tilde {\beta }}=Cy$ be another linear estimator of $\beta$ and let C be given by $(X'X)^{-1}X'+D$ , where D is a $k\times n$ nonzero matrix. As we're restricting to unbiased estimators, minimum mean squared error implies minimum variance. The goal is therefore to show that such an estimator has a variance no smaller than that of ${\hat {\beta }}$ , the OLS estimator.

{\begin{aligned}E(Cy)&=E(((X'X)^{-1}X'+D)(X\beta +\varepsilon ))\\&=((X'X)^{-1}X'+D)X\beta +((X'X)^{-1}X'+D)\underbrace {E(\varepsilon )} _{0}\\&=(X'X)^{-1}X'X\beta +DX\beta \\&=(I_{k}+DX)\beta .\\\end{aligned}}  ## Generalized least squares estimator

The generalized least squares (GLS) or Aitken estimator extends the Gauss–Markov theorem to the case where the error vector has a non-scalar covariance matrixTemplate:Spaced ndashthe Aitken estimator is also a BLUE.

## Gauss–Markov theorem as stated in Econometrics

In most treatments of OLS, the data *X* is assumed to be fixed. This assumption is considered inappropriate for a predominantly nonexperimental science like econometrics. Instead, the assumptions of the Gauss–Markov theorem are stated conditional on *X*

### Linearity

The dependent variable is assumed to be a linear function of the variables specified in the model. The specification must be linear in its parameters. This does not mean that there must be a linear relationship between the independent and dependent variables. The independent variables can take non-linear forms as long as the parameters are linear. The equation $y=\alpha +\beta x^{2},\,$ qualifies as linear while $y=\alpha +\beta ^{2}x$ can be transformed to be linear by replacing (beta)^2 by another parameter, say gamma. An equation with a parameter dependent on an independent variable does not qualify as linear, for example y = alpha + beta(x) * x, where beta(x) is a function of x.

Data transformations are often used to convert an equation into a linear form (see, however, Santos Silva and Tenreyro, 2006). For example, the Cobb–Douglas function—often used in economics—is nonlinear:

$Y=AL^{\alpha }K^{\beta }\varepsilon \,$ But it can be expressed in linear form by taking the natural logarithm of both sides:Template:Sfn $lnY=lnA+\alpha lnL+\beta lnK+ln\varepsilon$ This assumption also covers specification issues: assuming that the proper functional form has been selected and there are no omitted variables.

### Spherical errors

$\operatorname {Var} [\,\varepsilon |X\,]=\sigma ^{2}I_{n},$ Error terms are assumed to be spherical otherwise the OLS estimator is inefficient. The OLS estimator remains unbiased, however. Spherical errors occur when errors have both uniform variance (homoscedasticity) and are uncorrelated with each other.Template:Sfn The term "spherical errors" will describe the multivariate normal distribution: if $\operatorname {Var} [\,\varepsilon |X\,]=\sigma ^{2}I_{n}$ in the multivariate normal density, then the equation f(x)=c is the formula for a “ball” centered at μ with radius σ in n-dimensional space.Template:Sfn

Heteroskedacity occurs when the amount of error is correlated with an independent variable. For example, in a regression on food expenditure and income, the error is correlated with income. Low income people generally spend a similar amount on food, while high income people may spend a very large amount or as little as low income people spend. Heteroskedacity can also be caused by changes in measurement practices. For example, as statistical offices improve their data, measurement error decreases, so the error term declines over time.

This assumption is violated when there is autocorrelation. Autocorrelation can be visualized on a data plot when a given observation is more likely to lie above a fitted line if adjacent observations also lie above the fitted regression line. Autocorrelation is common in time series data where a data series may experience "inertia."Template:Sfn If a dependent variable takes a while to fully absorb a shock. Spatial autocorrelation can also occur geographic areas are likely to have similar errors. Autocorrelation may be the result of misspecification such as choosing the wrong functional form. In these cases, correcting the specification is one possible way to deal with autocorrelation.

In the presence of non-spherical errors, the generalized least squares estimator can be shown to be BLUE.Template:Sfn

### Exogeneity of independent variables

$\operatorname {E} [\,\varepsilon |X\,]=0.$ This assumption is violated if the variables are endogenous. Endogeneity can be the result of simultaneity, where causality flows back and forth between both the dependent and independent variable. Instrumental variable techniques are commonly used to address this problem.

### Full rank

The sample data matrix must have full rank or OLS cannot be estimated. There must be at least one observation for every parameter being estimated and the data cannot have perfect multicollinearity.Template:Sfn Perfect multicollinearity will occur in a "dummy variable trap" when a base dummy variable is not omitted resulting in perfect correlation between the dummy variables and the constant term.

Multicollinearity (as long as it is not "perfect") can be present resulting in a less efficient, but still unbiased estimate.