04.ECTRIE SLRM
📚 04.ECTRIE_SLRM (2).pdf
Brief overview
This document introduces the fundamental concepts of linear regression analysis. It details the Ordinary Least Squares (OLS) method for estimating model coefficients and explores measures of goodness of fit, laying the groundwork for statistical inference.
Key points
- Introduction to the basic linear regression model and its components.
- Detailed explanation of the Ordinary Least Squares (OLS) method for estimating coefficients.
- Assessment of model quality using R-squared and the Standard Error of the Regression.
- Exploration of fundamental assumptions for OLS and the sampling distribution of estimators.
- Application of large-sample approximations, including the Law of Large Numbers and Central Limit Theorem.
1. Introduction to the linear regression model
The linear regression model helps estimate the impact of one variable on another. It aims to find the slope of the population regression line.
This slope shows the expected change in the dependent variable (Yi) for a one-unit increase in the independent variable (Xi). The model can be extended to include an error term to account for other influencing factors 4 6.
1.1 The linear regression model
The basic linear regression model with a single regressor is written as: Yi=β0+β1Xi+ui
Where:
- Yi: the dependent variable.
- Xi: the independent variable.
- β0: the intercept of the population regression line.
- β1: the slope of the population regression line.
- ui: the error term, representing other factors.
The population regression line describes the average relationship between Y and X across the entire population 7.
The model can be visualized with a scatterplot of observations, the population regression line, and the regression errors. The slope coefficient (β1) indicates the change in Y for a unit change in X 8.

1.2 Estimating regression coefficients
Estimating the coefficients (β0 and β1) involves finding the line that best fits the data. This is typically done using the Ordinary Least Squares (OLS) method.
OLS minimizes the sum of the squared differences between the observed values and the values predicted by the regression line.
The objective is to minimize: ∑i=1n(Yi−Y^i)2=∑i=1n[Yi−(b0+b1Xi)]2
This minimization problem leads to specific formulas for the OLS estimators 11.
1.2.1 Derivation of OLS estimators
The OLS estimators, denoted as β^0 and β^1, are derived by setting the partial derivatives of the sum of squared errors with respect to b0 and b1 to zero. This yields a system of equations that can be solved for β^0 and β^1 12.
The derivation leads to the formula for the slope estimator: β^1=∑i=1n(Xi−Xˉ)2∑i=1n(Xi−Xˉ)(Yi−Yˉ)

The intercept estimator is then derived from the estimated slope and the sample means: β^0=Yˉ−β^1Xˉ 14.
The formulas for the OLS estimators are:
| Coefficient | Formula |
|---|---|
| Slope | β^1=∑i=1n(Xi−Xˉ)2∑i=1n(Xi−Xˉ)(Yi−Yˉ) |
| Intercept | β^0=Yˉ−β^1Xˉ |
1.2.2 OLS notation and concepts
Key notations in OLS estimation include:
- β^0, β^1: The estimated population coefficients.
- Y^i=β^0+β^1Xi: The predicted value of Yi from the sample regression line.
- u^i=Yi−Y^i: The residual for the i-th observation, which is the sample counterpart of the population error ui.
1.3 Application: California test scores
The California test score data set provides an example to illustrate OLS. It includes test scores and student-teacher ratios (STR) for school districts 19.
The relationship between test scores and the student-teacher ratio is often negative. A lower student-teacher ratio (more teachers per student) is typically associated with higher test scores 20 21.


An example regression output for California school districts shows an estimated relationship: TestScorei=698.9−2.28×STRi
This suggests that for every one-student increase in the student-teacher ratio, the average test score is predicted to decrease by 2.28 points 22.

🔑 Important: OLS is the standard method for estimating linear regression coefficients, aiming to minimize the sum of squared prediction errors. Understanding the derivation and interpretation of coefficients is crucial for econometric analysis 10 17.
2. Goodness of fit measures (part 1)
2.1 Measuring how well the regression line fits the data
Two statistics assess how well a regression line explains the data. The regression R-squared (R2) measures the proportion of variance in the dependent variable that is explained by the independent variable.
It ranges from zero (no explanation) to one (perfect explanation). The Standard Error of the Regression (SER) measures the typical distance of observations from the regression line 24.
2.1.1 The R-squared statistic
The R-squared (R2) is the fraction of the total sum of squares (TSS) that is explained by the regression. It is calculated as the explained sum of squares (ESS) divided by the TSS.
Alternatively, it can be calculated as 1 minus the ratio of the residual sum of squares (SSR) to the TSS. For simple linear regression with one predictor, R2 is the square of the correlation coefficient between Y and X 25.
The following table breaks down the components of the R-squared calculation:
| Component | Formula | Represents |
|---|---|---|
| Total Sum of Squares (TSS) | ∑i=1n(Yi−Yˉ)2 | Total variation in Y |
| Explained Sum of Squares (ESS) | ∑i=1n(Y^i−Yˉ)2 | Variation in Y explained by X |
| Residual Sum of Squares (SSR) | ∑i=1nu^i2 | Variation in Y not explained by X (error) |
R2=TSSESS=1−TSSSSR
2.1.2 Standard Error of the Regression (SER)
The Standard Error of the Regression (SER) estimates the standard deviation of the regression error, ui. It measures the typical size of the OLS residuals, representing the average "mistake" the regression line makes.
The SER has the same units as the dependent variable (Yi), making it more interpretable than R2 for understanding the magnitude of prediction errors.
The formula for the SER is the square root of the residual sum of squares divided by the degrees of freedom (n−2) 28.

The Root Mean Squared Error (RMSE) is closely related to the SER. The main difference is that RMSE divides the SSR by n instead of n−2.
For large sample sizes, the difference between SER and RMSE is negligible 29.

2.1.3 Regression output example
Regression software typically provides both R2 and SER values. For example, in a regression of test scores on student-teacher ratio (STR), the R2 might be low, indicating that STR explains only a small fraction of the variation in test scores 30.
| Statistic | Value |
|---|---|
| R-squared | 0.0497 |
| Prob > F | 0.0000 |
| Number of obs. | 421 |
Low R2 does not necessarily mean the independent variable is unimportant for policy decisions.
2.2 The Least Squares Assumptions (LSA)
To understand the properties of the OLS estimator, like its unbiasedness and variance, we must make assumptions about the data and the relationship between variables. These are called the Least Squares Assumptions (LSA) 32.
2.2.1 The three core assumptions
The LSA for a simple linear regression model (Yi=β0+β1Xi+ui) are:
- Zero conditional mean of the error term: E(ui∣Xi)=0. This means that any "other factors" captured in ui are unrelated to Xi. This is crucial for β^1 to be unbiased.
- IID sampling: (Xi,Yi) are independently and identically distributed. This holds when data is collected using simple random sampling from the population.
- No large outliers: Large outliers in Xi or Yi are rare. Technically, this means Xi and Yi have finite fourth moments. Outliers can disproportionately influence the OLS estimates 33.
LSA #1: E(ui∣Xi)=0 implies "other factors" are uncorrelated with Xi.
2.2.2 Understanding LSA #1: Zero conditional mean
The assumption E(ui∣Xi)=0 is best understood by considering a randomized controlled experiment. In such an experiment, subjects are randomly assigned to treatment (X=1) or control (X=0).
This random assignment ensures that all other individual characteristics (the error term ui) are distributed independently of Xi. Therefore, ui and Xi are uncorrelated.
For observational data, we aim for Xi to be "as if" randomly assigned, requiring careful consideration of whether this assumption holds 35.

2.2.3 Understanding LSA #2: IID sampling
The assumption that (Xi,Yi) are independently and identically distributed (IID) naturally arises from simple random sampling. "Identically distributed" means that each observation comes from the same population distribution.
"Independently distributed" means that the selection of one observation does not affect the selection of another. Violations of this assumption are more common in time series data where observations from the same entity over time are not independent 36.
2.2.4 Understanding LSA #3: No large outliers
The assumption that large outliers are rare is important because extreme values can heavily influence OLS estimates. While technically related to finite fourth moments, the practical implication is that we need to identify and understand extreme data points.
Outliers can arise from data entry errors or represent genuine but unusual observations that may need to be excluded or investigated further. Plotting the data is essential for detecting outliers 37 38.

🔑 Important: The three LSA are fundamental for ensuring the OLS estimator has desirable statistical properties like unbiasedness and for deriving its sampling distribution.
2.3 Sampling distribution of the OLS estimator
The OLS estimator (β^1) is calculated from a specific sample, meaning different samples will produce different estimates. This "sampling uncertainty" necessitates understanding the estimator's sampling distribution.
This involves quantifying this uncertainty, testing hypotheses (e.g., β1=0), and constructing confidence intervals 40.
2.3.1 Framework for the distribution
The three Least Squares Assumptions (LSA) provide the probability framework for linear regression. These assumptions define the population, the relationship between variables, and the sampling method.
They collectively inform us about the behavior of the OLS estimator 41.
2.3.2 Properties of the OLS estimator
Our goal is to determine the mean, variance, and distribution of the OLS estimator β^1 42.
- Mean: If E(β^1)=β1, the OLS estimator is unbiased.
- Variance: The variance of β^1 measures its sampling uncertainty.
- Distribution: In large samples, β^1 is normally distributed, which is crucial for inference and hypothesis testing.
🔑 Important: The LSA are the bedrock for understanding the statistical properties of OLS estimators, enabling us to make reliable inferences from sample data.
3. Goodness of fit measures (part 2)
3.1 Sampling distribution of OLS estimators
The sampling distribution of an estimator describes how it varies across different samples. For Ordinary Least Squares (OLS) estimators, understanding their mean and variance is crucial.
When the Least Squares Assumptions (LSAs) hold, OLS estimators are unbiased and consistent. This means their expected value equals the true population parameter, and they converge to the true value as the sample size increases.
The derivation of the mean and variance of the β^1 estimator involves algebraic manipulation of the regression equation. This process relates the estimator to the regressors (Xi) and the error terms (ui).

The expression for β^1−β1 highlights its dependence on the sum of products of deviations from the mean of X and the errors.
β^1−β1=∑i=1n(Xi−Xˉ)2∑i=1n(Xi−Xˉ)(ui−uˉ) 45.
The mean of β^1 is derived using the law of iterated expectations. Under LSA #1 (zero conditional mean of errors) and LSA #2 (independent and identically distributed errors), the expected value of the error term conditional on the regressors is zero.
This leads to the conclusion that β^1 is an unbiased estimator of β1 46.
The variance of the OLS estimator is also derived through algebraic steps. It involves the variance of the numerator, which depends on the variance of the error terms and the regressors, divided by the square of the variance of the regressors.

3.1.1 Mean and variance properties
The derivation shows that the variance of β^1 is influenced by two key components: the variance of the error terms (ui) and the variance of the independent variable (Xi).
- Variance of errors (var(ui)): A larger variance in the error terms leads to a larger variance in the OLS estimator. This means more unpredictable factors affecting Y increase the uncertainty in our estimate of β1.
- Variance of regressors (var(Xi)): A larger variance in the independent variable generally leads to a smaller variance in the OLS estimator. Wider spread in X values provides more information for estimating the relationship with Y.
The variance of β^1 is inversely related to the variance of Xi.
The formula for the variance of β^1 under large-sample assumptions is:
σβ^12=n[var(Xi)]2var[(Xi−μX)ui] 49.
This formula shows that as the sample size (n) increases, the variance of the estimator decreases. This aligns with the principle that larger samples provide more precise estimates.

The implication of these properties is that OLS estimators are consistent. This means that as the sample size approaches infinity, the OLS estimator converges in probability to the true population parameter.

When the sample size (n) is large, the sampling distribution of the OLS estimators simplifies due to the Central Limit Theorem (CLT). This allows us to approximate the distribution with a normal distribution, which is essential for hypothesis testing and constructing confidence intervals.
- Finite sample properties:
- E(β^1) = β1 (unbiasedness)
- var(β^1) = σβ^12
- Large sample properties:
- β^1pβ1 (consistency, Law of Large Numbers)
- var(β^1)β^1−E(β^1)∼N(0,1) (normality, CLT).
Take time to manually derive the mean and variance of OLS estimators. Understanding these steps is key for exam success.
🔑 Important: For large samples, OLS estimators are both unbiased and normally distributed, enabling statistical inference 52.
4. Large-sample approximations and appendix
4.1 Approximating sampling distributions
When dealing with samples, especially large ones, we often rely on approximations for the sampling distributions of estimators. These approximations simplify analysis when exact distributions are complex or unknown.
Two key tools for this are the Law of Large Numbers (LLN) and the Central Limit Theorem (CLT) 55.
4.1.1 The Law of Large Numbers
The Law of Large Numbers states that as the sample size (n) increases, the sample average (Yˉ) of independent and identically distributed (IID) random variables gets closer to the true population mean (μY). This means the estimator is consistent.
🔑 Important: Consistency means the probability of the estimator being close to the true value approaches one as n grows large 56.
4.1.2 The Central Limit Theorem
The Central Limit Theorem is crucial for large-sample approximations. It states that for a large enough sample size (n), the distribution of the sample average (Yˉ) is approximately normal.
This holds true even if the original data is not normally distributed.
The theorem focuses on the standardized sample average:
var(Yˉ)Yˉ−E(Yˉ)=σY/nYˉ−μY∼N(0,1)
Here, σY is the population standard deviation. This standardized form is approximately a standard normal distribution (N(0,1)).
The figure below illustrates this principle, showing the sampling distribution of the sample average becoming more normal as the sample size increases 60.

🔑 Important: The approximation becomes better as n gets larger. For n≥100, the normal approximation is generally very good for many types of underlying distributions 58.
The figures on page 57 and 59 show how sampling distributions for Bernoulli random variables converge to a normal shape as sample size increases 57 59.
4.1.3 Properties of Yˉ in large samples
In large samples, the properties of the sample average (Yˉ) are well-defined:
| Property | Description |
|---|---|
| Mean | E(Yˉ)=μY (unbiased estimator) |
| Variance | var(Yˉ)=σY2/n |
| Distribution | Approximately N(μY,σY2/n) via CLT |
| Consistency | YˉpμY via LLN |
🔑 Important: The core takeaway is that for large samples, the sample average is a good estimator of the population mean, and its distribution is predictable (normal) 61.
© 2026 Maeve. All rights reserved. This content is protected by copyright.