0/70 completed
Econometrics Interactive

Instrumental Variables

Isolate causal effects when there's confounding. Use an "instrument" that affects treatment but not outcome directlyโ€”revealing true causal impact.

๐Ÿ“Š The Endogeneity Problem

When X and Y share a common cause (confounder), OLS is biased. We can't tell if X causes Y or if both are driven by the confounder.

Example

Does advertising increase revenue, or do successful companies advertise more? "Success" is a confounder affecting both.

The IV Solution

Find Z that:

  • Relevance: Z affects X
  • Exclusion: Z only affects Y through X
  • Independence: Z uncorrelated with confounder

Parameters

Instrument Strength 0.7
0.1 1
Confounding Bias 5
0 10
Sample Size 100
50 200

๐Ÿ“Š Estimates

True Effect 2.00
OLS (biased) 4.38
Bias: 2.38
IV (unbiased) 2.78
Error: 0.78

IV Diagnostics

First Stage F-stat
140.9
โœ“ Strong instrument
OLS Bias
+119%
Overestimating effect

โœ“ Good setup. IV is closer to truth than OLS.

Causal Diagram

Z
Instrument
โ†’
X
Treatment
โ†’
Y
Outcome
U
Confounder (unobserved)

๐Ÿˆ Betting IV Examples

Promo Effect

Q: Do promos increase LTV?

IV: Random promo assignment (A/B test)

Line Movement

Q: Do sharp bets cause line moves?

IV: Sharp bettor availability (travel schedule)

Live Betting

Q: Does live betting increase engagement?

IV: Staggered state rollout

R Code Equivalent

# Instrumental variables with 2SLS
library(AER)

# Simulate data
set.seed(42)
n <- 100
confounder <- rnorm(n, 0, 10)
z <- rnorm(n, 50, 15)  # Instrument
x <- 10 + 0.7 * z + 0.8 * confounder + rnorm(n, 0, 5)
y <- 100 + 2 * x + 5 * confounder + rnorm(n, 0, 20)

# OLS (biased)
ols_model <- lm(y ~ x)
cat("OLS estimate:", coef(ols_model)["x"], "\n")

# 2SLS (unbiased)
iv_model <- ivreg(y ~ x | z)
cat("IV estimate:", coef(iv_model)["x"], "\n")

# First stage F-stat
first_stage <- lm(x ~ z)
cat("First stage F:", summary(first_stage)$fstatistic[1], "\n")

โœ… Key Takeaways

  • โ€ข IV solves endogeneity (confounding)
  • โ€ข Need valid instrument: affects X, not Y directly
  • โ€ข Check first-stage F greater than 10 (strong instrument)
  • โ€ข 2SLS: regress X on Z, then Y on predicted X
  • โ€ข Common IVs: randomization, policy changes
  • โ€ข IV estimate has higher variance than OLS

Pricing Models & Frameworks Tutorial

Built for mastery ยท Interactive learning