Ordinary least squares - wikipedia Ordinary least squares This article is about the statistical properties of unweighted linear regression analysis. For more general regression analysis, see regression analysis. For linear regression on a single variable, see simple linear regression. For the computation of least squares curve fits, see numerical methods for linear least squares. Part of a series on Statistics Regression analysis Models Linear regression Simple regression Ordinary least squares Polynomial regression General linear model Generalized linear model Discrete choice Logistic regression Multinomial logit Mixed logit Probit Multinomial probit Ordered logit Ordered probit Poisson Multilevel model Fixed effects Random effects Mixed model Nonlinear regression Nonparametric Semiparametric Robust Quantile Isotonic Principal components Least angle Local Segmented Errors - in - variables Estimation Least squares Ordinary least squares Linear ( math ) Partial Total Generalized Weighted Non-linear Non-negative Iteratively reweighted Ridge regression Least absolute deviations Bayesian Bayesian multivariate Background Regression model validation Mean and predicted response Errors and residuals Goodness of fit Studentized residual Gauss -- Markov theorem Statistics portal In statistics, ordinary least squares ( OLS ) or linear least squares is a 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 minimizing the sum of the squares of the differences between the observed dependent variable ( values of the variable being predicted ) in the given dataset and those predicted by the linear function. 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 single regressor on the right - hand side. The OLS estimator is consistent when the regressors are exogenous, and optimal in the class of linear unbiased estimators when the errors are homoscedastic and serially uncorrelated. Under these conditions, the method of OLS provides minimum - variance mean - unbiased estimation when the errors have finite variances. Under the additional assumption that the errors are normally distributed, OLS is the maximum likelihood estimator. OLS is used in fields as diverse as economics ( econometrics ), political science, psychology and engineering ( control theory and signal processing ). Contents 1 Linear model 1.1 Assumptions 1.1. 1 Classical linear regression model 1.1. 2 Independent and identically distributed ( iid ) 1.1. 3 Time series model 2 Estimation 2.1 Simple regression model 3 Alternative derivations 3.1 Geometric approach 3.2 Maximum likelihood 3.3 Generalized method of moments 4 Finite sample properties 4.1 Assuming normality 4.2 Influential observations 4.3 Partitioned regression 4.4 Constrained estimation 5 Large sample properties 5.1 Intervals 6 Hypothesis testing 7 Example with real data 7.1 Sensitivity to rounding 8 See also 9 References 10 Further reading Linear model Main article : Linear regression model Okun 's law in macroeconomics states that in an economy the GDP growth should depend linearly on the changes in the unemployment rate. Here the ordinary least squares method is used to construct the regression line describing this law. Suppose the data consists of n observations ( y, x ). Each observation i includes a scalar response y and a vector of values of p predictors ( regressors ) x for j = 1,..., p. In a linear regression model, the response variable, y i ( displaystyle y_ ( i ) ), is a linear function of the regressors : y i = β 1 x i 1 + β 2 x i 2 + ⋯ + β p x i p + ε i, ( displaystyle y_ ( i ) = \beta _ ( 1 ) x_ ( i1 ) + \beta _ ( 2 ) x_ ( i2 ) + cdots + \beta _ ( p ) x_ ( ip ) + \varepsilon _ ( i ), ) or in vector form, y i = x i T β + ε i, ( displaystyle y_ ( i ) = x_ ( i ) ^ ( T ) \beta + \varepsilon _ ( i ), , ) where β is a p × 1 vector of unknown parameters ; ε 's are unobserved scalar random variables ( errors ) which account for the discrepancy between the actually observed responses y and the `` predicted outcomes '' x β ; and denotes matrix transpose, so that x β is the dot product between the vectors x and β. This model can also be written in matrix notation as y = X β + ε, ( displaystyle y = X \beta + \varepsilon, , ) where y and ε are n × 1 vectors, and X is an n × p matrix of regressors, which is also sometimes called the design matrix. As a rule, the constant term is always included in the set of regressors X, say, by taking x = 1 for all i = 1,..., n. The coefficient β corresponding to this regressor is called the intercept. There may be some relationship between the regressors. For instance, the third regressor may be the square of the second regressor. In this case ( assuming that the first regressor is constant ) we have a quadratic model in the second regressor. But this is still considered a linear model because it is linear in the βs. 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 are random and sampled together with the y '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 is correctly specified. Strict exogeneity. The errors in the regression should have conditional mean zero : E ⁡ ( ε ∣ X ) = 0. ( displaystyle operatorname ( E ) ( , \varepsilon mid X , ) = 0. ) 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 ε ) = 0. The exogeneity assumption is critical for the OLS theory. If it holds then the regressor variables are called exogenous. If it does n't, then those regressors that are correlated with the error term are called endogenous, and then the OLS estimates become invalid. 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 : Pr ( rank ⁡ ( X ) = p ) = 1. ( displaystyle Pr ! ( \big ( ) , operatorname ( rank ) ( X ) = p , ( \big ) ) = 1. ) Usually, it is also assumed that the regressors have finite moments up to at least the second moment. Then the matrix Q = E ( X X / n ) is finite and positive semi-definite. When this assumption is violated the regressors are called linearly dependent or perfectly multicollinear. In such case the value of the regression coefficient β can not 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 : Var ⁡ ( ε ∣ X ) = σ 2 I n, ( displaystyle operatorname ( Var ) ( , \varepsilon mid X , ) = sigma ^ ( 2 ) I_ ( n ), ) where I is the identity matrix in dimension n, and σ is a parameter which determines the variance of each observation. This σ 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 ( ε X ) = σ, which means that the error term has the same variance σ 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 ( ε ε 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 : ε ∣ X ∼ N ( 0, σ 2 I n ). ( displaystyle \varepsilon mid X sim ( mathcal ( N ) ) ( 0, sigma ^ ( 2 ) I_ ( n ) ). ) This assumption is not needed for the validity of the OLS method, although certain additional finite - sample 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. Independent and identically distributed ( iid ) In some applications, especially with cross-sectional 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, y ) is independent from, and has the same distribution as, ( x, y ) for all i ≠ j ; no perfect multicollinearity : Q = E ( x x ) is a positive - definite matrix ; exogeneity : E ( ε x ) = 0 ; homoscedasticity : Var ( ε x ) = σ. Time series model The stochastic process ( x, y ) is stationary and ergodic ; if ( x, y ) is nonstantionary, OLS results are often spurious unless ( x, y ) is co-integrating. The regressors are predetermined : E ( x ε ) = 0 for all i = 1,..., n ; The p × p matrix Q = E ( x x ) is of full rank, and hence positive - definite ; ( x ε ) is a martingale difference sequence, with a finite matrix of second moments Q = E ( ε x x ). Estimation Suppose b is a `` candidate '' value for the parameter vector β. The quantity y − x b, called the residual for the i - th observation, measures the vertical distance between the data point ( x y ) and the hyperplane y = x 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 ) ) is a measure of the overall model fit : S ( b ) = ∑ i = 1 n ( y i − x i T b ) 2 = ( y − X b ) T ( y − X b ), ( displaystyle S ( b ) = sum _ ( i = 1 ) ^ ( n ) ( y_ ( i ) - x_ ( i ) ^ ( mathrm ( T ) ) b ) ^ ( 2 ) = ( y - Xb ) ^ ( mathrm ( T ) ) ( y - Xb ), ) 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 = x. The value of b which minimizes this sum is called the OLS estimator for β. The function S ( b ) is quadratic in b with positive - definite Hessian, and therefore this function possesses a unique global minimum at b = β ^ ( displaystyle b = ( hat ( \beta ) ) ), which can be given by the explicit formula : β ^ = argmin b ∈ R p ⁡ S ( b ) = ( 1 n ∑ i = 1 n x i x i T ) − 1 ⋅ 1 n ∑ i = 1 n x i y i ( displaystyle ( hat ( \beta ) ) = operatorname ( argmin ) _ ( b in mathbb ( R ) ^ ( p ) ) S ( b ) = left ( ( \frac ( 1 ) ( n ) ) sum _ ( i = 1 ) ^ ( n ) x_ ( i ) x_ ( i ) ^ ( mathrm ( T ) ) \right ) ^ ( ! - 1 ) ! ! cdot , ( \frac ( 1 ) ( n ) ) sum _ ( i = 1 ) ^ ( n ) x_ ( i ) y_ ( i ) ) or equivalently in matrix form, β ^ = ( X T X ) − 1 X T y. ( displaystyle ( hat ( \beta ) ) = ( X ^ ( mathrm ( T ) ) X ) ^ ( - 1 ) X ^ ( mathrm ( T ) ) y . ) The matrix ( X T X ) − 1 X T ( displaystyle ( X ^ ( mathrm ( T ) ) X ) ^ ( - 1 ) X ^ ( mathrm ( 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 matrix ( X T X ) ( displaystyle ( X ^ ( mathrm ( T ) ) X ) ) to have no inverse ). After we have estimated β, the fitted values ( or predicted values ) from the regression will be y ^ = X β ^ = P y, ( displaystyle ( hat ( y ) ) = X ( hat ( \beta ) ) = Py, ) where P = X ( X X ) X 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 − P ; this is a projection matrix onto the space orthogonal to V. Both matrices P and M are symmetric and idempotent ( meaning that P = P ), and relate to the data matrix X via identities P X = X ( displaystyle PX = X ) and MX = 0. Matrix M creates the residuals from the regression : ε ^ = y − y ^ = y − X β ^ = M y = M ( X β + ε ) = ( M X ) β + M ε = M ε. ( displaystyle ( hat ( \varepsilon ) ) = y - ( hat ( y ) ) = y-X ( hat ( \beta ) ) = My = M ( X \beta + \varepsilon ) = ( MX ) \beta + M \varepsilon = M \varepsilon. ) Using these residuals we can estimate the value of σ, called the reduced chi - squared : s 2 = ε ^ T ε ^ n − p = ( M y ) T M y n − p = y T M T M y n − p = y T M y n − p = S ( β ^ ) n − p, σ ^ 2 = n − p n s 2 ( displaystyle s ^ ( 2 ) = ( \frac ( ( hat ( \varepsilon ) ) ^ ( mathrm ( T ) ) ( hat ( \varepsilon ) ) ) ( n-p ) ) = ( \frac ( ( My ) ^ ( mathrm ( T ) ) My ) ( n-p ) ) = ( \frac ( y ^ ( mathrm ( T ) ) M ^ ( mathrm ( T ) ) My ) ( n-p ) ) = ( \frac ( y ^ ( mathrm ( T ) ) My ) ( n-p ) ) = ( \frac ( S ( ( hat ( \beta ) ) ) ) ( n-p ) ), qquad ( hat ( sigma ) ) ^ ( 2 ) = ( \frac ( n-p ) ( n ) ) ; s ^ ( 2 ) ) The numerator, n − p, is the statistical degrees of freedom. The first quantity, s, is the OLS estimate for σ, whereas the second, σ ^ 2 ( displaystyle scriptstyle ( hat ( sigma ) ) ^ ( 2 ) ), is the MLE estimate for σ. The two estimators are quite similar in large samples ; the first one is always unbiased, while the second is biased but minimizes the mean squared error of the estimator. In practice s is used more often, since it is more convenient for the hypothesis testing. The square root of s is called the regression standard error, standard error of the regression, or standard error of the equation. It is common to assess the goodness - of - fit 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 is defined as a ratio of `` explained '' variance to the `` total '' variance of the dependent variable y : R 2 = ∑ ( y ^ i − y  ̄ ) 2 ∑ ( y i − y  ̄ ) 2 = y T P T L P y y T L y = 1 − y T M y y T L y = 1 − R S S T S S ( 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 ) ) ) ) where TSS is the total sum of squares for the dependent variable, L = I − 11 / n, and 1 is an n × 1 vector of ones. ( L is a `` centering matrix '' which is equivalent to regression on a constant ; it simply subtracts the mean from a variable. ) In order for R 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 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 regression model Main article : Simple linear regression If the data matrix X contains only two variables, a constant and a scalar regressor x, then this is called the `` simple regression model ''. 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 ( α, β ) : y i = α + β x i + ε i. ( displaystyle y_ ( i ) = alpha + \beta x_ ( i ) + \varepsilon _ ( i ). ) The least squares estimates in this case are given by simple formulas β ^ = ∑ x i y i − 1 n ∑ x i ∑ y i ∑ x i 2 − 1 n ( ∑ x i ) 2 = Cov ⁡ ( x, y ) Var ⁡ ( x ), α ^ = y  ̄ − β ^ x  ̄, ( displaystyle ( hat ( \beta ) ) = ( \frac ( sum ( x_ ( i ) y_ ( i ) ) - ( \frac ( 1 ) ( n ) ) sum ( x_ ( i ) ) sum ( y_ ( i ) ) ) ( sum ( x_ ( i ) ^ ( 2 ) ) - ( \frac ( 1 ) ( n ) ) ( sum ( x_ ( i ) ) ) ^ ( 2 ) ) ) = ( \frac ( operatorname ( Cov ) ( x, y ) ) ( operatorname ( Var ) ( x ) ) ), quad ( hat ( alpha ) ) = ( overline ( y ) ) - ( hat ( \beta ) ) , ( overline ( x ) ) , ) where Var (. ) and Cov (. ) are sample parameters. Alternative derivations In the previous section the least squares estimator β ^ ( displaystyle ( hat ( \beta ) ) ) 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 X ) X y ; the only difference is in how we interpret this result. Geometric approach OLS estimation can be viewed as a projection onto the linear space spanned by the regressors. ( Here each of X 1 ( displaystyle X_ ( 1 ) ) and X 2 ( displaystyle X_ ( 2 ) ) refers to a column of the data matrix. ) Main article : Linear least squares ( mathematics ) For mathematicians, OLS is an approximate solution to an overdetermined system of linear equations Xβ ≈ y, where β is the unknown. Assuming the system can not 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 β ^ = a r g min β ‖ y − X β ‖, ( displaystyle ( hat ( \beta ) ) = ( \rm ( arg ) ) min _ ( \beta ) , lVert y-X \beta \rVert, ) where is the standard L norm in the n - dimensional Euclidean space R. 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 β ^ ( displaystyle scriptstyle ( hat ( \beta ) ) ) in this case can be interpreted as the coefficients of vector decomposition of y = Py along the basis of X. 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. 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. 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. Generalized method of moments In iid case the OLS estimator can also be viewed as a GMM estimator arising from the moment conditions E ( x i ( y i − x i T β ) ) = 0. ( displaystyle mathrm ( E ) ( \big ( ) , x_ ( i ) ( y_ ( i ) - x_ ( i ) ^ ( T ) \beta ) , ( \big ) ) = 0. ) These moment conditions state that the regressors should be uncorrelated with the errors. Since x is a p - vector, the number of moment conditions is equal to the dimension of the parameter vector β, and thus the system is exactly identified. This is the so - called classical GMM case, when the estimator does not depend on the choice of the weighting matrix. Note that the original strict exogeneity assumption E ( ε x ) = 0 implies a far richer set of moment conditions than stated above. In particular, this assumption implies that for any vector - function ƒ, the moment condition E ( ƒ ( x ) ε ) = 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. Finite sample properties First of all, under the strict exogeneity assumption the OLS estimators β ^ ( displaystyle scriptstyle ( hat ( \beta ) ) ) and s are unbiased, meaning that their expected values coincide with the true values of the parameters : E ⁡ ( β ^ ∣ X ) = β, E ⁡ ( s 2 ∣ X ) = σ 2. ( displaystyle operatorname ( E ) ( , ( hat ( \beta ) ) mid X , ) = \beta, quad operatorname ( E ) ( , s ^ ( 2 ) mid X , ) = sigma ^ ( 2 ). ) 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 variance - covariance matrix of β ^ ( displaystyle scriptstyle ( hat ( \beta ) ) ) is equal to Var ⁡ ( β ^ ∣ X ) = σ 2 ( X T X ) − 1. ( displaystyle operatorname ( Var ) ( , ( hat ( \beta ) ) mid X , ) = sigma ^ ( 2 ) ( X ^ ( T ) X ) ^ ( - 1 ). ) In particular, the standard error of each coefficient β ^ j ( displaystyle scriptstyle ( hat ( \beta ) ) _ ( j ) ) is equal to square root of the j - th diagonal element of this matrix. The estimate of this standard error is obtained by replacing the unknown quantity σ with its estimate s. Thus, s. e. ^ ( β ^ j ) = s 2 ( X T X ) j j − 1 ( displaystyle ( widehat ( operatorname ( s. ! e. ) ) ) ( ( hat ( \beta ) ) _ ( j ) ) = ( sqrt ( s ^ ( 2 ) ( X ^ ( T ) X ) _ ( jj ) ^ ( - 1 ) ) ) ) It can also be easily shown that the estimator β ^ ( displaystyle scriptstyle ( hat ( \beta ) ) ) is uncorrelated with the residuals from the model : Cov ⁡ ( β ^, ε ^ ∣ X ) = 0. ( displaystyle operatorname ( Cov ) ( , ( hat ( \beta ) ), ( hat ( \varepsilon ) ) mid X , ) = 0. ) The Gauss -- Markov theorem states that under the spherical errors assumption ( that is, the errors should be uncorrelated and homoscedastic ) the estimator β ^ ( displaystyle scriptstyle ( hat ( \beta ) ) ) 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 β ~ ( displaystyle scriptstyle ( \tilde ( \beta ) ) ) which would be linear in y and unbiased, then Var ⁡ ( β ~ ∣ X ) − Var ⁡ ( β ^ ∣ X ) ≥ 0 ( displaystyle operatorname ( Var ) ( , ( \tilde ( \beta ) ) mid X , ) - operatorname ( Var ) ( , ( hat ( \beta ) ) mid X , ) geq 0 ) in the sense that this is a nonnegative - definite 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, non-linear 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, σ I ) ), then additional properties of the OLS estimators can be stated. The estimator β ^ ( displaystyle scriptstyle ( hat ( \beta ) ) ) is normally distributed, with mean and variance as given before : β ^ ∼ N ( β, σ 2 ( X T X ) − 1 ) ( displaystyle ( hat ( \beta ) ) sim ( mathcal ( N ) ) ( \big ( ) \beta, sigma ^ ( 2 ) ( X ^ ( mathrm ( T ) ) X ) ^ ( - 1 ) ( \big ) ) ) This estimator reaches the Cramér -- Rao bound for the model, and thus is optimal in the class of all unbiased estimators. Note that unlike the Gauss -- Markov theorem, this result establishes optimality among both linear and non-linear estimators, but only in the case of normally distributed error terms. The estimator s will be proportional to the chi - squared distribution : s 2 ∼ σ 2 n − p ⋅ χ n − p 2 ( displaystyle s ^ ( 2 ) sim ( \frac ( sigma ^ ( 2 ) ) ( n-p ) ) cdot chi _ ( n-p ) ^ ( 2 ) ) The variance of this estimator is equal to 2σ / ( n − p ), which does not attain the Cramér -- Rao bound of 2σ / n. However it was shown that there are no unbiased estimators of σ with variance smaller than that of the estimator s. 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 σ = SSR / ( n − p + 2 ), which even beats the Cramér -- Rao bound in case when there is only one regressor ( p = 1 ). Moreover, the estimators β ^ ( displaystyle scriptstyle ( hat ( \beta ) ) ) and s are independent, the fact which comes in useful when constructing the t - and F - tests for the regression. Influential observations Main article : Influential observation See also : Leverage ( statistics ) As was mentioned before, the estimator β ^ ( displaystyle ( hat ( \beta ) ) ) is linear in y, meaning that it represents a linear combination of the dependent variables y. 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 j - th 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 β ^ ( j ) − β ^ = − 1 1 − h j ( X T X ) − 1 x j T ε ^ j, ( displaystyle ( hat ( \beta ) ) ^ ( ( j ) ) - ( hat ( \beta ) ) = - ( \frac ( 1 ) ( 1 - h_ ( j ) ) ) ( X ^ ( mathrm ( T ) ) X ) ^ ( - 1 ) x_ ( j ) ^ ( mathrm ( T ) ) ( hat ( \varepsilon ) ) _ ( j ) ,, ) where h = x ( X X ) x is the j - th diagonal element of the hat matrix P, and x is the vector of regressors corresponding to the j - th observation. Similarly, the change in the predicted value for j - th observation resulting from omitting that observation from the dataset will be equal to y ^ j ( j ) − y ^ j = x j T β ^ ( j ) − x j T β ^ = − h j 1 − h j ε ^ j ( displaystyle ( hat ( y ) ) _ ( j ) ^ ( ( j ) ) - ( hat ( y ) ) _ ( j ) = x_ ( j ) ^ ( mathrm ( T ) ) ( hat ( \beta ) ) ^ ( ( j ) ) - x_ ( j ) ^ ( T ) ( hat ( \beta ) ) = - ( \frac ( h_ ( j ) ) ( 1 - h_ ( j ) ) ) , ( hat ( \varepsilon ) ) _ ( j ) ) From the properties of the hat matrix, 0 ≤ h ≤ 1, and they sum up to p, so that on average h ≈ p / n. These quantities h are called the leverages, and observations with high h are called leverage points. 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 y = X 1 β 1 + X 2 β 2 + ε, ( displaystyle y = X_ ( 1 ) \beta _ ( 1 ) + X_ ( 2 ) \beta _ ( 2 ) + \varepsilon, ) where X and X have dimensions n × p, n × p, and β, β are p × 1 and p × 1 vectors, with p + p = p. The Frisch -- Waugh -- Lovell theorem states that in this regression the residuals ε ^ ( displaystyle ( hat ( \varepsilon ) ) ) and the OLS estimate β ^ 2 ( displaystyle scriptstyle ( hat ( \beta ) ) _ ( 2 ) ) will be numerically identical to the residuals and the OLS estimate for β in the following regression : M 1 y = M 1 X 2 β 2 + η, ( displaystyle M_ ( 1 ) y = M_ ( 1 ) X_ ( 2 ) \beta _ ( 2 ) + eta ,, ) where M is the annihilator matrix for regressors X. 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 de-meaned variables but without the constant term. Constrained estimation Main article : Ridge regression Suppose it is known that the coefficients in the regression satisfy a system of linear equations A : Q T β = c, ( displaystyle A colon quad Q ^ ( T ) \beta = c, , ) 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 : β ^ c = β ^ − ( X T X ) − 1 Q ( Q T ( X T X ) − 1 Q ) − 1 ( Q T β ^ − c ). ( 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 ). ) This expression for the constrained estimator is valid as long as the matrix X 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 β ^ c = R ( R T X T X R ) − 1 R T X T y + ( I p − R ( R T X T X R ) − 1 R T X T X ) Q ( Q T Q ) − 1 c, ( 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, ) where R is a p × ( p − q ) matrix such that the matrix ( QR ) is non-singular, and R 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 X is invertible. 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 have n't made any assumption about the distribution of error term ε, it is impossible to infer the distribution of the estimators β ^ ( displaystyle ( hat ( \beta ) ) ) and σ ^ 2 ( displaystyle ( hat ( sigma ) ) ^ ( 2 ) ). 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 β ^ ( displaystyle ( hat ( \beta ) ) ) converges in probability to β ) and asymptotically normal : ( β ^ − β ) → d N ( 0, σ 2 Q x x − 1 ), ( displaystyle ( ( hat ( \beta ) ) - \beta ) ( \xrightarrow ( d ) ) ( mathcal ( N ) ) ( \big ( ) 0, ; sigma ^ ( 2 ) Q_ ( xx ) ^ ( - 1 ) ( \big ) ), ) where Q x x = X T X. ( displaystyle Q_ ( xx ) = X ^ ( T ) X. ) Intervals Main articles : Confidence interval and Prediction interval Using this asymptotic distribution, approximate two - sided confidence intervals for the j - th component of the vector β ^ ( displaystyle ( hat ( \beta ) ) ) can be constructed as β j ∈ ( β ^ j ± q 1 − α 2 N ( 0, 1 ) σ ^ 2 ( Q x x − 1 ) j j ) ( displaystyle \beta _ ( j ) in ( \bigg ( ) ( hat ( \beta ) ) _ ( j ) pm q_ ( 1 - ( \frac ( alpha ) ( 2 ) ) ) ^ ( ( mathcal ( N ) ) ( 0, 1 ) ) ! ( sqrt ( ( hat ( sigma ) ) ^ ( 2 ) left ( Q_ ( xx ) ^ ( - 1 ) \right ) _ ( jj ) ) ) ( \bigg ) ) ) at the 1 − α confidence level, where q denotes the quantile function of standard normal distribution, and ( ) is the j - th diagonal element of a matrix. Similarly, the least squares estimator for σ is also consistent and asymptotically normal ( provided that the fourth moment of ε exists ) with limiting distribution ( σ ^ 2 − σ 2 ) → d N ( 0, E ⁡ ( ε i 4 ) − σ 4 ). ( displaystyle ( ( hat ( sigma ) ) ^ ( 2 ) - sigma ^ ( 2 ) ) ( \xrightarrow ( d ) ) ( mathcal ( N ) ) left ( 0, ; operatorname ( E ) left ( \varepsilon _ ( i ) ^ ( 4 ) \right ) - sigma ^ ( 4 ) \right ). ) These asymptotic distributions can be used for prediction, testing hypotheses, constructing other estimators, etc... As an example consider the problem of prediction. Suppose x 0 ( displaystyle x_ ( 0 ) ) 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 y 0 = x 0 T β ( displaystyle y_ ( 0 ) = x_ ( 0 ) ^ ( mathrm ( T ) ) \beta ), whereas the predicted response is y ^ 0 = x 0 T β ^ ( displaystyle ( hat ( y ) ) _ ( 0 ) = x_ ( 0 ) ^ ( mathrm ( T ) ) ( hat ( \beta ) ) ). Clearly the predicted response is a random variable, its distribution can be derived from that of β ^ ( displaystyle ( hat ( \beta ) ) ) : ( y ^ 0 − y 0 ) → d N ( 0, σ 2 x 0 T Q x x − 1 x 0 ), ( 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 ), ) which allows construct confidence intervals for mean response y 0 ( displaystyle y_ ( 0 ) ) to be constructed : y 0 ∈ ( x 0 T β ^ ± q 1 − α 2 N ( 0, 1 ) σ ^ 2 x 0 T Q x x − 1 x 0 ) ( displaystyle y_ ( 0 ) in left ( \x_ ( 0 ) ^ ( mathrm ( T ) ) ( hat ( \beta ) ) pm q_ ( 1 - ( \frac ( alpha ) ( 2 ) ) ) ^ ( ( mathcal ( N ) ) ( 0, 1 ) ) ! ( sqrt ( ( hat ( sigma ) ) ^ ( 2 ) x_ ( 0 ) ^ ( mathrm ( T ) ) Q_ ( xx ) ^ ( - 1 ) x_ ( 0 ) ) ) \right ) ) at the 1 − α confidence level. Hypothesis testing Main article : Hypothesis testing This section needs expansion. You can help by adding to it. ( February 2017 ) 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 F - test. If the calculated F - value is found to be large enough to exceed its critical value for the pre-chosen 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 t - statistic, as the ratio of the coefficient estimate to its standard error. If the t - statistic 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 F - statistic ; 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 Scatterplot of the data, the relationship is slightly curved but close to linear 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 1.60 1.63 1.65 1.68 1.70 1.73 1.75 1.78 1.80 1.83 Weight ( kg ) 52.21 53.12 54.48 55.84 57.20 58.57 59.93 61.29 63.11 64.47 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 non-linear relationships by introducing the regressor HEIGHT. The regression model then becomes a multiple linear model : w i = β 1 + β 2 h i + β 3 h i 2 + ε i. ( displaystyle w_ ( i ) = \beta _ ( 1 ) + \beta _ ( 2 ) h_ ( i ) + \beta _ ( 3 ) h_ ( i ) ^ ( 2 ) + \varepsilon _ ( i ). ) Fitted regression The output from most popular statistical packages will look similar to this : Method Least squares Dependent variable WEIGHT Observations 15 Parameter Value Std error t - statistic p - value β 1 ( displaystyle \beta _ ( 1 ) ) 128.8128 16.3083 7.8986 0.0000 β 2 ( displaystyle \beta _ ( 2 ) ) -- 143.1620 19.8332 -- 7.2183 0.0000 β 3 ( displaystyle \beta _ ( 3 ) ) 61.9603 6.0084 10.3122 0.0000 0.9989 S.E. of regression 0.2516 Adjusted R 0.9987 Model sum - of - sq. 692.61 Log - likelihood 1.0890 Residual sum - of - sq. 0.7595 Durbin -- Watson stat. 2.1013 Total sum - of - sq. 693.37 Akaike criterion 0.2548 F - statistic 5471.2 Schwarz criterion 0.3964 p - value ( F - stat ) 0.0000 In this table : The Value column gives the least squares estimates of parameters β The Std error column shows standard errors of each coefficient estimate : σ ^ j = ( σ ^ 2 ( Q x x − 1 ) j j ) 1 2 ( displaystyle ( hat ( sigma ) ) _ ( j ) = left ( ( hat ( sigma ) ) ^ ( 2 ) left ( Q_ ( xx ) ^ ( - 1 ) \right ) _ ( jj ) \right ) ^ ( \frac ( 1 ) ( 2 ) ) ) The t - statistic and p - value columns are testing whether any of the coefficients might be equal to zero. The t - statistic is calculated simply as t = β ^ j / σ ^ j ( displaystyle t = ( hat ( \beta ) ) _ ( j ) / ( hat ( sigma ) ) _ ( j ) ). If the errors ε follow a normal distribution, t follows a Student - t 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, p - value, expresses the results of the hypothesis test as a significance level. Conventionally, p - values smaller than 0.05 are taken as evidence that the population coefficient is nonzero. R - squared is the coefficient of determination indicating goodness - of - fit 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 R - squared, and will never decrease if additional regressors are added, even if they are irrelevant. Adjusted R - squared is a slightly modified version of R 2 ( displaystyle R ^ ( 2 ) ), 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 R 2 ( displaystyle R ^ ( 2 ) ), can decrease as new regressors are added, and even be negative for poorly fitting models : R  ̄ 2 = 1 − n − 1 n − p ( 1 − R 2 ) ( displaystyle ( overline ( R ) ) ^ ( 2 ) = 1 - ( \frac ( n - 1 ) ( n-p ) ) ( 1 - R ^ ( 2 ) ) ) Log - likelihood 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. 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. F - statistic 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 p - value 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. Residuals plot 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 non-linear 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, y ^ ( displaystyle ( hat ( y ) ) ). 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 Main article : Errors - in - variables models See also : Quantization error model 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 re-converted to metric without rounding. If this is done the results become : Const Height Height Converted to metric with rounding. 128.8128 − 143.162 61.96033 Converted to metric without rounding. 119.0205 − 131.5076 58.5046 Residuals to a quadratic fit for correctly and incorrectly converted data. 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 non-negligible 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. See also Bayesian least squares Fama -- MacBeth regression Non-linear least squares Numerical methods for linear least squares Nonlinear system identification References Jump up ^ Hayashi ( 2000, page 7 ) Jump up ^ Hayashi ( 2000, page 187 ) ^ Jump up to : Hayashi ( 2000, page 10 ) Jump up ^ Hayashi ( 2000, page 34 ) Jump up ^ Williams, M. N ; Grajales, C.A. G ; Kurkiewicz, D ( 2013 ). `` Assumptions of multiple regression : Correcting two misconceptions ''. Practical Assessment, Research & Evaluation. 18 ( 11 ). Jump up ^ Hayashi ( 2000, page 15 ) Jump up ^ Hayashi ( 2000, page 18 ) ^ Jump up to : Hayashi ( 2000, page 19 ) Jump up ^ Julian Faraway ( 2000 ), Practical Regression and Anova using R, ( 1 ) Jump up ^ Kenney, J. ; Keeping, E.S. ( 1963 ). Mathematics of Statistics. van Nostrand. p. 187. Jump up ^ Zwillinger, D. ( 1995 ). Standard Mathematical Tables and Formulae. Chapman&Hall / CRC. p. 626. ISBN 0 - 8493 - 2479 - 3. Jump up ^ Hayashi ( 2000, page 20 ) Jump up ^ Hayashi ( 2000, page 5 ) Jump up ^ Akbarzadeh, Vahab. `` Line Estimation ''. Jump up ^ Hayashi ( 2000, page 49 ) ^ Jump up to : Hayashi ( 2000, page 52 ) Jump up ^ Hayashi ( 2000, pages 27, 30 ) ^ Jump up to : Hayashi ( 2000, page 27 ) Jump up ^ Amemiya ( 1985, page 13 ) Jump up ^ Amemiya ( 1985, page 14 ) Jump up ^ Rao ( 1973, page 319 ) Jump up ^ Amemiya ( 1985, page 20 ) Jump up ^ Amemiya ( 1985, page 27 ) ^ Jump up to : Davidson & Mackinnon ( 1993, page 33 ) Jump up ^ Davidson & Mackinnon ( 1993, page 36 ) Jump up ^ Davidson & Mackinnon ( 1993, page 20 ) Jump up ^ Amemiya ( 1985, page 21 ) ^ Jump up to : Amemiya ( 1985, page 22 ) Jump up ^ Burnham, Kenneth P. ; David Anderson ( 2002 ). Model Selection and Multi-Model Inference ( 2nd ed. ). Springer. ISBN 0 - 387 - 95364 - 7. Further reading Amemiya, Takeshi ( 1985 ). Advanced econometrics. Harvard University Press. ISBN 0 - 674 - 00560 - 0. Davidson, Russell ; Mackinnon, James G. ( 1993 ). Estimation and inference in econometrics. Oxford University Press. ISBN 978 - 0 - 19 - 506011 - 9. Greene, William H. ( 2002 ). Econometric analysis ( PDF ) ( 5th ed. ). New Jersey : Prentice Hall. ISBN 0 - 13 - 066189 - 9. Retrieved 2016 - 01 - 13. Hayashi, Fumio ( 2000 ). Econometrics. Princeton University Press. ISBN 0 - 691 - 01018 - 8. Rao, C.R. ( 1973 ). Linear statistical inference and its applications ( 2nd ed. ). New York : John Wiley & Sons. Wooldridge, Jeffrey M. ( 2013 ). Introductory Econometrics : A Modern Approach ( 5th international ed. ). Australia : South Western, Cengage Learning. ISBN 9781111534394. hide Least squares and regression analysis Computational statistics Least squares Linear least squares Non-linear least squares Iteratively reweighted least squares Correlation and dependence Pearson product - moment correlation Rank correlation ( Spearman 's rho Kendall 's tau ) Partial correlation Confounding variable Regression analysis Ordinary least squares Partial least squares Total least squares Ridge regression Regression as a statistical model Linear regression Simple linear regression Ordinary least squares Generalized least squares Weighted least squares General linear model Predictor structure Polynomial regression Growth curve ( statistics ) Segmented regression Local regression Non-standard Nonlinear regression Nonparametric Semiparametric Robust Quantile Isotonic Non-normal errors Generalized linear model Binomial Poisson Logistic Decomposition of variance Analysis of variance Analysis of covariance Multivariate AOV Model exploration Mallows 's C Stepwise regression Model selection Regression model validation Background Mean and predicted response Gauss -- Markov theorem Errors and residuals Goodness of fit Studentized residual Minimum mean - square error Design of experiments Response surface methodology Optimal design Bayesian design Numerical approximation Numerical analysis Approximation theory Numerical integration Gaussian quadrature Orthogonal polynomials Chebyshev polynomials Chebyshev nodes Applications Curve fitting Calibration curve Numerical smoothing and differentiation System identification Moving least squares Regression analysis category Statistics category Statistics portal Statistics outline Statistics topics Retrieved from `` https://en.wikipedia.org/w/index.php?title=Ordinary_least_squares&oldid=846246061 '' Categories : Parametric statistics Least squares Hidden categories : All articles with unsourced statements Articles with unsourced statements from February 2010 Articles to be expanded from February 2017 All articles to be expanded Articles using small message boxes Talk Contents About Wikipedia Asturianu Español فارسی Français 한국어 Simple English Edit links This page was last edited on 17 June 2018, at 12 : 05. Text is available under the Creative Commons Attribution - ShareAlike License ; additional terms may apply. By using this site, you agree to the Terms of Use and Privacy Policy. Wikipedia ® is a registered trademark of the Wikimedia Foundation, Inc., a non-profit organization. About Wikipedia

Question: for what kind of models can we use ols
Answer: linear regression