Courses › Statistics and Econometrics
Instrumental variables and regression discontinuity
Instruments and two-stage least squares, weak instruments, local effects, and regression discontinuity designs around a cutoff.
Sometimes no control variable or fixed effect can remove the bias. The unobserved factor changes over time, or causality runs both ways at once. The two designs in this module work differently: instead of trying to measure every confounder, they find variation in X that is, for a credible reason, unrelated to the confounders, and use only that variation.
Instrumental variables use a third variable that shifts X but has no other path to Y: a lottery, a rule, the weather. Regression discontinuity uses an arbitrary cutoff that puts otherwise similar people on different sides of a treatment. Along the way you will meet two-stage least squares, weak instruments, the local average treatment effect, and the practical judgment both designs demand.
By the end of this module you will be able to
- State the two conditions for a valid instrument and explain why each matters.
- Compute an IV estimate as a ratio of reduced form to first stage, and describe two-stage least squares.
- Diagnose weak instruments with the first-stage F-statistic and explain their consequences.
- Interpret an IV estimate as a local average treatment effect for compliers, including in experiments with noncompliance.
- Explain the logic, assumptions and practical choices of a regression discontinuity design.
What this module covers
- The idea of an instrument
- The IV estimator and two-stage least squares
- Weak and invalid instruments
- Whose effect does IV estimate?
- Regression discontinuity
- Problem set with step-by-step solutions
- Module quiz
Lesson 15.1 Free lesson
The idea of an instrument
Suppose Y = β₀ + β₁X + u, but X is endogenous: correlated with u because of omitted variables, simultaneity or measurement error (Module 13). OLS is biased. An instrumental variable Z offers a way out if it satisfies two conditions:
- Relevance: Z is correlated with X. It actually moves the variable you care about. This can be checked in the data.
- Exogeneity (often called the exclusion restriction): Z is unrelated to u. It affects Y only through X, and is unrelated to the omitted factors. This can’t be fully tested; it has to be argued.
The idea: the part of X that moves with Z is free of the confounding, because Z itself is. Use only that part to estimate β₁.
Worked example: Demand for fish
Regressing the quantity of fish sold on its price at a fish market mixes supply and demand (simultaneity). To trace out the demand curve, you need something that shifts supply but not demand.
Stormy weather at sea is a classic choice: storms make fishing harder, cutting supply and raising prices, but don’t directly change how much fish shoppers in the city want.
Studies of New York’s Fulton Fish Market used weather at sea as an instrument for price and estimated demand elasticities of roughly −1. The weather instrument isolates price changes caused by supply shocks, which move the market along the demand curve.
Natural sources of instruments
| Endogenous X | Instrument Z | Why it might work |
|---|---|---|
| Military service | Vietnam-era draft lottery number | Random lottery shifted the chance of serving |
| Price of fish | Weather at sea | Shifts supply, not demand |
| Taking up a program | Random offer of the program | Offer was randomized; affects outcomes only through take-up |
| Years of schooling | Distance to the nearest college | Shifts the cost of attending (exogeneity debated) |
Common mistake
Choosing an instrument because it is strongly correlated with X and then assuming the exclusion restriction. Relevance is easy to show; exogeneity is the hard part, and it needs a convincing story for why Z has no other path to Y.
Key ideas
- An instrument Z must be relevant (correlated with X) and exogenous (affects Y only through X).
- Relevance is testable; exogeneity must be argued from how Z was determined.
- IV uses only the variation in X driven by Z, which is free of the confounding.
- Good instruments often come from lotteries, rules, weather and other external shocks.
Practice questions: Instrumental variables and regression discontinuity
Try these, then open each answer to check your work.
- 1.A valid instrument must be:
- Correlated with X and unrelated to the error term
- Uncorrelated with both X and Y
- Correlated with the error term in Y
- Strongly correlated with Y only
Show answer
Answer: A. Relevance and exogeneity (exclusion).
- 2.The reduced form effect of Z on Y is 0.6 and the first stage effect of Z on X is 0.3. The IV estimate is:
- 0.18
- 0.5
- 0.9
- 2
Show answer
Answer: D. 0.6/0.3 = 2.
- 3.In two-stage least squares, the first stage regresses:
- Y on X and the controls
- X on the instrument (and controls)
- Y on the instrument directly
- The residuals on X
Show answer
Answer: B. Stage 1 predicts X from the instrument.
Problems with step-by-step solutions
- 4.State the two conditions for a valid instrument and say which can be checked in the data.
Show step-by-step solution
- Relevance: Z is correlated with X. Checkable with the first-stage regression and its F-statistic.
- Exogeneity (exclusion): Z is unrelated to the error, affecting Y only through X. Not directly testable; it must be argued.
- 5.A researcher uses rainfall as an instrument for agricultural income to estimate the effect of income on children’s school attendance in farming villages. Give one argument for and one against the exclusion restriction.
Show step-by-step solution
- For: rainfall is determined by nature, unrelated to families’ preferences for schooling, and shifts farm income.
- Against: heavy rain could directly affect attendance (flooded roads) or children’s health, a path from Z to Y that doesn’t go through income.
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.