What does Regression Discontinuity at Membership Tiers conclude, in numbers, about “Local Linear Regression: Triangular-Kernel Weighted Least Squares, Boundary Bias and an Effect That Holds Only at the Threshold”?

Answer: At the line of 60 the discontinuity estimate is 2.764 and the true value at the line is 2.5769. Yet the average benefit over all VIPs is 3.063, and over all customers (if everyone had the benefits) it is 2.001; all three differ. Moving the line to 70 raises the average stickiness of the customers at the line, the true value becomes 3.1538, and the discontinuity estimate on that sample is 2.904. Meanwhile the share of customers who reach the line falls from 0.2488 to 0.0823.

Scope of the numbers: Parameters are illustrative; all calculations are generated by the book's programs. This is general analysis, not individualised business advice, and the book neither recommends nor supplies misleading threshold copy designed to provoke top-ups.

中文版

Data table

The numbers below are printed verbatim by the chapter's Python program and can be reproduced by running it. standard-library Python onlyprinted values that match the answer: 0.0823, 0.2488, 2.001, 2.5769, 2.764, 2.904

quantityvalue
RD estimate at line 602.764
true benefit at x = 602.5769
true benefit, average over VIPs3.063
true benefit, average over everyone2.001
true benefit at x = 703.1538
RD estimate if the line were at 702.904
VIP share with line at 60 / at 700.2488 / 0.0823
Show the full program
# Chapter 2. p23: what a sharp RD identifies, and what it does not.
# Benefit is heterogeneous: tau(u) = 2 + u, so the average benefit of
# customers with spend x is 2 + (12 / 208) (x - 50). The RD jump at the
# line estimates only E[tau | x = c]. We compare it with the average
# benefit over all VIPs, over all customers, and with the jump that a
# line moved to 70 would show (fresh sample, seed 20261123). Data as in
# p11 (seed 20261113); triangular kernel, h = 8. Illustrative.
import math
import random

H = 8.0


def draw(rng, n, c, sel=1.0):
    rows = []
    for _ in range(n):
        u = rng.gauss(0.0, 1.0)
        x = 50.0 + 12.0 * u + 8.0 * rng.gauss(0.0, 1.0)
        d = 1 if x >= c else 0
        g = 0.15 * (x - c) + 0.0003 * (x - c) ** 3
        y = 20.0 + 6.0 * sel * u + g + (2.0 + u) * d
        rows.append((x, y + rng.gauss(0.0, 3.0), u))
    return rows


def intercept(pts, c, h):
    xs, ys, ws = [], [], []
    for x, y in pts:
        t = abs(x - c) / h
        if t < 1.0:
            xs.append(x - c)
            ys.append(y)
            ws.append(1.0 - t)
    s0 = math.fsum(ws)
    s1 = math.fsum(w * x for w, x in zip(ws, xs))
    s2 = math.fsum(w * x * x for w, x in zip(ws, xs))
    t0 = math.fsum(w * y for w, y in zip(ws, ys))
    t1 = math.fsum(w * x * y for w, x, y in zip(ws, xs, ys))
    return (s2 * t0 - s1 * t1) / (s0 * s2 - s1 * s1)


def rd(rows, c, h):
    left = [(r[0], r[1]) for r in rows if r[0] < c]
    right = [(r[0], r[1]) for r in rows if r[0] >= c]
    return intercept(right, c, h) - intercept(left, c, h)


def mean(v):
    return math.fsum(v) / len(v)


if __name__ == "__main__":
    rows = draw(random.Random(20261113), 20000, 60.0)
    rows70 = draw(random.Random(20261123), 20000, 70.0)
    print("quantity                               value")
    print("RD estimate at line 60                {:7.3f}".format(
        rd(rows, 60.0, H)))
    print("true benefit at x = 60                {:7.4f}".format(
        2.0 + 12.0 / 208.0 * 10.0))
    print("true benefit, average over VIPs       {:7.3f}".format(
        mean([2.0 + r[2] for r in rows if r[0] >= 60.0])))
    print("true benefit, average over everyone   {:7.3f}".format(
        mean([2.0 + r[2] for r in rows])))
    print("true benefit at x = 70                {:7.4f}".format(
        2.0 + 12.0 / 208.0 * 20.0))
    print("RD estimate if the line were at 70    {:7.3f}".format(
        rd(rows70, 70.0, H)))
    print("VIP share with line at 60 / at 70   {:.4f} / {:.4f}".format(
        mean([1.0 if r[0] >= 60.0 else 0.0 for r in rows]),
        mean([1.0 if r[0] >= 70.0 else 0.0 for r in rows70])))

Single source and citation

Fan, Y. (2026). Regression-Discontinuity Designs at Membership-Tier Thresholds: Local Causal Identification on Either Side of a Spend-Based Upgrade Line (Version 1.0.0), Chapter 2: Local Linear Regression: Triangular-Kernel Weighted Least Squares, Boundary Bias and an Effect That Holds Only at the Threshold. 5D Library. DOI pending

DOI pending · monograph page goes live after publication · 5DL-B-303 · v1.0.0 · CC-BY-NC-ND-4.0

BibTeX
@book{fan2026303,
  author    = {Fan, Yafu},
  title     = {Regression-Discontinuity Designs at Membership-Tier Thresholds: Local Causal Identification on Either Side of a Spend-Based Upgrade Line},
  year      = {2026},
  publisher = {5D Library},
  edition   = {1.0.0},
  note      = {DOI pending}
}

Other chapter answers in this book