- A regression discontinuity design (RDD) estimates a causal effect when treatment depends on whether a score crosses a cut-off, such as a scholarship for an exam score of 70 or more.
- People just above and just below the cut-off are alike, so the jump in the outcome at the cut-off is the effect of the treatment there.
- In a sharp RDD everyone above the cut-off is treated; in a fuzzy RDD the chance of treatment jumps, and the effect is the jump in the outcome divided by the jump in take-up.
- Estimate the jump with local linear regression on each side, within a bandwidth, and show that the answer does not depend on one bandwidth.
- Check validity: no bunching of the score at the cut-off (the McCrary density test) and no jumps in characteristics fixed before treatment.
The case: did the scholarship raise grades?
A university gives a scholarship to every student who scores 70 or more on its entrance exam, and to nobody below 70. A year later, scholarship holders have an average grade point average (GPA) of 3.098; everyone else has 2.027. Did the scholarship raise GPA by 1.071 points?
No. Scholarship holders scored higher on the exam, and stronger students earn higher grades with or without a scholarship. The raw gap mixes the scholarship’s effect with differences in ability. This is selection bias.
But students who scored 69.8 and 70.2 are, for practical purposes, the same; a few marks on one day decided who got the money. Comparing them at the cut-off is almost as good as a randomised experiment. That is regression discontinuity.
We use the Econometrics Made Simple companion file scholarship_rd.csv: 2,500 students, simulated with a true jump of 0.25 GPA points at 70.
The idea of a regression discontinuity
In a sharp design, the effect at the cut-off is the difference between the two limits of the average outcome:
The key assumption is continuity: without the treatment, average outcomes would pass smoothly through the cut-off. Lee (2008) showed this is credible when chance plays some part in each score: who lands just either side is then as good as random, and pre-treatment characteristics should balance, which makes the design testable.[3]
Two famous examples
Close elections (Lee 2008). Does holding a seat help a party win it again? Lee used US House of Representatives elections from 1946 to 1998. The running variable is the Democratic vote-share margin, and the cut-off is zero: a margin just above zero means a narrow win, just below means a narrow loss. The jump at zero in the chance of winning the next election measures the incumbency advantage, which Lee found to be large.[3]
Maimonides’ rule (Angrist and Lavy 1999). Israeli public schools cap class size at 40, a rule from the twelfth-century scholar Maimonides, so class size drops sharply when enrolment in a grade reaches 41, 81 and so on. Angrist and Lavy used these drops as instruments for class size. They found that smaller classes raised test scores for fourth and fifth graders, though not for third graders.[5] Because schools did not follow the rule exactly, this is a fuzzy design.
Sharp vs fuzzy RDD
| Sharp RDD | Fuzzy RDD | |
|---|---|---|
| Rule | Everyone with \(X \ge c\) is treated, nobody below | The probability of treatment jumps at \(c\), but not from 0 to 1 |
| Example | Scholarship for an exam score of 70 or more | Class-size cap at 40, followed only partly |
| Estimate | Jump in the outcome at \(c\) | Jump in the outcome ÷ jump in the treatment probability |
| Estimator | Local linear regression | Two-stage least squares, with “above the cut-off” as the instrument |
| Effect for | Units at the cut-off | Compliers at the cut-off: those whose treatment is changed by crossing it |
The fuzzy estimate is an instrumental variables estimate, with crossing the cut-off as the instrument.
Estimating the jump: local linear regression and bandwidth
We cannot observe students exactly at 70, so we fit a line on each side and compare where the two lines meet the cut-off. Define the centred score \(x = \text{exam} – 70\) and the treatment dummy \(D = 1\) if \(x \ge 0\). Within a bandwidth \(h\), estimate:
The interaction lets the slope differ on each side. Because \(x\) is centred at the cut-off, \(\tau\) is exactly the gap between the two lines at 70. Lee and Lemieux (2010) and Imbens and Lemieux (2008) recommend this local linear approach, often with a triangular kernel that gives more weight to observations near the cut-off.[1][2]
The bandwidth \(h\) sets a trade-off. A narrow bandwidth uses the most similar students (low bias) but fewer of them (more noise). A wide one is precise but relies on the straight line holding far from the cut-off. Data-driven methods balance the two; always show several bandwidths.
Estimate the effect of the scholarship with a local linear regression within 10 points of the cut-off. This is the textbook’s Python script, with HC1 robust standard errors:
import pandas as pd
import statsmodels.formula.api as smf
rd = pd.read_csv("data/scholarship_rd.csv")
rd["x"] = rd.exam - 70 # centre the running variable at the cut-off
# Local linear regression within 10 points of 70
h = 10
near = rd[rd.x.abs() <= h]
m = smf.ols("gpa ~ scholarship + x + scholarship:x", data=near).fit(cov_type="HC1")
print(m.summary().tables[1])
print("students used:", len(near))
# Sensitivity to the bandwidth
print("\nbandwidth n jump se")
for h in [5, 10, 15, 20, 50]:
s = rd[rd.x.abs() <= h]
f = smf.ols("gpa ~ scholarship + x + scholarship:x", data=s).fit(cov_type="HC1")
print(f"{h:>9} {len(s):>5} {f.params['scholarship']:6.3f} {f.bse['scholarship']:6.3f}")
Real output:
=================================================================================
coef std err z P>|z| [0.025 0.975]
---------------------------------------------------------------------------------
Intercept 2.6007 0.028 94.193 0.000 2.547 2.655
scholarship 0.2639 0.043 6.091 0.000 0.179 0.349
x 0.0354 0.005 7.338 0.000 0.026 0.045
scholarship:x -0.0044 0.008 -0.568 0.570 -0.020 0.011
=================================================================================
students used: 1225
bandwidth n jump se
5 641 0.258 0.062
10 1225 0.264 0.043
15 1683 0.235 0.037
20 2038 0.220 0.033
50 2500 0.214 0.028
Conclusion: for students near a score of 70, the scholarship raised first-year GPA by about 0.26 points, a quarter of the 1.071 raw gap. The rest of the raw gap was selection.
Is the estimate sensitive to the bandwidth? Use the bandwidth table above and a data-driven bandwidth from the rdrobust package (Python version; the same command exists in R and Stata).
Mass points detected in the running variable.
Call: rdrobust
Sharp RD estimates using local polynomial regression.
Number of Observations: 2500
Polynomial Order Est. (p): 1
Polynomial Order Bias (q): 2
Kernel: Triangular
Bandwidth Selection: mserd
Var-Cov Estimator: NN
Left Right
------------------------------------------------
Number of Observations 1820 680
Number of Unique Obs. 371 204
Number of Effective Obs. 448 337
Bandwidth Estimation 6.557 6.557
Bandwidth Bias 10.413 10.413
rho (h/b) 0.63 0.63
Method Coef. S.E. z-stat P>|z| 95% CI
-------------------------------------------------------------------------
Conventional 0.248 0.061 4.076 4.586e-05 [0.128, 0.367]
Robust - - 3.265 1.096e-03 [0.095, 0.379]
density test (jackknife): t = -0.557 p = 0.578
Conclusion: every estimate is positive and significant, and the narrow-bandwidth estimates sit close to the true 0.25.
In R: library(rdrobust); rdrobust(y = rd$gpa, x = rd$exam, c = 70). In Stata: ssc install rdrobust, then rdrobust gpa exam, c(70).
Checking the design: the McCrary density test and balance
Continuity fails if people can manipulate the running variable. If students on 68 can get re-marks until they reach 70, those just above include the most persistent students. The sign is bunching: too few just below the cut-off, too many just above.
McCrary (2008) proposed a formal test of whether the density of the running variable jumps at the cut-off. He applied it to US House elections, where he found no sign of sorting, and to roll-call votes in the House, where he did.[4] Cattaneo, Jansson and Ma (2020) later developed a local polynomial density estimator that is now widely used for the same test, through the rddensity package.[6]
For the scholarship data:
- Simple count. 131 students scored between 68 and 70, and 111 between 70 and 72. If the density were flat, each of these 242 students would be equally likely to fall on either side; a binomial test of 111 out of 242 gives p = 0.222. There is no excess just above 70.
- Density test. rddensity gives t = −0.557 and p = 0.578. No evidence of a jump in the density.
- Balance. Characteristics fixed before the exam should not jump at 70. Running the same local linear regression with each as the outcome gives a jump of 0.329 (thousand dollars) in parents’ income (p = 0.849) and 0.066 in the share female (p = 0.255). No discontinuities.
A placebo cut-off, such as 60, where nothing happens, should show no significant “jump”.
Fuzzy RDD: when not everyone complies
A seeded simulation (numpy seed 42, 4,000 people) offers a training programme to everyone with a score of 50 or more. Take-up is about 20% below the cut-off and 80% above, and people with more motivation (unobserved) are more likely to take part and also do better anyway. The true effect of the programme is 2. Estimate it within a bandwidth of 15.
n in bandwidth: 1183
jump in outcome: 1.1258
jump in take-up: 0.497
ratio (Wald): 2.2654
Parameter Estimates
==============================================================================
Parameter Std. Err. T-stat P-value Lower CI Upper CI
------------------------------------------------------------------------------
Intercept 12.447 0.2145 58.023 0.0000 12.027 12.867
x 0.0383 0.0167 2.2984 0.0215 0.0056 0.0710
ax -0.0116 0.0243 -0.4767 0.6336 -0.0592 0.0361
d 2.2654 0.4112 5.5093 0.0000 1.4594 3.0713
==============================================================================
naive OLS of y on d: 2.6615
Conclusion: the fuzzy RD estimate of 2.27 is close to the true 2; the naive estimate overstates it by a third. It applies to compliers at the cut-off.
Learn the full toolkit
RDD sits alongside randomised trials, difference-in-differences and instrumental variables. The Econometrics Made Simple textbook works through all of them on its companion data, including this scholarship file, with Python, R and Stata output, and the Econometrics Made Simple Practice Questions book has 1,161 questions with worked answers.
Practice questions
EasyQ1. A state pension starts at exactly 65 for everyone. A researcher studies its effect on health using people aged 60 to 70. Name the running variable, the cut-off and the treatment, and say whether the design is sharp or fuzzy. Show worked answer
Cut-off: 65.
Treatment: receiving the state pension.
Sharp, because everyone aged 65 or more receives it and nobody younger does. (If people could delay or claim early, it would become fuzzy.)
EasyQ2. In the local linear output above, the intercept is 2.6007 and the scholarship coefficient is 0.2639. What are the fitted GPAs just below and just above 70? Show worked answer
Just above (x = 0, scholarship = 1): 2.6007 + 0.2639 = 2.8646.
The gap of 0.2639 is the estimated effect of the scholarship at the cut-off.
MediumQ3. At a cut-off, the employment rate jumps by 0.06 and the probability of joining a training programme jumps by 0.40. Estimate the effect of the programme on employment and say for whom it applies. Show worked answer
Joining the programme raises the probability of employment by 15 percentage points.
It applies to compliers near the cut-off: people who join because they crossed it and would not have joined otherwise.
MediumQ4. Suppose 90 students scored between 68 and 70 and 150 between 70 and 72. What does this suggest, and why does it matter for the RDD? Show worked answer
A binomial test of 150 out of 240 with probability 0.5 gives a p-value of about 0.0001, so equality is rejected, so this suggests bunching: some students may have pushed their scores over 70 (re-marks, retakes).
Those just above may then differ (be more persistent) from those just below, breaking continuity and biasing the jump.
ExamQ5. Using the scholarship results in this post: (a) explain why the raw gap of 1.071 GPA points is not the effect of the scholarship; (b) explain why the local linear estimate of 0.264 (bandwidth 10) is more credible, and what the bandwidth table shows; (c) describe two checks that support the design and the evidence for each; (d) state who the estimate applies to. [10 marks] Show worked answer
(b) Students just either side of 70 are very similar; the lines on each side absorb the smooth effect of the score, so the gap at 70 isolates the scholarship. [2] Across bandwidths 5 to 50 the jump is 0.214 to 0.264 and always significant: robust. [2]
(c) No manipulation: 131 students at 68–70 vs 111 at 70–72, binomial p = 0.222; density test p = 0.578. [1 + 1] Balance: no jump in parents’ income (p = 0.849) or share female (p = 0.255). [1]
(d) Students with exam scores near 70; the effect may differ for students far from the cut-off. [1]
Frequently asked questions
What is the difference between RDD and difference-in-differences?
RDD compares units just either side of a cut-off in a score. Difference-in-differences compares changes over time in a treated and a control group, relying on parallel trends.
How do I choose the bandwidth?
Use a data-driven bandwidth, such as the one rdrobust chooses, for your main estimate, then report several narrower and wider ones.
Should I add control variables to an RDD?
They are not needed, because the design balances them at the cut-off, but pre-treatment controls can improve precision. If they change the estimate a lot, question the design.
Can I use RDD in my dissertation?
Yes, if you have a rule with a cut-off and enough observations near it: exam thresholds, age limits, income-based eligibility or close elections. Check for bunching early.
References
- Lee, D. S. and Lemieux, T. (2010). Regression discontinuity designs in economics. Journal of Economic Literature, 48(2), 281–355. https://doi.org/10.1257/jel.48.2.281
- Imbens, G. W. and Lemieux, T. (2008). Regression discontinuity designs: a guide to practice. Journal of Econometrics, 142(2), 615–635. RePEc record
- Lee, D. S. (2008). Randomized experiments from non-random selection in U.S. House elections. Journal of Econometrics, 142(2), 675–697. RePEc record
- McCrary, J. (2008). Manipulation of the running variable in the regression discontinuity design: a density test. Journal of Econometrics, 142(2), 698–714. RePEc record
- Angrist, J. D. and Lavy, V. (1999). Using Maimonides’ rule to estimate the effect of class size on scholastic achievement. Quarterly Journal of Economics, 114(2), 533–575. RePEc record
- Cattaneo, M. D., Jansson, M. and Ma, X. (2020). Simple local polynomial density estimators. Journal of the American Statistical Association, 115(531), 1449–1455. RePEc record

