What does Regression to the Mean and the Cover Jinx conclude, in numbers, about “Closing the Loop: Annual Reviews by Shrinkage Ranking, Copy without Causal Overstatement, and a Pre-registered Plan”?

Answer: Chapter 8 gives an annual review by shrinkage ranking (the first-placed store in the example has only 0.634 probability of a top-three finish), a copy audit, a pre-registered plan and the distilled Shrinkage Ranking Calculator. Marked boxes separate published evidence, runnable Python calculations (22 programs), classical sources and the author's hypotheses.

Scope of the numbers: Marked boxes separate published evidence, runnable Python calculations (22 programs), classical sources and the author's hypotheses.

中文版

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.634

pooled rate 0.4461, between-store sd tau 0.0683
storenrawBshrunk80% intervalrank raw>newP(top3)
S11450.5780.4590.5070.442 to 0.5711 >10.634
S071200.5170.6940.4950.447 to 0.5433 >20.555
S103000.5000.8500.4920.458 to 0.5265 >30.525
S01400.5500.4300.4910.425 to 0.5572 >40.507
S02600.5000.5310.4750.415 to 0.5354 >50.361
S042500.4800.8250.4740.437 to 0.5116 >60.285
S127000.4600.9300.4590.436 to 0.4827 >70.071
S039000.4500.9440.4500.429 to 0.4708 >80.023
S065000.4300.9040.4320.404 to 0.4599 >90.007
S0815000.4200.9660.4210.405 to 0.43710 > 100.000
S09800.3750.6010.4030.348 to 0.45911 > 110.021
S05350.2570.3980.3710.303 to 0.43912 > 120.011
Show the full program
# Chapter 8. p81: An annual review by shrinkage ranking, end to end.
# Twelve stores, each with n customers this year and k of them buying
# again (illustrative counts). Raw rate k / n. Empirical Bayes:
#   pooled rate m = sum k / sum n,  se_i^2 = m (1 - m) / n_i,
#   tau^2 = max(var(raw) - mean(se^2), small floor),
#   B_i = tau^2 / (tau^2 + se_i^2),  shrunk_i = m + B_i (raw_i - m),
#   80 % interval: shrunk_i +- 1.2816 sqrt(B_i se_i^2).
# P(top 3) by 20,000 draws from the posteriors (fixed seed). The same
# functions are in distill/tool.py.
# 年度评估:十二家门店的复购率,按收缩估计排名并给出前三名概率。
import math
import random

STORES = [("S01", 40, 22), ("S02", 60, 30), ("S03", 900, 405),
          ("S04", 250, 120), ("S05", 35, 9), ("S06", 500, 215),
          ("S07", 120, 62), ("S08", 1500, 630), ("S09", 80, 30),
          ("S10", 300, 150), ("S11", 45, 26), ("S12", 700, 322)]


def shrink(rows):
    m = math.fsum(k for _, _, k in rows) / math.fsum(n for _, n, _ in rows)
    raw = [k / n for _, n, k in rows]
    se2 = [m * (1 - m) / n for _, n, _ in rows]
    mr = math.fsum(raw) / len(raw)
    var = math.fsum((v - mr) ** 2 for v in raw) / (len(raw) - 1)
    tau2 = max(var - math.fsum(se2) / len(se2), 1e-6)
    out = []
    for (name, n, k), r, s2 in zip(rows, raw, se2):
        b = tau2 / (tau2 + s2)
        out.append((name, n, r, b, m + b * (r - m), math.sqrt(b * s2)))
    return m, math.sqrt(tau2), out


def top_prob(out, top=3, draws=20000, seed=None):
    rng = random.Random(20261112 if seed is None else seed)
    hits = [0] * len(out)
    for _ in range(draws):
        x = [rng.gauss(o[4], o[5]) for o in out]
        for i in sorted(range(len(x)), key=lambda j: -x[j])[:top]:
            hits[i] += 1
    return [h / draws for h in hits]


if __name__ == "__main__":
    m, tau, out = shrink(STORES)
    raw_rank = sorted(range(len(out)), key=lambda i: (-out[i][2], i))
    new_rank = sorted(range(len(out)), key=lambda i: (-out[i][4], i))
    pt = top_prob(out)
    print("pooled rate {:.4f}, between-store sd tau {:.4f}".format(m, tau))
    print("store     n    raw    B      shrunk  80% interval    rank"
          " raw>new  P(top3)")
    for i in new_rank:
        name, n, r, b, z, sd = out[i]
        print("{:<4} {:>5}  {:.3f}  {:.3f}  {:.3f}   {:.3f} to {:.3f}"
              "    {:>2} > {:>2}   {:.3f}".format(
                  name, n, r, b, z, z - 1.2816 * sd, z + 1.2816 * sd,
                  raw_rank.index(i) + 1, new_rank.index(i) + 1, pt[i]))

Single source and citation

Fan, Y. (2026). Regression to the Mean and the Cover Jinx: Posterior Calibration of Fortune Reports and Serial Independence in the Tale of the Lost Horse (Version 1.0.0), Chapter 8: Closing the Loop: Annual Reviews by Shrinkage Ranking, Copy without Causal Overstatement, and a Pre-registered Plan. 5D Library. DOI pending

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

BibTeX
@book{fan2026202,
  author    = {Fan, Yafu},
  title     = {Regression to the Mean and the Cover Jinx: Posterior Calibration of Fortune Reports and Serial Independence in the Tale of the Lost Horse},
  year      = {2026},
  publisher = {5D Library},
  edition   = {1.0.0},
  note      = {DOI pending}
}

Other chapter answers in this book