where are non-random but unobservable parameters, are non-random and observable (called the "explanatory variables"), are random, and so are random. The random variables 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 with a newly introduced last column of X being unity i.e., for all .

The Gauss–Markov assumptions are

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

for that is, the error terms are uncorrelated. A linear estimator of is a linear combination

in which the coefficients are not allowed to depend on the underlying coefficients , since those are not observable, but are allowed to depend on the values , since these data are observable. (The dependence of the coefficients on each is typically nonlinear; the estimator is linear in each and hence in each random , which is why this is "linear" regression.) The estimator is said to be unbiasedif and only if

regardless of the values of . Now, let be some linear combination of the coefficients. Then the mean squared error of the corresponding estimation is

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 of parameters is one with the smallest mean squared error for every vector of linear combination parameters. This is equivalent to the condition that

is a positive semi-definite matrix for every other linear unbiased estimator .

The ordinary least squares estimator (OLS) is the function

of and (where denotes the transpose of ) that minimizes the sum of squares of residuals (misprediction amounts):

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 whose coefficients do not depend upon the unobservable but whose expected value is always zero.

Let be another linear estimator of and let C be given by , where D is a 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 , the OLS estimator.

The expectation of is:

Therefore, is unbiased if and only if .

The variance of is

Since DD' is a positive semidefinite matrix, exceeds by a positive semidefinite matrix.

As it has been stated before, the condition of is equivalent to the property that the best linear unbiased estimator of is (best in the sense that it has minimum variance). To see this, let another linear unbiased estimator of .

Therefore, .

Moreover, suppose that the equality holds (). It happens if and only if . Remembering that, from the proof above, we have , then:

This proofs that the equality holds if and only if which gives the unicity of the OLS estimator as a BLUE.

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.[2] Instead, the assumptions of the Gauss–Markov theorem are stated conditional on *X*

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 qualifies as linear while 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.

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.[4] The term "spherical errors" will describe the multivariate normal distribution: if 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.[5]

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."[6] 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.[7]

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.

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.[8] 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.