关于「实证闭环:周度档期配对单、稳定配对器与预注册检验」,《稳定匹配与无私奔配对》给出的定量结论是什么?

结论:第八章给出周度配对流程、稳定配对器与预注册检验方案:取消比例从 0.15 降到 0.08 时每组需 325 对,模拟检验力 0.803。书中以标注框区分已发表的证据、可运行的 Python 计算(19 段程序)、原典与作者的假说。

数据口径:书中的人物、档期与偏好均为示意;全部计算由书中程序生成;本书是非个人化经营建议,只使用当事人明示提供的偏好,不做未经同意的画像,配对结果只是建议,双方都可以拒绝。 第一章在示意扫描中发现口味越一致,先到先得越糟,平均私奔对从 4.14 个升到 14.12 个;评分优先只在所有买手看法完全一致时才稳定;罗斯对英国八个地区的比较单看计数,单侧费希尔检验 p 值为 0.2143,须与定理和实验复现一起才站得住。

English version

对照数据表

下表数字由本章 Python 程序原样打印,可重新运行复现。 程序只用 Python 标准库与结论吻合的打印值: 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
查看完整验算程序
# 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))

唯一数据源与引用

范雅福(Fan, Y.). (2026). 《稳定匹配盖尔沙普利算法、买手客户达人品牌摄影师档期的无私奔配对母典》第 8 章「实证闭环:周度档期配对单、稳定配对器与预注册检验」(版本 1.0.0). 5D Library. DOI 待发布

DOI 待发布 · 专著页正式发布后上线(本站暂无专著页) · 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}
}

本书其他章节结论