Ordinary least squares
Part of a series on 
Regression analysis 

Models 
Estimation 
Background 

In statistics, ordinary least squares (OLS) is a type of linear least squares method for estimating the unknown parameters in a linear regression model. OLS chooses the parameters of a linear function of a set of explanatory variables by the principle of least squares: minimizing the sum of the squares of the differences between the observed dependent variable (values of the variable being observed) in the given dataset and those predicted by the linear function of the independent variable.
Geometrically, this is seen as the sum of the squared distances, parallel to the axis of the dependent variable, between each data point in the set and the corresponding point on the regression surface—the smaller the differences, the better the model fits the data. The resulting estimator can be expressed by a simple formula, especially in the case of a simple linear regression, in which there is a single regressor on the right side of the regression equation.
The OLS estimator is consistent when the regressors are exogenous, and—by the Gauss–Markov theorem—optimal in the class of linear unbiased estimators when the errors are homoscedastic and serially uncorrelated. Under these conditions, the method of OLS provides minimumvariance meanunbiased estimation when the errors have finite variances. Under the additional assumption that the errors are normally distributed, OLS is the maximum likelihood estimator.
Linear model
Suppose the data consists of [math]\displaystyle{ n }[/math] observations [math]\displaystyle{ \left\{\mathbf{x}_i, y_i\right\}_{i=1}^n }[/math]. Each observation [math]\displaystyle{ i }[/math] includes a scalar response [math]\displaystyle{ y_i }[/math] and a column vector [math]\displaystyle{ \mathbf{x}_i }[/math] of [math]\displaystyle{ p }[/math] parameters (regressors), i.e., [math]\displaystyle{ \mathbf{x}_i=\left[x_{i1}, x_{i2}, \dots, x_{ip}\right]^\mathsf{T} }[/math]. In a linear regression model, the response variable, [math]\displaystyle{ y_i }[/math], is a linear function of the regressors:
 [math]\displaystyle{ y_i = \beta_1\ x_{i1} + \beta_2\ x_{i2} + \cdots + \beta_p\ x_{ip} + \varepsilon_i, }[/math]
or in vector form,
 [math]\displaystyle{ y_i = \mathbf{x}_i^\mathsf{T} \boldsymbol{\beta} + \varepsilon_i, \, }[/math]
where [math]\displaystyle{ \mathbf{x}_i }[/math], as introduced previously, is a column vector of the [math]\displaystyle{ i }[/math]th observation of all the explanatory variables; [math]\displaystyle{ \boldsymbol{\beta} }[/math] is a [math]\displaystyle{ p \times 1 }[/math] vector of unknown parameters; and the scalar [math]\displaystyle{ \varepsilon_i }[/math] represents unobserved random variables (errors) of the [math]\displaystyle{ i }[/math]th observation. [math]\displaystyle{ \varepsilon_i }[/math] accounts for the influences upon the responses [math]\displaystyle{ y_i }[/math] from sources other than the explanators [math]\displaystyle{ \mathbf{x}_i }[/math]. This model can also be written in matrix notation as
 [math]\displaystyle{ \mathbf{y} = \mathrm{X} \boldsymbol{\beta} + \boldsymbol{\varepsilon}, \, }[/math]
where [math]\displaystyle{ \mathbf{y} }[/math] and [math]\displaystyle{ \boldsymbol{\varepsilon} }[/math] are [math]\displaystyle{ n \times 1 }[/math] vectors of the response variables and the errors of the [math]\displaystyle{ n }[/math] observations, and [math]\displaystyle{ \mathrm{X} }[/math] is an [math]\displaystyle{ n \times p }[/math] matrix of regressors, also sometimes called the design matrix, whose row [math]\displaystyle{ i }[/math] is [math]\displaystyle{ \mathbf{x}_i^\mathsf{T} }[/math] and contains the [math]\displaystyle{ i }[/math]th observations on all the explanatory variables.
As a rule, the constant term is always included in the set of regressors [math]\displaystyle{ \mathrm{X} }[/math], say, by taking [math]\displaystyle{ x_{i1}=1 }[/math] for all [math]\displaystyle{ i=1, \dots, n }[/math]. The coefficient [math]\displaystyle{ \beta_1 }[/math] corresponding to this regressor is called the intercept.
Regressors do not have to be independent: there can be any desired relationship between the regressors (so long as it is not a linear relationship). For instance, we might suspect the response depends linearly both on a value and its square; in which case we would include one regressor whose value is just the square of another regressor. In that case, the model would be quadratic in the second regressor, but nonetheless is still considered a linear model because the model is still linear in the parameters ([math]\displaystyle{ \boldsymbol{\beta} }[/math]).
Matrix/vector formulation
Consider an overdetermined system
 [math]\displaystyle{ \sum_{j=1}^{p} X_{ij} \beta_j = y_i,\ (i=1, 2, \dots, n), }[/math]
of [math]\displaystyle{ n }[/math] linear equations in [math]\displaystyle{ p }[/math] unknown coefficients, [math]\displaystyle{ \beta_1, \beta_2, \dots, \beta_p }[/math], with [math]\displaystyle{ n \gt p }[/math]. (Note: for a linear model as above, not all elements in [math]\displaystyle{ \mathrm{X} }[/math] contains information on the data points. The first column is populated with ones, [math]\displaystyle{ X_{i1} = 1 }[/math]. Only the other columns contain actual data. So here [math]\displaystyle{ p }[/math] is equal to the number of regressors plus one.) This can be written in matrix form as
 [math]\displaystyle{ \mathrm{X} \boldsymbol{\beta} = \mathbf {y}, }[/math]
where
 [math]\displaystyle{ \mathrm{X}=\begin{bmatrix} X_{11} & X_{12} & \cdots & X_{1p} \\ X_{21} & X_{22} & \cdots & X_{2p} \\ \vdots & \vdots & \ddots & \vdots \\ X_{n1} & X_{n2} & \cdots & X_{np} \end{bmatrix} , \qquad \boldsymbol \beta = \begin{bmatrix} \beta_1 \\ \beta_2 \\ \vdots \\ \beta_p \end{bmatrix} , \qquad \mathbf y = \begin{bmatrix} y_1 \\ y_2 \\ \vdots \\ y_n \end{bmatrix}. }[/math]
Such a system usually has no exact solution, so the goal is instead to find the coefficients [math]\displaystyle{ \boldsymbol{\beta} }[/math] which fit the equations "best", in the sense of solving the quadratic minimization problem
 [math]\displaystyle{ \hat{\boldsymbol{\beta}} = \underset{\boldsymbol{\beta}}{\operatorname{arg\,min}}\,S(\boldsymbol{\beta}), }[/math]
where the objective function [math]\displaystyle{ S }[/math] is given by
 [math]\displaystyle{ S(\boldsymbol{\beta}) = \sum_{i=1}^n \biggl y_i  \sum_{j=1}^p X_{ij}\beta_j\biggr^2 = \bigl\\mathbf y  \mathrm{X} \boldsymbol \beta \bigr\^2. }[/math]
A justification for choosing this criterion is given in Properties below. This minimization problem has a unique solution, provided that the [math]\displaystyle{ p }[/math] columns of the matrix [math]\displaystyle{ \mathrm{X} }[/math] are linearly independent, given by solving the normal equations
 [math]\displaystyle{ (\mathrm{X}^{\mathsf T} \mathrm{X} )\hat{\boldsymbol{\beta}} = \mathrm{X}^{\mathsf T} \mathbf y\ . }[/math]
The matrix [math]\displaystyle{ \mathrm{X}^{\mathsf T} \mathrm X }[/math] is known as the Gram matrix and the matrix [math]\displaystyle{ \mathrm{X}^{\mathsf T} \mathbf y }[/math] is known as the moment matrix of regressand by regressors.^{[1]} Finally, [math]\displaystyle{ \hat{\boldsymbol{\beta}} }[/math] is the coefficient vector of the leastsquares hyperplane, expressed as
 [math]\displaystyle{ \hat{\boldsymbol{\beta}}= \left( \mathrm{X}^{\mathsf T} \mathrm{X} \right)^{1} \mathrm{X}^{\mathsf T} \mathbf y. }[/math]
or
 [math]\displaystyle{ \hat{\boldsymbol{\beta}}= \boldsymbol{\beta} + (\mathbf{X}^\top \mathbf{X} )^{1}\mathbf {X}^\top \boldsymbol{\varepsilon}. }[/math]
Estimation
Suppose b is a "candidate" value for the parameter vector β. The quantity y_{i} − x_{i}^{T}b, called the residual for the ith observation, measures the vertical distance between the data point (x_{i}, y_{i}) and the hyperplane y = x^{T}b, and thus assesses the degree of fit between the actual data and the model. The sum of squared residuals (SSR) (also called the error sum of squares (ESS) or residual sum of squares (RSS))^{[2]} is a measure of the overall model fit:
 [math]\displaystyle{ S(b) = \sum_{i=1}^n (y_i  x_i ^\mathrm{T} b)^2 = (yXb)^\mathrm{T}(yXb), }[/math]
where T denotes the matrix transpose, and the rows of X, denoting the values of all the independent variables associated with a particular value of the dependent variable, are X_{i} = x_{i}^{T}. The value of b which minimizes this sum is called the OLS estimator for β. The function S(b) is quadratic in b with positivedefinite Hessian, and therefore this function possesses a unique global minimum at [math]\displaystyle{ b =\hat\beta }[/math], which can be given by the explicit formula:^{[3]}^{[proof]}
 [math]\displaystyle{ \hat\beta = \operatorname{argmin}_{b\in\mathbb{R}^p} S(b) = (X^\mathrm{T}X)^{1}X^\mathrm{T}y\ . }[/math]
The product N=X^{T} X is a Gram matrix and its inverse, Q=N^{–1}, is the cofactor matrix of β,^{[4]}^{[5]}^{[6]} closely related to its covariance matrix, C_{β}. The matrix (X^{T} X)^{–1} X^{T}=Q X^{T} is called the Moore–Penrose pseudoinverse matrix of X. This formulation highlights the point that estimation can be carried out if, and only if, there is no perfect multicollinearity between the explanatory variables (which would cause the gram matrix to have no inverse).
After we have estimated β, the fitted values (or predicted values) from the regression will be
 [math]\displaystyle{ \hat{y} = X\hat\beta = Py, }[/math]
where P = X(X^{T}X)^{−1}X^{T} is the projection matrix onto the space V spanned by the columns of X. This matrix P is also sometimes called the hat matrix because it "puts a hat" onto the variable y. Another matrix, closely related to P is the annihilator matrix M = I_{n} − P; this is a projection matrix onto the space orthogonal to V. Both matrices P and M are symmetric and idempotent (meaning that P^{2} = P and M^{2} = M), and relate to the data matrix X via identities PX = X and MX = 0.^{[7]} Matrix M creates the residuals from the regression:
 [math]\displaystyle{ \hat\varepsilon = y  \hat y = y  X\hat\beta = My = M(X\beta+\varepsilon) = (MX)\beta + M\varepsilon = M\varepsilon. }[/math]
Using these residuals we can estimate the value of σ^{ 2} using the reduced chisquared statistic:
 [math]\displaystyle{ s^2 = \frac{\hat\varepsilon ^\mathrm{T} \hat\varepsilon}{np} = \frac{(My)^\mathrm{T} My}{np} = \frac{y^\mathrm{T} M^\mathrm{T}My}{np}= \frac{y ^\mathrm{T} My}{np} = \frac{S(\hat\beta)}{np},\qquad \hat\sigma^2 = \frac{np}{n}\;s^2 }[/math]
The denominator, n−p, is the statistical degrees of freedom. The first quantity, s^{2}, is the OLS estimate for σ^{2}, whereas the second, [math]\displaystyle{ \scriptstyle\hat\sigma^2 }[/math], is the MLE estimate for σ^{2}. The two estimators are quite similar in large samples; the first estimator is always unbiased, while the second estimator is biased but has a smaller mean squared error. In practice s^{2} is used more often, since it is more convenient for the hypothesis testing. The square root of s^{2} is called the regression standard error,^{[8]} standard error of the regression,^{[9]}^{[10]} or standard error of the equation.^{[7]}
It is common to assess the goodnessoffit of the OLS regression by comparing how much the initial variation in the sample can be reduced by regressing onto X. The coefficient of determination R^{2} is defined as a ratio of "explained" variance to the "total" variance of the dependent variable y, in the cases where the regression sum of squares equals the sum of squares of residuals:^{[11]}
 [math]\displaystyle{ R^2 = \frac{\sum(\hat y_i\overline{y})^2}{\sum(y_i\overline{y})^2} = \frac{y ^\mathrm{T} P ^\mathrm{T} LPy}{y ^\mathrm{T} Ly} = 1  \frac{y ^\mathrm{T} My}{y ^\mathrm{T} Ly} = 1  \frac{\rm RSS}{\rm TSS} }[/math]
where TSS is the total sum of squares for the dependent variable, [math]\displaystyle{ L=I_n\frac{1}{n}J_n }[/math], and [math]\displaystyle{ J_n }[/math] is an n×n matrix of ones. ([math]\displaystyle{ L }[/math] is a centering matrix which is equivalent to regression on a constant; it simply subtracts the mean from a variable.) In order for R^{2} to be meaningful, the matrix X of data on regressors must contain a column vector of ones to represent the constant whose coefficient is the regression intercept. In that case, R^{2} will always be a number between 0 and 1, with values close to 1 indicating a good degree of fit.
The variance in the prediction of the independent variable as a function of the dependent variable is given in the article Polynomial least squares.
Simple linear regression model
If the data matrix X contains only two variables, a constant and a scalar regressor x_{i}, then this is called the "simple regression model".^{[12]} This case is often considered in the beginner statistics classes, as it provides much simpler formulas even suitable for manual calculation. The parameters are commonly denoted as (α, β):
 [math]\displaystyle{ y_i = \alpha + \beta x_i + \varepsilon_i. }[/math]
The least squares estimates in this case are given by simple formulas
 [math]\displaystyle{ \begin{align} \hat\beta &= \frac{{n} \sum{x_iy_i}  \sum{x_i}\sum{y_i} } {{n} \sum{x_i^2}  (\sum{x_i})^2 } \\ \hat\alpha &= \overline{y}  \hat\beta\,\overline{x}\ , \end{align} }[/math]
Alternative derivations
In the previous section the least squares estimator [math]\displaystyle{ \hat\beta }[/math] was obtained as a value that minimizes the sum of squared residuals of the model. However it is also possible to derive the same estimator from other approaches. In all cases the formula for OLS estimator remains the same: ^{^}β = (X^{T}X)^{−1}X^{T}y; the only difference is in how we interpret this result.
Projection
For mathematicians, OLS is an approximate solution to an overdetermined system of linear equations Xβ ≈ y, where β is the unknown. Assuming the system cannot be solved exactly (the number of equations n is much larger than the number of unknowns p), we are looking for a solution that could provide the smallest discrepancy between the right and left hand sides. In other words, we are looking for the solution that satisfies
 [math]\displaystyle{ \hat\beta = {\rm arg}\min_\beta\,\lVert y  X\beta \rVert, }[/math]
where · is the standard L^{2} norm in the ndimensional Euclidean space R^{n}. The predicted quantity Xβ is just a certain linear combination of the vectors of regressors. Thus, the residual vector y − Xβ will have the smallest length when y is projected orthogonally onto the linear subspace spanned by the columns of X. The OLS estimator [math]\displaystyle{ \hat\beta }[/math] in this case can be interpreted as the coefficients of vector decomposition of ^{^}y = Py along the basis of X.
In other words, the gradient equations at the minimum can be written as:
 [math]\displaystyle{ (\mathbf y  X \hat{\boldsymbol{\beta}})^{\rm T} X=0. }[/math]
A geometrical interpretation of these equations is that the vector of residuals, [math]\displaystyle{ \mathbf y  X \hat{\boldsymbol{\beta}} }[/math] is orthogonal to the column space of X, since the dot product [math]\displaystyle{ (\mathbf yX\hat{\boldsymbol{\beta}})\cdot X \mathbf v }[/math] is equal to zero for any conformal vector, v. This means that [math]\displaystyle{ \mathbf y  X \boldsymbol{\hat \beta} }[/math] is the shortest of all possible vectors [math]\displaystyle{ \mathbf{y} X \boldsymbol \beta }[/math], that is, the variance of the residuals is the minimum possible. This is illustrated at the right.
Introducing [math]\displaystyle{ \hat{\boldsymbol{\gamma}} }[/math] and a matrix K with the assumption that a matrix [math]\displaystyle{ [X \ K] }[/math] is nonsingular and K^{T} X = 0 (cf. Orthogonal projections), the residual vector should satisfy the following equation:
 [math]\displaystyle{ \hat{\mathbf{r}} \triangleq \mathbf{y}  X \hat{\boldsymbol{\beta}} = K \hat{{\boldsymbol{\gamma}}}. }[/math]
The equation and solution of linear least squares are thus described as follows:
 [math]\displaystyle{ \mathbf{y} = \begin{bmatrix}X & K\end{bmatrix} \begin{pmatrix} \hat{\boldsymbol{\beta}} \\ \hat{\boldsymbol{\gamma}} \end{pmatrix} , }[/math]
 [math]\displaystyle{ \begin{pmatrix} \hat{\boldsymbol{\beta}} \\ \hat{\boldsymbol{\gamma}} \end{pmatrix} = \begin{bmatrix}X & K\end{bmatrix}^{1} \mathbf{y} = \begin{bmatrix} (X^{\rm T} X)^{1} X^{\rm T} \\ (K^{\rm T} K)^{1} K^{\rm T} \end{bmatrix} \mathbf{y} . }[/math]
Another way of looking at it is to consider the regression line to be a weighted average of the lines passing through the combination of any two points in the dataset.^{[13]} Although this way of calculation is more computationally expensive, it provides a better intuition on OLS.
Maximum likelihood
The OLS estimator is identical to the maximum likelihood estimator (MLE) under the normality assumption for the error terms.^{[14]}^{[proof]} This normality assumption has historical importance, as it provided the basis for the early work in linear regression analysis by Yule and Pearson. From the properties of MLE, we can infer that the OLS estimator is asymptotically efficient (in the sense of attaining the Cramér–Rao bound for variance) if the normality assumption is satisfied.^{[15]}
Generalized method of moments
In iid case the OLS estimator can also be viewed as a GMM estimator arising from the moment conditions
 [math]\displaystyle{ \mathrm{E}\big[\, x_i(y_i  x_i ^T \beta) \,\big] = 0. }[/math]
These moment conditions state that the regressors should be uncorrelated with the errors. Since x_{i} is a pvector, the number of moment conditions is equal to the dimension of the parameter vector β, and thus the system is exactly identified. This is the socalled classical GMM case, when the estimator does not depend on the choice of the weighting matrix.
Note that the original strict exogeneity assumption E[ε_{i}  x_{i}] = 0 implies a far richer set of moment conditions than stated above. In particular, this assumption implies that for any vectorfunction ƒ, the moment condition E[ƒ(x_{i})·ε_{i}] = 0 will hold. However it can be shown using the Gauss–Markov theorem that the optimal choice of function ƒ is to take ƒ(x) = x, which results in the moment equation posted above.
Properties
Assumptions
There are several different frameworks in which the linear regression model can be cast in order to make the OLS technique applicable. Each of these settings produces the same formulas and same results. The only difference is the interpretation and the assumptions which have to be imposed in order for the method to give meaningful results. The choice of the applicable framework depends mostly on the nature of data in hand, and on the inference task which has to be performed.
One of the lines of difference in interpretation is whether to treat the regressors as random variables, or as predefined constants. In the first case (random design) the regressors x_{i} are random and sampled together with the y_{i}'s from some population, as in an observational study. This approach allows for more natural study of the asymptotic properties of the estimators. In the other interpretation (fixed design), the regressors X are treated as known constants set by a design, and y is sampled conditionally on the values of X as in an experiment. For practical purposes, this distinction is often unimportant, since estimation and inference is carried out while conditioning on X. All results stated in this article are within the random design framework.
Classical linear regression model
The classical model focuses on the "finite sample" estimation and inference, meaning that the number of observations n is fixed. This contrasts with the other approaches, which study the asymptotic behavior of OLS, and in which the number of observations is allowed to grow to infinity.
 Correct specification. The linear functional form must coincide with the form of the actual datagenerating process.
 Strict exogeneity. The errors in the regression should have conditional mean zero:^{[16]}
 [math]\displaystyle{ \operatorname{E}[\,\varepsilon\mid X\,] = 0. }[/math]
 The immediate consequence of the exogeneity assumption is that the errors have mean zero: E[ε] = 0, and that the regressors are uncorrelated with the errors: E[X^{T}ε] = 0.
 The exogeneity assumption is critical for the OLS theory. If it holds then the regressor variables are called exogenous. If it doesn't, then those regressors that are correlated with the error term are called endogenous,^{[17]} and the OLS estimator becomes biased. In such case the method of instrumental variables may be used to carry out inference.
 No linear dependence. The regressors in X must all be linearly independent. Mathematically, this means that the matrix X must have full column rank almost surely:^{[18]}
 [math]\displaystyle{ \Pr\!\big[\,\operatorname{rank}(X) = p\,\big] = 1. }[/math]
 Usually, it is also assumed that the regressors have finite moments up to at least the second moment. Then the matrix Q_{xx} = E[X^{T}X / n] is finite and positive semidefinite.
 When this assumption is violated the regressors are called linearly dependent or perfectly multicollinear. In such case the value of the regression coefficient β cannot be learned, although prediction of y values is still possible for new values of the regressors that lie in the same linearly dependent subspace.
 Spherical errors:^{[18]}
 [math]\displaystyle{ \operatorname{Var}[\,\varepsilon \mid X\,] = \sigma^2 I_n, }[/math]
 where I_{n} is the identity matrix in dimension n, and σ^{2} is a parameter which determines the variance of each observation. This σ^{2} is considered a nuisance parameter in the model, although usually it is also estimated. If this assumption is violated then the OLS estimates are still valid, but no longer efficient.
 It is customary to split this assumption into two parts:
 Homoscedasticity: E[ ε_{i}^{2}  X ] = σ^{2}, which means that the error term has the same variance σ^{2} in each observation. When this requirement is violated this is called heteroscedasticity, in such case a more efficient estimator would be weighted least squares. If the errors have infinite variance then the OLS estimates will also have infinite variance (although by the law of large numbers they will nonetheless tend toward the true values so long as the errors have zero mean). In this case, robust estimation techniques are recommended.
 No autocorrelation: the errors are uncorrelated between observations: E[ ε_{i}ε_{j}  X ] = 0 for i ≠ j. This assumption may be violated in the context of time series data, panel data, cluster samples, hierarchical data, repeated measures data, longitudinal data, and other data with dependencies. In such cases generalized least squares provides a better alternative than the OLS. Another expression for autocorrelation is serial correlation.
 Normality. It is sometimes additionally assumed that the errors have normal distribution conditional on the regressors:^{[19]}
 [math]\displaystyle{ \varepsilon \mid X\sim \mathcal{N}(0, \sigma^2I_n). }[/math]
 This assumption is not needed for the validity of the OLS method, although certain additional finitesample properties can be established in case when it does (especially in the area of hypotheses testing). Also when the errors are normal, the OLS estimator is equivalent to the maximum likelihood estimator (MLE), and therefore it is asymptotically efficient in the class of all regular estimators. Importantly, the normality assumption applies only to the error terms; contrary to a popular misconception, the response (dependent) variable is not required to be normally distributed.^{[20]}
Independent and identically distributed (iid)
In some applications, especially with crosssectional data, an additional assumption is imposed — that all observations are independent and identically distributed. This means that all observations are taken from a random sample which makes all the assumptions listed earlier simpler and easier to interpret. Also this framework allows one to state asymptotic results (as the sample size n → ∞), which are understood as a theoretical possibility of fetching new independent observations from the data generating process. The list of assumptions in this case is:
 iid observations: (x_{i}, y_{i}) is independent from, and has the same distribution as, (x_{j}, y_{j}) for all i ≠ j;
 no perfect multicollinearity: Q_{xx} = E[ x_{i} x_{i}^{T} ] is a positivedefinite matrix;
 exogeneity: E[ ε_{i}  x_{i} ] = 0;
 homoscedasticity: Var[ ε_{i}  x_{i} ] = σ^{2}.
Time series model
 The stochastic process {x_{i}, y_{i}} is stationary and ergodic; if {x_{i}, y_{i}} is nonstationary, OLS results are often spurious unless {x_{i}, y_{i}} is cointegrating.^{[21]}
 The regressors are predetermined: E[x_{i}ε_{i}] = 0 for all i = 1, ..., n;
 The p×p matrix Q_{xx} = E[ x_{i} x_{i}^{T} ] is of full rank, and hence positivedefinite;
 {x_{i}ε_{i}} is a martingale difference sequence, with a finite matrix of second moments Q_{xxε²} = E[ ε_{i}^{2}x_{i} x_{i}^{T} ].
Finite sample properties
First of all, under the strict exogeneity assumption the OLS estimators [math]\displaystyle{ \scriptstyle\hat\beta }[/math] and s^{2} are unbiased, meaning that their expected values coincide with the true values of the parameters:^{[22]}^{[proof]}
 [math]\displaystyle{ \operatorname{E}[\, \hat\beta \mid X \,] = \beta, \quad \operatorname{E}[\,s^2 \mid X\,] = \sigma^2. }[/math]
If the strict exogeneity does not hold (as is the case with many time series models, where exogeneity is assumed only with respect to the past shocks but not the future ones), then these estimators will be biased in finite samples.
The variancecovariance matrix (or simply covariance matrix) of [math]\displaystyle{ \scriptstyle\hat\beta }[/math] is equal to^{[23]}
 [math]\displaystyle{ \operatorname{Var}[\, \hat\beta \mid X \,] = \sigma^2(X ^T X)^{1} = \sigma^2 Q. }[/math]
In particular, the standard error of each coefficient [math]\displaystyle{ \scriptstyle\hat\beta_j }[/math] is equal to square root of the jth diagonal element of this matrix. The estimate of this standard error is obtained by replacing the unknown quantity σ^{2} with its estimate s^{2}. Thus,
 [math]\displaystyle{ \widehat{\operatorname{s.\!e.}}(\hat{\beta}_j) = \sqrt{s^2 (X ^T X)^{1}_{jj}} }[/math]
It can also be easily shown that the estimator [math]\displaystyle{ \scriptstyle\hat\beta }[/math] is uncorrelated with the residuals from the model:^{[23]}
 [math]\displaystyle{ \operatorname{Cov}[\, \hat\beta,\hat\varepsilon \mid X\,] = 0. }[/math]
The Gauss–Markov theorem states that under the spherical errors assumption (that is, the errors should be uncorrelated and homoscedastic) the estimator [math]\displaystyle{ \scriptstyle\hat\beta }[/math] is efficient in the class of linear unbiased estimators. This is called the best linear unbiased estimator (BLUE). Efficiency should be understood as if we were to find some other estimator [math]\displaystyle{ \scriptstyle\tilde\beta }[/math] which would be linear in y and unbiased, then ^{[23]}
 [math]\displaystyle{ \operatorname{Var}[\, \tilde\beta \mid X \,]  \operatorname{Var}[\, \hat\beta \mid X \,] \geq 0 }[/math]
in the sense that this is a nonnegativedefinite matrix. This theorem establishes optimality only in the class of linear unbiased estimators, which is quite restrictive. Depending on the distribution of the error terms ε, other, nonlinear estimators may provide better results than OLS.
Assuming normality
The properties listed so far are all valid regardless of the underlying distribution of the error terms. However, if you are willing to assume that the normality assumption holds (that is, that ε ~ N(0, σ^{2}I_{n})), then additional properties of the OLS estimators can be stated.
The estimator [math]\displaystyle{ \scriptstyle\hat\beta }[/math] is normally distributed, with mean and variance as given before:^{[24]}
 [math]\displaystyle{ \hat\beta\ \sim\ \mathcal{N}\big(\beta,\ \sigma^2(X ^\mathrm{T} X)^{1}\big) }[/math]
where Q is the cofactor matrix. This estimator reaches the Cramér–Rao bound for the model, and thus is optimal in the class of all unbiased estimators.^{[15]} Note that unlike the Gauss–Markov theorem, this result establishes optimality among both linear and nonlinear estimators, but only in the case of normally distributed error terms.
The estimator s^{2} will be proportional to the chisquared distribution:^{[25]}
 [math]\displaystyle{ s^2\ \sim\ \frac{\sigma^2}{np} \cdot \chi^2_{np} }[/math]
The variance of this estimator is equal to 2σ^{4}/(n − p), which does not attain the Cramér–Rao bound of 2σ^{4}/n. However it was shown that there are no unbiased estimators of σ^{2} with variance smaller than that of the estimator s^{2}.^{[26]} If we are willing to allow biased estimators, and consider the class of estimators that are proportional to the sum of squared residuals (SSR) of the model, then the best (in the sense of the mean squared error) estimator in this class will be ^{~}σ^{2} = SSR / (n − p + 2), which even beats the Cramér–Rao bound in case when there is only one regressor (p = 1).^{[27]}
Moreover, the estimators [math]\displaystyle{ \scriptstyle\hat\beta }[/math] and s^{2} are independent,^{[28]} the fact which comes in useful when constructing the t and Ftests for the regression.
Influential observations
As was mentioned before, the estimator [math]\displaystyle{ \hat\beta }[/math] is linear in y, meaning that it represents a linear combination of the dependent variables y_{i}. The weights in this linear combination are functions of the regressors X, and generally are unequal. The observations with high weights are called influential because they have a more pronounced effect on the value of the estimator.
To analyze which observations are influential we remove a specific jth observation and consider how much the estimated quantities are going to change (similarly to the jackknife method). It can be shown that the change in the OLS estimator for β will be equal to ^{[29]}
 [math]\displaystyle{ \hat\beta^{(j)}  \hat\beta =  \frac{1}{1h_j} (X ^\mathrm{T} X)^{1}x_j ^\mathrm{T} \hat\varepsilon_j\,, }[/math]
where h_{j} = x_{j}^{T} (X^{T}X)^{−1}x_{j} is the jth diagonal element of the hat matrix P, and x_{j} is the vector of regressors corresponding to the jth observation. Similarly, the change in the predicted value for jth observation resulting from omitting that observation from the dataset will be equal to ^{[29]}
 [math]\displaystyle{ \hat{y}_j^{(j)}  \hat{y}_j = x_j ^\mathrm{T} \hat\beta^{(j)}  x_j ^T \hat\beta =  \frac{h_j}{1h_j}\,\hat\varepsilon_j }[/math]
From the properties of the hat matrix, 0 ≤ h_{j} ≤ 1, and they sum up to p, so that on average h_{j} ≈ p/n. These quantities h_{j} are called the leverages, and observations with high h_{j} are called leverage points.^{[30]} Usually the observations with high leverage ought to be scrutinized more carefully, in case they are erroneous, or outliers, or in some other way atypical of the rest of the dataset.
Partitioned regression
Sometimes the variables and corresponding parameters in the regression can be logically split into two groups, so that the regression takes form
 [math]\displaystyle{ y = X_1\beta_1 + X_2\beta_2 + \varepsilon, }[/math]
where X_{1} and X_{2} have dimensions n×p_{1}, n×p_{2}, and β_{1}, β_{2} are p_{1}×1 and p_{2}×1 vectors, with p_{1} + p_{2} = p.
The Frisch–Waugh–Lovell theorem states that in this regression the residuals [math]\displaystyle{ \hat\varepsilon }[/math] and the OLS estimate [math]\displaystyle{ \scriptstyle\hat\beta_2 }[/math] will be numerically identical to the residuals and the OLS estimate for β_{2} in the following regression:^{[31]}
 [math]\displaystyle{ M_1y = M_1X_2\beta_2 + \eta\,, }[/math]
where M_{1} is the annihilator matrix for regressors X_{1}.
The theorem can be used to establish a number of theoretical results. For example, having a regression with a constant and another regressor is equivalent to subtracting the means from the dependent variable and the regressor and then running the regression for the demeaned variables but without the constant term.
Constrained estimation
Suppose it is known that the coefficients in the regression satisfy a system of linear equations
 [math]\displaystyle{ A\colon\quad Q ^T \beta = c, \, }[/math]
where Q is a p×q matrix of full rank, and c is a q×1 vector of known constants, where q < p. In this case least squares estimation is equivalent to minimizing the sum of squared residuals of the model subject to the constraint A. The constrained least squares (CLS) estimator can be given by an explicit formula:^{[32]}
 [math]\displaystyle{ \hat\beta^c = \hat\beta  (X ^T X)^{1}Q\Big(Q ^T (X ^T X)^{1}Q\Big)^{1}(Q ^T \hat\beta  c). }[/math]
This expression for the constrained estimator is valid as long as the matrix X^{T}X is invertible. It was assumed from the beginning of this article that this matrix is of full rank, and it was noted that when the rank condition fails, β will not be identifiable. However it may happen that adding the restriction A makes β identifiable, in which case one would like to find the formula for the estimator. The estimator is equal to ^{[33]}
 [math]\displaystyle{ \hat\beta^c = R(R ^T X ^T XR)^{1}R ^T X ^T y + \Big(I_p  R(R ^T X ^T XR)^{1}R ^T X ^T X\Big)Q(Q ^T Q)^{1}c, }[/math]
where R is a p×(p − q) matrix such that the matrix [Q R] is nonsingular, and R^{T}Q = 0. Such a matrix can always be found, although generally it is not unique. The second formula coincides with the first in case when X^{T}X is invertible.^{[33]}
Large sample properties
The least squares estimators are point estimates of the linear regression model parameters β. However, generally we also want to know how close those estimates might be to the true values of parameters. In other words, we want to construct the interval estimates.
Since we haven't made any assumption about the distribution of error term ε_{i}, it is impossible to infer the distribution of the estimators [math]\displaystyle{ \hat\beta }[/math] and [math]\displaystyle{ \hat\sigma^2 }[/math]. Nevertheless, we can apply the central limit theorem to derive their asymptotic properties as sample size n goes to infinity. While the sample size is necessarily finite, it is customary to assume that n is "large enough" so that the true distribution of the OLS estimator is close to its asymptotic limit.
We can show that under the model assumptions, the least squares estimator for β is consistent (that is [math]\displaystyle{ \hat\beta }[/math] converges in probability to β) and asymptotically normal:^{[proof]}
 [math]\displaystyle{ (\hat\beta  \beta)\ \xrightarrow{d}\ \mathcal{N}\big(0,\;\sigma^2Q_{xx}^{1}\big), }[/math]
where [math]\displaystyle{ Q_{xx} = X ^T X. }[/math]
Intervals
Using this asymptotic distribution, approximate twosided confidence intervals for the jth component of the vector [math]\displaystyle{ \hat{\beta} }[/math] can be constructed as
 [math]\displaystyle{ \beta_j \in \bigg[\ \hat\beta_j \pm q^{\mathcal{N}(0, 1)}_{1  \frac{\alpha}{2}}\!\sqrt{\hat{\sigma}^2 \left[Q_{xx}^{1}\right]_{jj}}\ \bigg] }[/math] at the 1 − α confidence level,
where q denotes the quantile function of standard normal distribution, and [·]_{jj} is the jth diagonal element of a matrix.
Similarly, the least squares estimator for σ^{2} is also consistent and asymptotically normal (provided that the fourth moment of ε_{i} exists) with limiting distribution
 [math]\displaystyle{ (\hat{\sigma}^2  \sigma^2)\ \xrightarrow{d}\ \mathcal{N} \left(0,\;\operatorname{E}\left[\varepsilon_i^4\right]  \sigma^4\right). }[/math]
These asymptotic distributions can be used for prediction, testing hypotheses, constructing other estimators, etc.. As an example consider the problem of prediction. Suppose [math]\displaystyle{ x_0 }[/math] is some point within the domain of distribution of the regressors, and one wants to know what the response variable would have been at that point. The mean response is the quantity [math]\displaystyle{ y_0 = x_0^\mathrm{T} \beta }[/math], whereas the predicted response is [math]\displaystyle{ \hat{y}_0 = x_0^\mathrm{T} \hat\beta }[/math]. Clearly the predicted response is a random variable, its distribution can be derived from that of [math]\displaystyle{ \hat{\beta} }[/math]:
 [math]\displaystyle{ \left(\hat{y}_0  y_0\right)\ \xrightarrow{d}\ \mathcal{N}\left(0,\;\sigma^2 x_0^\mathrm{T} Q_{xx}^{1} x_0\right), }[/math]
which allows construct confidence intervals for mean response [math]\displaystyle{ y_0 }[/math] to be constructed:
 [math]\displaystyle{ y_0 \in \left[\ x_0^\mathrm{T} \hat{\beta} \pm q^{\mathcal{N}(0, 1)}_{1  \frac{\alpha}{2}}\!\sqrt{\hat\sigma^2 x_0^\mathrm{T} Q_{xx}^{1} x_0}\ \right] }[/math] at the 1 − α confidence level.
Hypothesis testing
Two hypothesis tests are particularly widely used. First, one wants to know if the estimated regression equation is any better than simply predicting that all values of the response variable equal its sample mean (if not, it is said to have no explanatory power). The null hypothesis of no explanatory value of the estimated regression is tested using an Ftest. If the calculated Fvalue is found to be large enough to exceed its critical value for the prechosen level of significance, the null hypothesis is rejected and the alternative hypothesis, that the regression has explanatory power, is accepted. Otherwise, the null hypothesis of no explanatory power is accepted.
Second, for each explanatory variable of interest, one wants to know whether its estimated coefficient differs significantly from zero—that is, whether this particular explanatory variable in fact has explanatory power in predicting the response variable. Here the null hypothesis is that the true coefficient is zero. This hypothesis is tested by computing the coefficient's tstatistic, as the ratio of the coefficient estimate to its standard error. If the tstatistic is larger than a predetermined value, the null hypothesis is rejected and the variable is found to have explanatory power, with its coefficient significantly different from zero. Otherwise, the null hypothesis of a zero value of the true coefficient is accepted.
In addition, the Chow test is used to test whether two subsamples both have the same underlying true coefficient values. The sum of squared residuals of regressions on each of the subsets and on the combined data set are compared by computing an Fstatistic; if this exceeds a critical value, the null hypothesis of no difference between the two subsets is rejected; otherwise, it is accepted.
Example with real data
The following data set gives average heights and weights for American women aged 30–39 (source: The World Almanac and Book of Facts, 1975).
Height (m) 1.47 1.50 1.52 1.55 1.57 Weight (kg) 52.21 53.12 54.48 55.84 57.20 Height (m) 1.60 1.63 1.65 1.68 1.70 Weight (kg) 58.57 59.93 61.29 63.11 64.47 Height (m) 1.73 1.75 1.78 1.80 1.83 Weight (kg) 66.28 68.10 69.92 72.19 74.46
When only one dependent variable is being modeled, a scatterplot will suggest the form and strength of the relationship between the dependent variable and regressors. It might also reveal outliers, heteroscedasticity, and other aspects of the data that may complicate the interpretation of a fitted regression model. The scatterplot suggests that the relationship is strong and can be approximated as a quadratic function. OLS can handle nonlinear relationships by introducing the regressor HEIGHT^{2}. The regression model then becomes a multiple linear model:
 [math]\displaystyle{ w_i = \beta_1 + \beta_2 h_i + \beta_3 h_i^2 + \varepsilon_i. }[/math]
The output from most popular statistical packages will look similar to this:
Method Least squares Dependent variable WEIGHT Observations 15
Parameter Value Std error tstatistic pvalue
[math]\displaystyle{ \beta_1 }[/math] 128.8128 16.3083 7.8986 0.0000 [math]\displaystyle{ \beta_2 }[/math] –143.1620 19.8332 –7.2183 0.0000 [math]\displaystyle{ \beta_3 }[/math] 61.9603 6.0084 10.3122 0.0000
R^{2} 0.9989 S.E. of regression 0.2516 Adjusted R^{2} 0.9987 Model sumofsq. 692.61 Loglikelihood 1.0890 Residual sumofsq. 0.7595 Durbin–Watson stat. 2.1013 Total sumofsq. 693.37 Akaike criterion 0.2548 Fstatistic 5471.2 Schwarz criterion 0.3964 pvalue (Fstat) 0.0000
In this table:
 The Value column gives the least squares estimates of parameters β_{j}
 The Std error column shows standard errors of each coefficient estimate: [math]\displaystyle{ \hat\sigma_j = \left(\hat{\sigma}^2\left[Q_{xx}^{1}\right]_{jj}\right)^\frac{1}{2} }[/math]
 The tstatistic and pvalue columns are testing whether any of the coefficients might be equal to zero. The tstatistic is calculated simply as [math]\displaystyle{ t=\hat\beta_j/\hat\sigma_j }[/math]. If the errors ε follow a normal distribution, t follows a Studentt distribution. Under weaker conditions, t is asymptotically normal. Large values of t indicate that the null hypothesis can be rejected and that the corresponding coefficient is not zero. The second column, pvalue, expresses the results of the hypothesis test as a significance level. Conventionally, pvalues smaller than 0.05 are taken as evidence that the population coefficient is nonzero.
 Rsquared is the coefficient of determination indicating goodnessoffit of the regression. This statistic will be equal to one if fit is perfect, and to zero when regressors X have no explanatory power whatsoever. This is a biased estimate of the population Rsquared, and will never decrease if additional regressors are added, even if they are irrelevant.
 Adjusted Rsquared is a slightly modified version of [math]\displaystyle{ R^2 }[/math], designed to penalize for the excess number of regressors which do not add to the explanatory power of the regression. This statistic is always smaller than [math]\displaystyle{ R^2 }[/math], can decrease as new regressors are added, and even be negative for poorly fitting models:
 [math]\displaystyle{ \overline{R}^2 = 1  \frac{n  1}{n  p}(1  R^2) }[/math]
 Loglikelihood is calculated under the assumption that errors follow normal distribution. Even though the assumption is not very reasonable, this statistic may still find its use in conducting LR tests.
 Durbin–Watson statistic tests whether there is any evidence of serial correlation between the residuals. As a rule of thumb, the value smaller than 2 will be an evidence of positive correlation.
 Akaike information criterion and Schwarz criterion are both used for model selection. Generally when comparing two alternative models, smaller values of one of these criteria will indicate a better model.^{[34]}
 Standard error of regression is an estimate of σ, standard error of the error term.
 Total sum of squares, model sum of squared, and residual sum of squares tell us how much of the initial variation in the sample were explained by the regression.
 Fstatistic tries to test the hypothesis that all coefficients (except the intercept) are equal to zero. This statistic has F(p–1,n–p) distribution under the null hypothesis and normality assumption, and its pvalue indicates probability that the hypothesis is indeed true. Note that when errors are not normal this statistic becomes invalid, and other tests such as Wald test or LR test should be used.
Ordinary least squares analysis often includes the use of diagnostic plots designed to detect departures of the data from the assumed form of the model. These are some of the common diagnostic plots:
 Residuals against the explanatory variables in the model. A nonlinear relation between these variables suggests that the linearity of the conditional mean function may not hold. Different levels of variability in the residuals for different levels of the explanatory variables suggests possible heteroscedasticity.
 Residuals against explanatory variables not in the model. Any relation of the residuals to these variables would suggest considering these variables for inclusion in the model.
 Residuals against the fitted values, [math]\displaystyle{ \hat{y} }[/math].
 Residuals against the preceding residual. This plot may identify serial correlations in the residuals.
An important consideration when carrying out statistical inference using regression models is how the data were sampled. In this example, the data are averages rather than measurements on individual women. The fit of the model is very good, but this does not imply that the weight of an individual woman can be predicted with high accuracy based only on her height.
Sensitivity to rounding
This example also demonstrates that coefficients determined by these calculations are sensitive to how the data is prepared. The heights were originally given rounded to the nearest inch and have been converted and rounded to the nearest centimetre. Since the conversion factor is one inch to 2.54 cm this is not an exact conversion. The original inches can be recovered by Round(x/0.0254) and then reconverted to metric without rounding. If this is done the results become:
Const  Height  Height^{2}  

Converted to metric with rounding.  128.8128  −143.162  61.96033 
Converted to metric without rounding.  119.0205  −131.5076  58.5046 
Using either of these equations to predict the weight of a 5' 6" (1.6764 m) woman gives similar values: 62.94 kg with rounding vs. 62.98 kg without rounding. Thus a seemingly small variation in the data has a real effect on the coefficients but a small effect on the results of the equation.
While this may look innocuous in the middle of the data range it could become significant at the extremes or in the case where the fitted model is used to project outside the data range (extrapolation).
This highlights a common error: this example is an abuse of OLS which inherently requires that the errors in the independent variable (in this case height) are zero or at least negligible. The initial rounding to nearest inch plus any actual measurement errors constitute a finite and nonnegligible error. As a result, the fitted parameters are not the best estimates they are presumed to be. Though not totally spurious the error in the estimation will depend upon relative size of the x and y errors.
Another example with less real data
Problem statement
We can use the least square mechanism to figure out the equation of a two body orbit in polar base coordinates. The equation typically used is [math]\displaystyle{ r(\theta) = \frac{p}{1e\cos(\theta)} }[/math] where [math]\displaystyle{ r(\theta) }[/math] is the radius of how far the object is from one of the bodies. In the equation the parameters [math]\displaystyle{ p }[/math] and [math]\displaystyle{ e }[/math] are used to determine the path of the orbit. We have measured the following data.
[math]\displaystyle{ \theta }[/math] (in degrees)  43  45  52  93  108  116 

[math]\displaystyle{ r(\theta) }[/math]  4.7126  4.5542  4.0419  2.2187  1.8910  1.7599 
We need to find the leastsquares approximation of [math]\displaystyle{ e }[/math] and [math]\displaystyle{ p }[/math] for the given data.
Solution
First we need to represent e and p in a linear form. So we are going to rewrite the equation [math]\displaystyle{ r(\theta) }[/math] as [math]\displaystyle{ \frac{1}{r(\theta)} = \frac{1}{p}  \frac{e}{p}\cos(\theta) }[/math]. Now we can use this form to represent our observational data as:
[math]\displaystyle{ A^{T}A \binom{x}{y} = A^{T}b }[/math] where [math]\displaystyle{ x }[/math] is [math]\displaystyle{ \frac{1}{p} }[/math] and [math]\displaystyle{ y }[/math] is [math]\displaystyle{ \frac{e}{p} }[/math] and [math]\displaystyle{ A }[/math] is constructed by the first column being the coefficient of [math]\displaystyle{ \frac{1}{p} }[/math] and the second column being the coefficient of [math]\displaystyle{ \frac{e}{p} }[/math] and [math]\displaystyle{ b }[/math] is the values for the respective [math]\displaystyle{ \frac{1}{r(\theta)} }[/math] so [math]\displaystyle{ A = \begin{bmatrix} 1 & 0.731354\\1 & 0.707107\\1 & 0.615661\\1&\ 0.052336\\1& 0.309017\\1&0.438371 \end{bmatrix} }[/math] and [math]\displaystyle{ b = \begin{bmatrix} 0.21220\\ 0.21958\\ 0.24741\\ 0.45071\\ 0.52883\\ 0.56820\end{bmatrix}. }[/math]
On solving we get [math]\displaystyle{ \binom{x}{y} = \binom{0.43478}{0.30435} }[/math]
so [math]\displaystyle{ p=\frac{1}{x} = 2.3000 }[/math] and [math]\displaystyle{ e=p\cdot y = 0.70001 }[/math]
See also
 Bayesian least squares
 Fama–MacBeth regression
 Nonlinear least squares
 Numerical methods for linear least squares
 Nonlinear system identification
References
 ↑ Goldberger, Arthur S. (1964). "Classical Linear Regression". Econometric Theory. New York: John Wiley & Sons. pp. 158. ISBN 0471311014. https://books.google.com/books?id=KZq5AAAAIAAJ&pg=PA156.
 ↑ Hayashi, Fumio (2000). Econometrics. Princeton University Press. p. 15.
 ↑ (Hayashi 2000)
 ↑ Ghilani, Charles D.; Paul r. Wolf, Ph. D. (12 June 2006). Adjustment Computations: Spatial Data Analysis. ISBN 9780471697282. https://books.google.com/books?id=hZ4mAOXVowoC&pg=PA160.
 ↑ HofmannWellenhof, Bernhard; Lichtenegger, Herbert; Wasle, Elmar (20 November 2007). GNSS – Global Navigation Satellite Systems: GPS, GLONASS, Galileo, and more. ISBN 9783211730171. https://books.google.com/books?id=Np7y43HU_m8C&pg=PA263.
 ↑ Xu, Guochang (5 October 2007). GPS: Theory, Algorithms and Applications. ISBN 9783540727156. https://books.google.com/books?id=peYFZ69HqEsC&pg=PA134.
 ↑ ^{7.0} ^{7.1} (Hayashi 2000)
 ↑ Julian Faraway (2000), Practical Regression and Anova using R
 ↑ Kenney, J.; Keeping, E. S. (1963). Mathematics of Statistics. van Nostrand. p. 187.
 ↑ Zwillinger, D. (1995). Standard Mathematical Tables and Formulae. Chapman&Hall/CRC. p. 626. ISBN 0849324793.
 ↑ (Hayashi 2000)
 ↑ (Hayashi 2000)
 ↑ Akbarzadeh, Vahab. "Line Estimation". https://mlmadesimple.wordpress.com/2014/05/07/lineestimation/.
 ↑ (Hayashi 2000)
 ↑ ^{15.0} ^{15.1} (Hayashi 2000)
 ↑ (Hayashi 2000)
 ↑ (Hayashi 2000)
 ↑ ^{18.0} ^{18.1} (Hayashi 2000)
 ↑ (Hayashi 2000)
 ↑ Williams, M. N; Grajales, C. A. G; Kurkiewicz, D (2013). "Assumptions of multiple regression: Correcting two misconceptions". Practical Assessment, Research & Evaluation 18 (11). https://scholarworks.umass.edu/cgi/viewcontent.cgi?article=1308&context=pare.
 ↑ "Memento on EViews Output". https://scholar.harvard.edu/files/jbenchimol/files/mementoeviews.pdf.
 ↑ (Hayashi 2000)
 ↑ ^{23.0} ^{23.1} ^{23.2} (Hayashi 2000)
 ↑ Amemiya, Takeshi (1985). Advanced Econometrics. Harvard University Press. p. 13. https://archive.org/details/advancedeconomet00amem.
 ↑ (Amemiya 1985)
 ↑ Rao, C. R. (1973). Linear Statistical Inference and its Applications (Second ed.). New York: J. Wiley & Sons. p. 319. ISBN 0471708232.
 ↑ (Amemiya 1985)
 ↑ (Amemiya 1985)
 ↑ ^{29.0} ^{29.1} Davidson, Russell; MacKinnon, James G. (1993). Estimation and Inference in Econometrics. New York: Oxford University Press. p. 33. ISBN 0195060113.
 ↑ (Davidson Mackinnon)
 ↑ (Davidson Mackinnon)
 ↑ (Amemiya 1985)
 ↑ ^{33.0} ^{33.1} (Amemiya 1985)
 ↑ Burnham, Kenneth P.; David Anderson (2002). Model Selection and MultiModel Inference (2nd ed.). Springer. ISBN 0387953647. https://archive.org/details/modelselectionmu0000burn.
Further reading
 Dougherty, Christopher (2002). Introduction to Econometrics (2nd ed.). New York: Oxford University Press. pp. 48–113. ISBN 0198776438.
 Gujarati, Damodar N.; Porter, Dawn C. (2009). Basic Econometics (Fifth ed.). Boston: McGrawHill Irwin. pp. 55–96. ISBN 9780073375779.
 Heij, Christiaan; Boer, Paul; Franses, Philip H.; Kloek, Teun; van Dijk, Herman K. (2004). Econometric Methods with Applications in Business and Economics (1st ed.). Oxford: Oxford University Press. pp. 76–115. ISBN 9780199268016.
 Hill, R. Carter; Griffiths, William E.; Lim, Guay C. (2008). Principles of Econometrics (3rd ed.). Hoboken, NJ: John Wiley & Sons. pp. 8–47. ISBN 9780471723608.
 Wooldridge, Jeffrey (2008). "The Simple Regression Model". Introductory Econometrics: A Modern Approach (4th ed.). Mason, OH: Cengage Learning. pp. 22–67. ISBN 9780324581621. https://books.google.com/books?id=64vt5TDBNLwC&pg=PA22.
Original source: https://en.wikipedia.org/wiki/Ordinary least squares.
Read more 