The full academy launches January 2027. Join the waitlist for the $179 founding price.
Waldbauer Academy of Economics

Courses › Statistics and Econometrics

Second and third year · Module 15 of 15

Instrumental variables and regression discontinuity

Instruments and two-stage least squares, weak instruments, local effects, and regression discontinuity designs around a cutoff.

By Maximus S. Waldbauer · About 3 hours, including the problem set and quiz.

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

What this module covers

  1. The idea of an instrument
  2. The IV estimator and two-stage least squares
  3. Weak and invalid instruments
  4. Whose effect does IV estimate?
  5. Regression discontinuity
  6. Problem set with step-by-step solutions
  7. 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:

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 XInstrument ZWhy it might work
Military serviceVietnam-era draft lottery numberRandom lottery shifted the chance of serving
Price of fishWeather at seaShifts supply, not demand
Taking up a programRandom offer of the programOffer was randomized; affects outcomes only through take-up
Years of schoolingDistance to the nearest collegeShifts 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. 1.A valid instrument must be:
    1. Correlated with X and unrelated to the error term
    2. Uncorrelated with both X and Y
    3. Correlated with the error term in Y
    4. Strongly correlated with Y only
    Show answer

    Answer: A. Relevance and exogeneity (exclusion).

  2. 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:
    1. 0.18
    2. 0.5
    3. 0.9
    4. 2
    Show answer

    Answer: D. 0.6/0.3 = 2.

  3. 3.In two-stage least squares, the first stage regresses:
    1. Y on X and the controls
    2. X on the instrument (and controls)
    3. Y on the instrument directly
    4. The residuals on X
    Show answer

    Answer: B. Stage 1 predicts X from the instrument.

Problems with step-by-step solutions

  1. 4.State the two conditions for a valid instrument and say which can be checked in the data.
    Show step-by-step solution
    1. Relevance: Z is correlated with X. Checkable with the first-stage regression and its F-statistic.
    2. Exogeneity (exclusion): Z is unrelated to the error, affecting Y only through X. Not directly testable; it must be argued.
  2. 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
    1. For: rainfall is determined by nature, unrelated to families’ preferences for schooling, and shifts farm income.
    2. 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.