Instant PDF download, name-and-email checkout. Complete Book Bundle: every Economics, Statistics, Mathematics, Econometrics and Research Methods book
Econometrics

Regression Discontinuity Design Explained: Sharp vs Fuzzy RDD with Examples

Regression discontinuity design explained: sharp vs fuzzy RDD, bandwidth, local linear regression and the McCrary test, with a worked scholarship example.

In 30 seconds
  • 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

Key termRegression discontinuity design (RDD): a method that estimates the effect of a treatment assigned by a rule of the form “treated if \(X \ge c\)”. \(X\) is the running variable (or forcing variable) and \(c\) is the cut-off. If everything else that affects the outcome changes smoothly with \(X\), any jump in the outcome at \(c\) is caused by the treatment.[1]

In a sharp design, the effect at the cut-off is the difference between the two limits of the average outcome:

\[ \tau_{\text{SRD}} = \lim_{x \downarrow c} E[Y \mid X = x] \; – \; \lim_{x \uparrow c} E[Y \mid X = x] \]

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]

Econometrics Made Simple textbook coverEconometrics Made Simple explains regression discontinuity and other causal methods with real data and Python, R and Stata code.Get the textbook · $15

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 RDDFuzzy RDD
RuleEveryone with \(X \ge c\) is treated, nobody belowThe probability of treatment jumps at \(c\), but not from 0 to 1
ExampleScholarship for an exam score of 70 or moreClass-size cap at 40, followed only partly
EstimateJump in the outcome at \(c\)Jump in the outcome ÷ jump in the treatment probability
EstimatorLocal linear regressionTwo-stage least squares, with “above the cut-off” as the instrument
Effect forUnits at the cut-offCompliers 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.

\[ \tau_{\text{FRD}} = \frac{\lim_{x \downarrow c} E[Y \mid X = x] – \lim_{x \uparrow c} E[Y \mid X = x]}{\lim_{x \downarrow c} E[D \mid X = x] – \lim_{x \uparrow c} E[D \mid X = x]} \]

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:

\[ \text{gpa}_i = \alpha + \tau D_i + \beta_1 x_i + \beta_2 (D_i \times x_i) + u_i, \qquad |x_i| \le h \]

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.

Worked example

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
Step 1Just below 70, the fitted GPA is the intercept: 2.601.
Step 2Just above 70, it is \(2.6007 + 0.2639 = 2.865\).
Step 3The jump is 0.264 GPA points (robust standard error 0.043). The 95% interval is 0.179 to 0.349, which contains the true 0.25.

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.

First-year GPA around the scholarship cut-off (mean GPA in 2-point bins)
No scholarship (below 70)Scholarship (70 or more)Local linear fit, bandwidth 10
1.52.02.53.03.5505560657075808590jump = 0.264cut-off: exam = 70Entrance exam score
Figure 1. Binned means of GPA by entrance exam score, with separate local linear regressions within 10 points of the cut-off. The estimated jump at 70 is 0.264 (robust SE 0.043). Companion scholarship data (simulated, true jump 0.25), n = 2,500.
Worked example

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
Step 1Across bandwidths of 5, 10, 15, 20 and 50 points, the jump ranges from 0.214 to 0.264. Narrow bandwidths have larger standard errors (0.062 at h = 5, 0.028 at h = 50).
Step 2The widest bandwidths give smaller estimates: GPA rises along a gently curved line, so straight lines fitted far from 70 miss the curve (the bias side of the trade-off).
Step 3rdrobust picks a bandwidth of 6.557 points on each side with a triangular kernel and gives a conventional estimate of 0.248 (standard error 0.061). Its bias-corrected robust 95% interval is 0.095 to 0.379.

Conclusion: every estimate is positive and significant, and the narrow-bandwidth estimates sit close to the true 0.25.

Econometrics Practice Questions coverPractise reading real output with the Practice Questions book: 1,161 questions, all fully worked.Get 1,161 questions · $9

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

Worked example

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
Step 1Jump in the outcome at the cut-off (the reduced form): 1.1258.
Step 2Jump in the probability of taking part (the first stage): 0.4970. Its t statistic is about 10.1 (F about 103): a strong instrument.
Step 3Wald ratio: \(1.1258 / 0.4970 = 2.265\). Two-stage least squares with “above” as the instrument gives the same 2.265, with robust standard error 0.411 and 95% interval 1.459 to 3.071.
Step 4A naive regression of the outcome on participation gives 2.662, biased upwards because motivated people select into the programme.

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.

Common mistakeReading the RD estimate as the effect for everyone. It is the effect near the cut-off. A scholarship may matter more for a student scoring 50, or less for one scoring 95; RD says nothing about them. Write “for students near the threshold”.
Common mistakeReporting one bandwidth, or picking the bandwidth that gives the most significant result. Choose the main bandwidth by a stated rule (such as the data-driven rdrobust bandwidth), and show the estimate across a range of bandwidths. Also avoid fitting high-order polynomials to the whole sample: they can create or hide a jump. Local linear fits near the cut-off are the safer default.
Exam tipCover five points: running variable and cut-off; sharp or fuzzy; continuity in words (“students just either side are alike”); estimation (local linear regression, bandwidth); two validity checks (no bunching, no covariate jumps). Finish with who the estimate applies to.

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.

Econometrics Made Simple bundle coverMaster causal inference, from RCTs to RDD, with both Econometrics Made Simple books for $19.Both books · $19

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
Running variable: age.
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 below (x = 0, scholarship = 0): 2.6007.
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
This is a fuzzy RDD. Effect = jump in outcome ÷ jump in take-up = 0.06 / 0.40 = 0.15.
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
With a smooth density we would expect roughly equal numbers. Here 150 of 240 (62.5%) are just above the cut-off.
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
(a) Holders scored 70+; ability raises both exam scores and GPA, so the 1.071 gap mixes the scholarship effect with ability: selection bias. [2]
(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

  1. 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
  2. Imbens, G. W. and Lemieux, T. (2008). Regression discontinuity designs: a guide to practice. Journal of Econometrics, 142(2), 615–635. RePEc record
  3. Lee, D. S. (2008). Randomized experiments from non-random selection in U.S. House elections. Journal of Econometrics, 142(2), 675–697. RePEc record
  4. 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
  5. 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
  6. 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
Econometrics Made Simple Complete Bundle: textbook and practice book
This topic has a full chapter in Econometrics Made Simple, with Python, R and Stata code and 1,161 worked practice questions in the bundle.Econometrics Made Simple Complete Bundle — Textbook + 1,161 Practice Questions
Get it for $19
E

The EconTutorials team writes clear, exam-focused lessons in economics and statistics for A-Level, IB, AP and university students, with more than 13 years of classroom teaching behind every guide and book in the Made Simple series.