Step 4: Properties of OLS
- An estimator is a rule; an estimate is the number it gives for one sample. OLS is judged by the centre (bias) and spread (variance) of its sampling distribution.
- Under assumptions SLR.1–SLR.4 the OLS slope is unbiased, because \( \hat\beta_1 = \beta_1 + \sum (x_i-\bar x)u_i/\text{SST}_x \) and the weighted errors average to zero.
- Adding homoskedasticity (SLR.5), \( \text{Var}(\hat\beta_1) = \sigma^2/\text{SST}_x \). Precision improves with less noise, more data and more spread in \( x \).
- Estimate \( \sigma^2 \) with \( \text{SSR}/(n-2) \); then \( \text{se}(\hat\beta_1) = \hat\sigma/\sqrt{\text{SST}_x} \). For 500 houses it is 0.005687.
- Gauss–Markov: under SLR.1–SLR.5, OLS is BLUE. If SLR.4 fails, OLS is biased, and more data do not help: a simulation with omitted ability centres on 0.10 instead of the true 0.08.
Estimators, estimates and sampling distributions
Step 3 regressed the price of 500 houses on their floor area and got a slope of 0.1408: about $141 per square foot. But that came from one sample of 500 sales. A different 500 sales from the same market would give a slightly different slope. How far can you trust the one you have? Is it right on average? How much would it bounce around? Is there a better way to estimate it? This step answers those questions.
An analogy helps. A kitchen scale is an estimator of a parcel’s weight; one reading, “2.04 kg”, is an estimate. You judge the scale, not the reading: does it read correctly on average, and how much do its readings scatter if you weigh the same parcel again and again? A biased estimator is like a scale that reads 200 g heavy: precise, perhaps, but precisely wrong, and more weighings only make you more confident in the wrong answer. You want an estimator centred on the truth and tightly spread around it.
The five assumptions SLR.1–SLR.5
The properties of OLS are not automatic. They hold only if the data are generated in a particular way. For simple linear regression (SLR) there are five numbered assumptions.
| Assumption | In symbols | In plain English | Example of failure |
|---|---|---|---|
| SLR.1 Linear in parameters | \( y = \beta_0 + \beta_1 x + u \) | The model has the right shape; variables may be logged or squared | Fitting a straight line when the wage profile rises and then flattens with experience |
| SLR.2 Random sampling | \( (x_i, y_i) \) independent draws | Everyone had the same chance of selection; one person’s error says nothing about the next | Surveying one firm only; time series, where this year’s error relates to last year’s |
| SLR.3 Variation in \( x \) | \( \text{SST}_x = \sum (x_i – \bar x)^2 > 0 \) | \( x \) must actually vary | Every worker in the sample has exactly 12 years of school |
| SLR.4 Zero conditional mean | \( \text{E}(u \mid x) = 0 \) | Knowing \( x \) tells you nothing about the average of the omitted factors | Ability raises both schooling and wages; reverse causality; measurement error in \( x \) |
| SLR.5 Homoskedasticity | \( \text{Var}(u \mid x) = \sigma^2 \) | The scatter around the line is equally wide at every \( x \) | Wages are far more spread out among highly educated workers |
SLR.3 is the only assumption you can check with certainty, just by looking at the data. SLR.4 does most of the work and is the one most often violated; it decides whether a slope can be read as causal. Note that SLR.4 is stronger than zero correlation: \( u \) must be unrelated to every function of \( x \), not just to \( x \) in a straight-line sense.
| Property | Assumptions needed |
|---|---|
| OLS can be computed | SLR.3 |
| Unbiasedness: \( \text{E}(\hat\beta_1) = \beta_1 \) | SLR.1–SLR.4 |
| Variance formula \( \sigma^2/\text{SST}_x \) and the usual standard errors | SLR.1–SLR.5 |
| Gauss–Markov: OLS is BLUE | SLR.1–SLR.5 |
| Exact \( t \) and \( F \) tests in small samples | SLR.1–SLR.5 plus normal errors (Step 5) |
Why OLS is unbiased
The proof uses only sums and one rule for expectations, and it shows exactly where each assumption enters. Write \( d_i = x_i – \bar x \). Because deviations sum to zero, the slope can be written \( \hat\beta_1 = \sum d_i y_i / \text{SST}_x \) (SLR.3 lets us divide). Substitute the model \( y_i = \beta_0 + \beta_1 x_i + u_i \) (SLR.1, SLR.2), use \( \sum d_i = 0 \) and \( \sum d_i x_i = \text{SST}_x \):
The estimate equals the truth plus a sampling error: a weighted sum of the unobserved errors, with weights \( (x_i – \bar x)/\text{SST}_x \). Observations far from \( \bar x \) push hardest. Now take expectations with the \( x \) values held fixed. The weights are constants, and by SLR.2 and SLR.4 each \( \text{E}(u_i \mid x) = 0 \), so every term vanishes and \( \text{E}(\hat\beta_1) = \beta_1 \). The intercept is unbiased by a similar argument.
Look at where SLR.4 entered: in the single step \( \text{E}(u_i \mid x_i) = 0 \). If ability is in \( u \) and rises with education, high-\( x \) observations (positive weights) tend to have positive \( u \), low-\( x \) ones negative \( u \), and the sampling error is positive on average. Homoskedasticity was never used.
The true model is \( y = 2 + 0.5x + u \). A sample has \( x = 1, 2, 3, 4, 5 \) and errors \( u = 0.3, -0.4, 0.2, 0.5, -0.6 \) (which in real life you could not see). Compute \( \hat\beta_1 \) from the data and from the sampling-error formula.
The sampling error is \(-0.09\), mainly because the largest negative error fell on the observation with the largest weight. In another sample it could be positive. Under SLR.4 these errors average to zero across samples.
The variance of the OLS slope
Unbiasedness says where the sampling distribution is centred; the variance says how spread out it is. Starting from the sampling-error formula, random sampling makes the errors independent (no covariance terms), and homoskedasticity makes every \( \text{Var}(u_i \mid x) = \sigma^2 \). So
Three things make the slope more precise:
| Lever | Why it helps |
|---|---|
| Less noise (smaller \( \sigma^2 \)) | The line shows through more clearly. Adding relevant variables (Step 6) takes noise out of \( u \). |
| More data (larger \( n \)) | The variance falls like \( 1/(n-1) \), so the standard deviation falls like \( 1/\sqrt{n} \). Quadrupling the sample halves it. |
| More spread in \( x \) (larger \( s_x^2 \)) | Spread-out \( x \) values pin the line down at both ends; bunched ones let a small wobble in \( y \) tilt it a lot. |
A model has \( \sigma^2 = 4 \). (a) With \( \text{SST}_x = 100 \), find \( \text{Var}(\hat\beta_1) \) and \( \text{sd}(\hat\beta_1) \). (b) What if the sample is four times larger with the same spread in \( x \)? (c) What if instead every \( x \) is twice as far from its mean?
In an experiment where you choose \( x \), such as a fertiliser dose, spreading the doses out is a cheap way to gain precision, as long as the relationship stays linear over the wider range.
Estimating the error variance and the standard error
The variance formula contains \( \sigma^2 \), the variance of errors you never see. The residuals are the natural stand-in, but the average squared residual \( \text{SSR}/n \) is slightly too small: OLS chooses the line to fit this sample, so residuals are smaller than errors. Formally, the residuals must satisfy two first-order conditions, \( \sum \hat u_i = 0 \) and \( \sum x_i \hat u_i = 0 \), so only \( n-2 \) of them are free to vary. Dividing by the degrees of freedom corrects the shortfall exactly.
\( \hat\sigma \) is the standard error of the regression. Python’s statsmodels calls \( \hat\sigma^2 \) the scale, R prints \( \hat\sigma \) as “Residual standard error”, and Stata calls it “Root MSE”. The standard error \( \text{se}(\hat\beta_1) \) is an estimate of the standard deviation of the slope’s sampling distribution.
For the 500 houses, SSR \( = 3{,}213{,}782.3 \) and \( \text{SST}_x = 199{,}526{,}258 \). Compute \( \hat\sigma \) and \( \text{se}(\hat\beta_1) \), interpret them, and predict the standard error with 2,000 similar sales.
Python’s summary table rounds this standard error to 0.006; ask for model.bse to see more digits. Dividing SSR by 500 instead of 498 would give 6,427.56 instead of 6,453.38, only 0.4% different, because the sample is large. With 10 observations the correction matters a lot.
The Gauss–Markov theorem
OLS is not the only unbiased estimator of \( \beta_1 \). It is linear, \( \hat\beta_1 = \sum w_i y_i \) with weights \( w_i = (x_i – \bar x)/\text{SST}_x \) that depend only on the \( x \) values, and so are many alternatives. The “end-point” estimator \( \tilde\beta_1 = (y_n – y_1)/(x_n – x_1) \), the slope of the line joining the first and last points, is linear and also unbiased under SLR.1–SLR.4.
The intuition: every linear unbiased estimator must use weights with \( \sum w_i = 0 \) and \( \sum w_i x_i = 1 \), and under SLR.5 its variance is \( \sigma^2 \sum w_i^2 \). OLS spreads its weight over all the observations in proportion to their distance from \( \bar x \), which satisfies the two rules with the smallest sum of squared weights.
With \( x = 1, 2, 3, 4, 5 \) and SLR.1–SLR.5, compare the variances of OLS and the end-point estimator.
The end-point estimator has a 25% larger variance because it ignores the three middle observations.
What the theorem does not say. It needs all five assumptions: if SLR.4 fails OLS is not even unbiased, and if SLR.5 fails OLS is still unbiased but no longer best (weighted least squares can do better, Step 11). “Best” is only within linear unbiased estimators; a biased rule can have a smaller variance. And it says nothing about the shape of the sampling distribution, which Step 5 needs for exact tests.
Seeing it: a Monte Carlo simulation
The proofs talk about “all possible samples”, but you only ever have one. A computer removes that limit: invent a population with known parameters, draw thousands of samples, run OLS on each and look at the sampling distribution directly. Econometrics Made Simple does this for a wage model with a true return to schooling of 8%:
Ability has mean 0 and standard deviation 1, and abler people get more schooling. Design A satisfies SLR.1–SLR.5 (ability affects schooling but not wages). In design B, ability also raises the log wage by 0.10 per standard deviation, so it sits in the error and SLR.4 fails. Design C is A with \( n = 200 \) instead of 50. Each design draws 2,000 samples, with a fixed random seed.
| Design | Mean of 2,000 slopes | sd of slopes | Mean standard error |
|---|---|---|---|
| A: SLR.1–5 hold, \( n = 50 \) | 0.0807 | 0.0260 | 0.0257 |
| B: ability omitted, \( n = 50 \) | 0.0999 | 0.0266 | 0.0262 |
| C: SLR.1–5 hold, \( n = 200 \) | 0.0799 | 0.0127 | 0.0127 |
Unbiasedness. In A the slopes average 0.0807, very close to 0.08; the gap is about one standard error of a 2,000-sample average (\( 0.0260/\sqrt{2000} = 0.0006 \)). Roughly half the estimates are above the truth and half below: right on average, not right every time.
The variance formula. With \( \sigma = 0.40 \), \( n = 50 \) and a population variance of education of \( 1^2 + 2^2 = 5 \), the formula predicts about \( 0.40/\sqrt{49 \times 5} = 0.0256 \). The simulated spread is 0.0260 (slightly larger because \( \text{SST}_x \) itself varies between samples), and the average standard error, 0.0257, is close to it.
More data. From A to C the spread falls from 0.0260 to 0.0127, a ratio of 2.04, close to the \( \sqrt{4} = 2 \) predicted.
Bias. In B the slopes average 0.0999, and 77.8% of them are above the truth. The bias does not shrink with more data, because in the simulated population the highly educated really are more able.
When the assumptions fail
Heteroskedasticity (SLR.5 fails)
Heteroskedasticity, an error variance that changes with \( x \), is the rule rather than the exception in cross-section data. Regress the hourly wage (in dollars) on education and measure the spread of the residuals by schooling group: it more than doubles from the least to the most educated.
wages.csv, Econometrics Made Simple, Chapter 4.Heteroskedasticity does not bias OLS; the unbiasedness proof never used SLR.5. It does invalidate \( \sigma^2/\text{SST}_x \) and therefore the usual standard errors, tests and intervals, and it means OLS is no longer BLUE. Step 11 shows how to test for it and how to compute robust standard errors; our post on heteroskedasticity covers the fixes in depth.
Omitted variables (SLR.4 fails)
Suppose the true model is \( y = \beta_0 + \beta_1 x + \beta_2 z + v \) but you regress \( y \) on \( x \) alone. Then \( z \) is in your error, and if it is related to \( x \),
where \( \delta_1 \) is the slope from regressing \( z \) on \( x \). The term \( \beta_2\delta_1 \) is the omitted variable bias. In design B, \( \beta_2 = 0.10 \), and \( \delta_1 = \text{Cov}(\text{educ}, \text{ability})/\text{Var}(\text{educ}) = 1/5 = 0.2 \). So \( \text{E}(\hat\beta_1) = 0.08 + 0.10 \times 0.2 = 0.10 \), exactly what the simulation found. Same signs give an upward bias; opposite signs, a downward bias. Our post on predicting the direction of omitted variable bias works through many cases.
Other sources of endogeneity (an \( x \) correlated with the error) are simultaneity, as when price and quantity are set together in a market, and measurement error in \( x \), which biases the slope towards zero. Step 13 shows how instrumental variables can recover \( \beta_1 \).
Practise: 6 questions
Try each one on paper first, then check the worked answer.
EasyQ1. Under SLR.1–SLR.5 with \( \sigma^2 = 9 \) and \( \text{SST}_x = 225 \), find \( \text{Var}(\hat\beta_1) \) and \( \text{sd}(\hat\beta_1) \). Show worked answer
\( \text{sd}(\hat\beta_1) = \sqrt{0.04} = 0.2 \).
EasyQ2. A simple regression on \( n = 27 \) observations has SSR \( = 1{,}150 \) and \( \text{SST}_x = 400 \). Find \( \hat\sigma^2 \), \( \hat\sigma \) and \( \text{se}(\hat\beta_1) \). Show worked answer
\( \hat\sigma^2 = 1{,}150/25 = 46 \), so \( \hat\sigma = 6.782 \).
\( \text{se}(\hat\beta_1) = 6.782/\sqrt{400} = 6.782/20 = 0.339 \).
MediumQ3. The true model is \( y = 1 + 2x + u \). A sample has \( x = 2, 4, 6, 8 \) and errors \( u = 0.5, -1, 0.4, -0.3 \). Compute \( \hat\beta_1 \) using \( \hat\beta_1 = \beta_1 + \sum d_i u_i/\text{SST}_x \), and check it from the \( y \) values. Show worked answer
\( \sum d_i u_i = -1.5 + 1 + 0.4 – 0.9 = -1.0 \), so \( \hat\beta_1 = 2 – 1.0/20 = 1.95 \).
Check: \( y = 5.5, 8, 13.4, 16.7 \). \( \sum d_i y_i = -16.5 – 8 + 13.4 + 50.1 = 39.0 \), and \( 39.0/20 = 1.95 \).
MediumQ4. A regression of crop yield on fertiliser use omits soil quality. Better soil raises yield, and farmers on poor soil use more fertiliser to compensate. (a) What is the direction of the bias? (b) If soil quality raises yield by \( \beta_2 = 0.5 \) tonnes per index point and the slope of soil quality on fertiliser is \( \delta_1 = -0.04 \), how large is the bias? Show worked answer
(b) Bias \( = 0.5 \times (-0.04) = -0.02 \) tonnes per kilogram.
MediumQ5. With six observations at \( x = 2, 4, 6, 8, 10, 12 \) and SLR.1–SLR.5, compare the variance of OLS with that of the end-point estimator \( (y_6 – y_1)/(x_6 – x_1) \). Show worked answer
End point: \( \beta_1 + (u_6 – u_1)/10 \), variance \( 2\sigma^2/100 = 0.020\sigma^2 \).
The end-point estimator’s variance is 1.4 times as large, as Gauss–Markov guarantees it must be at least as large.
ExamQ6. A researcher has \( n = 100 \), \( \hat\sigma = 12 \) and a sample standard deviation of \( x \) of 5. (a) Compute \( \text{se}(\hat\beta_1) \). [2] (b) Estimate the standard error with \( n = 400 \) and the same \( \hat\sigma \) and \( s_x \). [2] (c) Which assumptions are needed for \( \hat\beta_1 \) to be unbiased, and which extra one for this standard error to be valid? [2] (d) Explain why collecting more data does not fix bias from an omitted variable. [2] Show worked answer
(b) \( \text{SST}_x = 399 \times 25 = 9{,}975 \) [1]; \( \text{se} = 12/\sqrt{9{,}975} = 0.120 \), about half. [1]
(c) SLR.1–SLR.4 for unbiasedness [1]; SLR.5 (homoskedasticity) for the usual standard error. [1]
(d) Bias \( = \beta_2\delta_1 \) depends on population relationships, not on \( n \) [1]; more data shrink the spread around the wrong centre, making you more confident in a wrong answer. [1]
Total: 8 marks.
Check yourself
1. Which assumption is not needed for OLS to be unbiased?
2. Quadrupling the sample size, with the same spread in \( x \), makes the standard deviation of \( \hat\beta_1 \)
3. Heteroskedasticity makes the OLS slope
Your score: 0 out of 3
The short version
- An estimator is a rule; an estimate is one number. Judge estimators by bias and variance.
- SLR.1–SLR.4 give \( \text{E}(\hat\beta_1) = \beta_1 \), via \( \hat\beta_1 = \beta_1 + \sum (x_i – \bar x)u_i/\text{SST}_x \). SLR.4 is the crucial one.
- Adding SLR.5: \( \text{Var}(\hat\beta_1) = \sigma^2/\text{SST}_x \). Less noise, more data and more spread in \( x \) all help.
- \( \hat\sigma^2 = \text{SSR}/(n-2) \) and \( \text{se}(\hat\beta_1) = \hat\sigma/\sqrt{\text{SST}_x} \): 0.005687 for the house-price slope.
- Gauss–Markov: under SLR.1–SLR.5, OLS is BLUE.
- Heteroskedasticity spoils the standard errors, not the estimate. An omitted variable biases the estimate by \( \beta_2\delta_1 \), and more data do not cure it.
- Chapter 4 of Econometrics Made Simple has the full proofs, the simulation code in Python and R, and a full set of exercises with answers.
Studying more than one subject? The Complete Book Bundle includes every Economics, Statistics, Mathematics and Econometrics book.
Further reading on EconTutorials
Related in-depth articles from our blog:
- Ordinary Least Squares (OLS): Derivation, Assumptions, and Why Omitted Variable Bias Ruins Everything
- Omitted Variable Bias: How to Predict the Direction Before You Run the Regression
- Heteroskedasticity: What It Is, Why It Matters, and How to Fix It
- Instrumental Variables and Two-Stage Least Squares: Solving the Endogeneity Problem
