The Simple Linear Regression Model (SLRM) is used in this section as a bridge between the Scatter Plot, Pearson Correlation, and Simple Linear Regression as a descriptive/explorative tool on the one hand and the Multiple Linear Regression Model (MLRM) on the other.
Terminology note: this chapter uses the econometrics terms “exogenous” and “endogenous”, which correspond to “predictor” and “response” in mainstream statistics texts.
Unlike the MLRM, the SLRM can be explained with standard algebra. This is the main reason why the SLRM (which is not often used in practice) is treated here.
134.2 Least Squares Criterion
There are many techniques in statistics that use the least squares criterion. In regression models, however, this criterion is of particular importance.
Why should a criterion be used at all? The answer to this question is quite obvious: one has to have an objective measure for discrepancies between the estimated values (generated by the statistical model) and the (true) observed values. In fact we wish to create mathematical models of our surrounding world in order to be able to describe it, to draw conclusions from it, to forecast future behaviour of some phenomena, and to explain why certain things happened in the past.
For obvious reasons these mathematical models are not deterministic but instead, probabilistic or stochastic. This is the reason why we have a need for a good criterion to decide whether our model describes the real world well enough to be of practical importance.
Since we cannot hope for a model to describe a real phenomenon perfectly, the only thing we can do is to design a method for getting as close to the real behaviour as possible. This can be achieved by minimising the error of the mathematical model.
On first sight, the most intuitive way to express the error made by a probabilistic model is to calculate the sum of the deviations between the predicted and the real values
where \(e_i\) is the prediction error, \(F_i\) is the prediction or forecast, \(Y_i\) is the observed value, and \(i\) represents the observation index (\(i= 1, 2, …, n\)).
This criterion, however, is problematic because the sum of errors will be very close to zero when positive and negative errors compensate each other. Therefore, a much better criterion would be based on the absolute values of errors
This criterion can be used in practice but the problem is that the mathematical expressions are rather cumbersome. Therefore most statisticians prefer to use the criterion of the sum of squared errors which has nice mathematical properties
Using the square of the deviations results in generating only positive values (like in the previous criterion) but above that, it tends to give more weight to large discrepancies in stead of small ones (which is not always a good thing). Although this (third) criterion is frequently used, it does not always yield better results than the second criterion. This is because in some cases, e.g. when a very long structural shift (in time) exists, the second criterion will describe specifically the long shift better than the third criterion whereas the latter performs better in regard to overall predictive power. Moreover, the second criterion is much more robust in the context of outliers.
134.3 Ordinary Least Squares for Simple Linear Regression
where \(x_i = X_i - \bar{X}\). We use \(x_i\) instead of the original observations \(X_i\) because this reduces the mathematical complexity without loss of generality.
Using the first order condition, it is possible to find a solution for both parameters that minimize the sum of squared prediction errors. Hence, we need to use the first partial derivative of the Sum of Squared Residuals (SSR) with respect to \(\alpha\) and equate it to zero to find the optimum
In practice the above results are used to estimate the parameters \(\alpha\) and \(\beta\) by the so-called Ordinary Least Squares (OLS) method. In order to indicate that both formulas are used to “estimate” the true population parameters \(\alpha\) and \(\beta\), we write the “hat” symbol above the parameter:
where the estimate of the intercept is \(\hat{\alpha}_0 = \hat{\alpha} - \hat{\beta} \bar{X}\) (because we replaced \(X_i\) by \(x_i\) in the computation of the first derivatives).
134.4 Assumptions of Ordinary Least Squares
The assumptions of the SLRM have already been described in Chapter 74. For convenience we summarize the key assumptions again:
The conditional mean is linear in parameters: \(\text{E}(Y_i \mid X_i) = \alpha + \beta X_i\).
Exogeneity: \(\text{E}(e_i \mid X_i)=0\).
The prediction errors (residuals) have a fixed Variance \(\sigma^2\) (i.e. the residuals are “homoskedastic”, not “heteroskedastic”). This implies that
For any randomly chosen, sizable subset of residuals the Variance (of residuals) should be the same.
In time series, the Variance is fixed in time (i.e. it must not increase or decrease over time).
The “uncertainty” of predictions made by the SLRM is always the same and independent of the observation index \(i\).
The residuals are mutually not correlated (their covariances are zero). This means that
It is not possible to improve the predictions for observational index \(i\) based on errors made for observational index \(i \pm k\) (for \(k \neq 0\)).
In time series it is not possible to improve forecasts by using the information from past residuals.
The explanatory variable has variation: \(\sum_{i=1}^{n}(X_i-\bar{X})^2 > 0\).
For causal interpretation (not only prediction), a stronger assumption is additionally needed: no omitted confounders that are correlated with \(X_i\).
Note: normality is not implied by the above assumptions. Exact finite-sample t- and F-inference requires an additional normal-error assumption. For large samples, approximate inference is usually justified by asymptotic theory for the estimators.
134.5 Statistical Inference with Ordinary Least Squares
134.5.1 Mathematical Expectation and Variance of Simple Linear Regression Parameters
In order to be able to obtain reliable information about the population parameters (of the real mathematical model), based only on the sample observations, it is necessary to compute the expectation and the variance of both estimated parameters.
The expectation of the estimated constant term can be derived as follows
where the unobservable \(\sigma\) is replaced by an estimator based on the residual variance. Under the classical normal-error assumption, this replacement yields a t-statistic (with \(n-2\) degrees of freedom). Hence we can write
\[
t = \frac{\hat{\beta} - \beta}{s_{\hat{\beta}}}
\]
The 95% confidence interval for \(\beta\) is given by the following expression