Courses › Statistics and Econometrics
Inference in regression
The OLS assumptions, the sampling distribution of the slope, standard errors, t-tests and confidence intervals for coefficients, and heteroskedasticity-robust standard errors.
Module 6 fitted a line to one sample. A different sample of days, households or cities would give a somewhat different line. This module asks how much the estimated slope would bounce around, and what that means for the conclusions you can draw from it.
You will meet the assumptions under which OLS works, the sampling distribution and standard error of the slope, t-tests and confidence intervals for regression coefficients, how to read a regression table, what heteroskedasticity is and why economists routinely use robust standard errors, and the difference between predicting an average and predicting a single outcome.
By the end of this module you will be able to
- State the least squares assumptions and explain what each one buys.
- Explain what determines the standard error of the OLS slope.
- Test hypotheses about a regression coefficient and build confidence intervals for it.
- Read a regression table, including standard errors in parentheses and significance stars.
- Recognize heteroskedasticity, explain why it matters, and know when to use robust standard errors.
- Distinguish a confidence interval for the average outcome from a prediction interval for one outcome.
What this module covers
- The least squares assumptions
- The standard error of the slope
- t-tests and confidence intervals for coefficients
- Heteroskedasticity and robust standard errors
- Prediction, and a checklist for reading regressions
- Problem set with step-by-step solutions
- Module quiz
Lesson 7.1 Free lesson
The least squares assumptions
For OLS to estimate β₁ well and for its standard errors to mean something, three assumptions do the heavy lifting:
- 1. The error has conditional mean zero: E(u | X) = 0. The other influences on Y, collected in u, are on average the same whatever the value of X. This is the assumption that makes β̂₁ unbiased and lets it be read as the effect of X. It is also the one most likely to fail in economic data.
- 2. The observations are independent and identically distributed (i.i.d.). Each observation is an independent draw from the same population, as in simple random sampling. It fails for time series (this month is related to last month, Module 12) and for clustered data (students in the same classroom, Module 14).
- 3. Large outliers are unlikely. X and Y have finite variances. A few extreme values can dominate OLS (Module 6 showed one apartment tilting a line), so check the data.
Under these three assumptions, OLS is unbiased and consistent, and in large samples β̂₁ is approximately normally distributed around β₁, by the same central limit theorem logic as for a sample mean. β̂₁ is, after all, a weighted average of the Y values.
An optional fourth: homoskedasticity
The error is homoskedastic if its variance is the same at every value of X, and heteroskedastic if it isn’t. Homoskedasticity is not needed for unbiasedness or consistency. It matters only for which standard error formula is right (Lesson 4). Under homoskedasticity plus the three assumptions, the Gauss–Markov theorem says OLS has the smallest variance among all linear unbiased estimators: it is BLUE, the best linear unbiased estimator.
| Assumption | If it fails | Covered in |
|---|---|---|
| E(u | X) = 0 | β̂₁ is biased and doesn’t measure X’s effect | Modules 8 and 13–15 |
| i.i.d. sampling | Standard errors are wrong (usually too small) | Modules 12 and 14 |
| No large outliers | Estimates can be driven by a few points | Module 6 |
| Homoskedasticity (optional) | Conventional SEs are wrong; use robust SEs | Lesson 4 |
Common mistake
Thinking OLS requires the errors to be normally distributed. In large samples it doesn’t: the CLT makes β̂₁ approximately normal anyway. Normal errors only matter for exact small-sample t-distributions.
Key ideas
- The key assumption is E(u | X) = 0: other influences on Y are unrelated to X.
- With i.i.d. sampling and no large outliers, OLS is unbiased, consistent and approximately normal in large samples.
- Homoskedasticity is optional; it affects which standard errors are right, not whether β̂₁ is unbiased.
- Under homoskedasticity OLS is BLUE (Gauss–Markov).
Practice questions: Inference in regression
Try these, then open each answer to check your work.
- 1.Which least squares assumption is needed for β̂₁ to be unbiased for the effect of X?
- Homoskedastic errors
- E(u | X) = 0
- Normally distributed errors
- A high R²
Show answer
Answer: B. Conditional mean zero errors make OLS unbiased; homoskedasticity and normality are not needed.
- 2.SER = 6 and Σ(X − X̄)² = 900. SE(β̂₁) is:
- 0.0067
- 0.2
- 0.67
- 5
Show answer
Answer: B. 6/√900 = 6/30 = 0.2.
- 3.Which change would NOT make the slope estimate more precise?
- A larger sample
- Less noise in the outcome
- Less variation in X
- More variation in X
Show answer
Answer: C. Less variation in X raises the standard error.
Problems with step-by-step solutions
- 4.For each situation, say which least squares assumption is most at risk: (a) a regression of monthly city unemployment on monthly interest rates; (b) a regression of test scores on class size where principals put weaker students in smaller classes; (c) a data set of household wealth that includes three billionaires.
Show step-by-step solution
- (a) Independence: monthly observations follow each other, so errors are likely correlated over time.
- (b) E(u | X) = 0: student ability (in u) is related to class size (X).
- (c) No large outliers: a few extreme values could dominate the fit.
- 5.A regression has SER = 12 and Σ(X − X̄)² = 400. Find SE(β̂₁).
Show step-by-step solution
- SE = 12/√400 = 12/20 = 0.6.
Get the full module
The complete module adds every lesson, interactive graphs, a full problem set with step-by-step solutions, and a quiz. The academy opens in January 2027: join the waitlist for the founding price (lifetime access for $179).
Join the waitlist Try a full module free
More practice: free practice questions for this course.