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 share | cancel share | pairings | at 40 pairings |
| first-come | stable sheet | per arm | a week: weeks |
| 0.15 | 0.10 | 686 | 18 |
| 0.15 | 0.08 | 325 | 9 |
| 0.12 | 0.06 | 356 | 9 |
| 0.20 | 0.10 | 199 | 5 |
| 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
- Chapter 1 · First Come and Highest Score First: Where Blocking Pairs Come From
- Chapter 2 · Deferred Acceptance: Why an Algorithm That Only Holds, Never Commits, Must Converge
- Chapter 3 · Proposer Optimality: the Lattice of Stable Matchings and the Value of Speaking First
- Chapter 4 · Telling the Truth and the Short List: the Proposer's Honesty and the Receiver's Gamble
- Chapter 5 · Many-to-One: Photographers' Slots, Hospitals and Residents
- Chapter 6 · Short Lists, Ties and Guessed Preferences
- Chapter 7 · Classical Sources East and West: the Marriage Officer of the Rites of Zhou and Gale and Shapley 1962