What does Stable Matching without Blocking Pairs conclude, in numbers, about “Closing the Loop: a Weekly Slot Sheet, the Stable Pairing Matcher and a Pre-Registered Test”?

Answer: Chapter 8 gives the weekly procedure, the Stable Pairing Matcher and a pre-registered test: if cancellations fall from 0.15 to 0.08, each group needs 325 pairings, with a simulated power of 0.803. Marked boxes separate published evidence, runnable Python calculations (19 programs), classical sources and the author's hypotheses.

Scope of the numbers: Chapter 8 gives the weekly procedure, the Stable Pairing Matcher and a pre-registered test: if cancellations fall from 0.15 to 0.08, each group needs 325 pairings, with a simulated power of 0.803. Marked boxes separate published evidence, runnable Python calculations (19 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.08, 0.15, 0.803, 325

cancel sharecancel sharepairingsat 40 pairings
first-comestable sheetper arma week: weeks
0.150.1068618
0.150.083259
0.120.063569
0.200.101995
simulated power at n = 325 per arm (0.15 vs 0.08): 0.803
simulated false-alarm rate with no true difference: 0.059
Show the full program
# Chapter 8. p82: how many confirmed pairings does the test need?
# Pre-registered test: share of confirmed pairings later cancelled by
# one side ("reneged"), first-come weeks against stable-sheet weeks.
# Normal-approximation sample size per arm for two proportions,
# two-sided alpha 0.05, power 0.80; the cancellation shares are
# illustrative planning values, not measurements. A fixed-seed
# simulation then checks the power of the chosen size with the same
# two-proportion z test that the plan pre-registers.
import math
import random
from statistics import NormalDist

Z = NormalDist()
ALPHA, POWER = 0.05, 0.80
rng = random.Random(20261113)


def n_per_arm(p1, p2):
    za = Z.inv_cdf(1 - ALPHA / 2)
    zb = Z.inv_cdf(POWER)
    pbar = (p1 + p2) / 2
    a = za * math.sqrt(2 * pbar * (1 - pbar))
    b = zb * math.sqrt(p1 * (1 - p1) + p2 * (1 - p2))
    return math.ceil(((a + b) / (p1 - p2)) ** 2)


def z_test(x1, x2, n):
    p = (x1 + x2) / (2 * n)
    se = math.sqrt(2 * p * (1 - p) / n)
    return abs(x1 / n - x2 / n) / se if se > 0 else 0.0


print("cancel share   cancel share   pairings   at 40 pairings")
print("first-come     stable sheet   per arm    a week: weeks")
for p1, p2 in ((0.15, 0.10), (0.15, 0.08), (0.12, 0.06), (0.20, 0.10)):
    n = n_per_arm(p1, p2)
    print("    %.2f           %.2f        %5d       %5d"
          % (p1, p2, n, math.ceil(n / 40)))
p1, p2 = 0.15, 0.08
n = n_per_arm(p1, p2)
crit = Z.inv_cdf(1 - ALPHA / 2)
hits = 0
for _ in range(2000):
    x1 = len([1 for _ in range(n) if rng.random() < p1])
    x2 = len([1 for _ in range(n) if rng.random() < p2])
    hits += int(z_test(x1, x2, n) > crit)
print("simulated power at n = %d per arm (0.15 vs 0.08): %.3f"
      % (n, hits / 2000))
hits = 0
for _ in range(2000):
    x1 = len([1 for _ in range(n) if rng.random() < p1])
    x2 = len([1 for _ in range(n) if rng.random() < p1])
    hits += int(z_test(x1, x2, n) > crit)
print("simulated false-alarm rate with no true difference: %.3f"
      % (hits / 2000))

Single source and citation

Fan, Y. (2026). Gale-Shapley Stable Matching: Pairings without Blocking Pairs for Buyers and Clients, Creators and Brands, Photographers and Slots (Version 1.0.0), Chapter 8: Closing the Loop: a Weekly Slot Sheet, the Stable Pairing Matcher and a Pre-Registered Test. 5D Library. DOI pending

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

BibTeX
@book{fan2026299,
  author    = {Fan, Yafu},
  title     = {Gale-Shapley Stable Matching: Pairings without Blocking Pairs for Buyers and Clients, Creators and Brands, Photographers and Slots},
  year      = {2026},
  publisher = {5D Library},
  edition   = {1.0.0},
  note      = {DOI pending}
}

Other chapter answers in this book