ε

Instrumental Variables & 2SLS

When OLS is biased by endogeneity, and how an instrument plus 2SLS rescues it.

Intermediate · 4 modules · Free and browser-based

View the course outline

Course overview

Learn Instrumental Variables & 2SLS interactively

This free course uses real Python and statsmodels in your browser. Work through the modules below with explanations, executable examples, interactive controls, and questions.

1 · Why OLS fails

Endogeneity from omitted variables and simultaneity makes OLS biased and inconsistent.

2 · Instruments

A valid instrument is relevant (moves x) and excluded (affects y only through x).

3 · Two-Stage Least Squares

Project x on the instruments, then regress y on the fitted x to recover a consistent β₁.

4 · Diagnostics

First-stage F flags weak instruments; over-identification tests probe exclusion.