关于「实践与预注册试验」,《集群动力学与分布式共识》给出的定量结论是什么?

结论:样本量按以下假设计算:最小关注效应为 0.02(模型中去中心化组的误差约为 0.12,0.02 相当于相对增加约 17%,与贝克尔等人报告的中心人物偏离真值时误差增加 19% 同一量级);小组结局的标准差取 0.030(模型中为 0.028 至 0.030);双侧 \(\alpha = 0.05\),把握度 90%,按 \(t\) 分布加 1。每组需要 49 个可分析的小组;考虑约 15% 的小组因参与者流失(第 3 轮完成者少于 15 人)而不可分析,每组随机化 58 个,共 116 组、2,204 名参与者。标准差为 0.025 或 0.040 时,每组分别需要 34 或 86 个小组;最小关注效应为 0.03 时,标准差 0.030 下需要 23 个。如需较小规模的备选方案,80% 把握度下每组需要 37 个可分析的小组,应在登记时一并写明。正式试验之前先做一次预试验,只用来检查程序、界面与题目,不用来改变样本量。

数据口径:本书是教学与研究用的数学模型,不是管理咨询,也不构成任何政治主张。 书中以标注框区分已发表的证据、可运行的 Python 计算(16 段程序,全部核对)、原典与作者的假说;书中所有数据都是虚构或模拟的。

English version

对照数据表

下表数字由本章 Python 程序原样打印,可重新运行复现。 程序只用 Python 标准库与结论吻合的打印值: 0.02, 0.025, 0.03, 0.030, 0.040, 0.05

scripted bias bhub arm (SD)ring arm (SD)difference hub - ring
0.400 (x1.49)0.1172 (0.0265)0.1204 (0.0282)-0.0032
0.693 (x2.00)0.1432 (0.0299)0.1213 (0.0284)+0.0219
1.000 (x2.72)0.1806 (0.0344)0.1228 (0.0294)+0.0578
analysable groups per arm, power 90 % (+1 for the t distribution):
SD of outcomeSESOI 0.02SESOI 0.03SESOI 0.05
0.02534167
0.03049239
0.040863915
plan (b = ln 2): SD 0.030, SESOI 0.02, 15 % of groups lost -> 49 analysable,
58 randomised per arm: 116 groups of 20 seats, 2204 people
80 % power alternative: 37 analysable per arm
查看完整验算程序
# Chapter 8 trial. Part 1: a MODEL of one group (assumptions, not estimates). 20 seats;
# seat 0 is a disclosed scripted seat that always shows truth x e^b (log bias b > 0).
# 19 people answer 10 questions in 3 rounds: round 1 alone, then each sees 4 estimates of
# the previous round and moves a share a_i ~ U(0.1, 0.6) toward their mean.
#   hub arm: everyone sees seat 0 plus 3 peers (offsets -1, +1, +2 on a ring of the 19)
#   ring arm: 20-seat ring, everyone sees seats at -2, -1, +1, +2 (seat 0 is ordinary)
# Log estimate = truth + c_q + e_i, c_q ~ N(0, 0.05) (questions pre-tested to have crowd
# medians near the truth), e_i ~ N(0, 0.60). Group outcome = mean over the 10 questions of
# |mean final log estimate of the 19 people - log truth|.  Part 2: groups per arm.
import math, random
from statistics import NormalDist, mean, stdev

H, Q = 19, 10

def views(arm):
    if arm == "hub":
        return [[None] + [(i + d) % H for d in (-1, 1, 2)] for i in range(H)]
    ring = [[(s + d) % 20 for d in (-2, -1, 1, 2)] for s in range(1, 20)]
    return [[None if v == 0 else v - 1 for v in r] for r in ring]   # None = scripted seat

def group(arm, cq, b, rng):
    vw = views(arm); a = [rng.uniform(0.1, 0.6) for _ in range(H)]; err = 0.0
    for c in cq:
        x = [c + rng.gauss(0, 0.60) for _ in range(H)]
        for _ in range(2):
            x = [(1 - a[i]) * x[i] + a[i] * sum(b if j is None else x[j]
                                                for j in vw[i]) / 4 for i in range(H)]
        err += abs(sum(x) / H)
    return err / Q

def groups_per_arm(sd, diff, power=0.90, alpha=0.05):
    z = NormalDist().inv_cdf
    return math.ceil(2 * (z(1 - alpha / 2) + z(power)) ** 2 * sd ** 2 / diff ** 2) + 1

if __name__ == "__main__":
    rng = random.Random(2017); cq = [rng.gauss(0, 0.05) for _ in range(Q)]
    print("scripted bias b   hub arm (SD)       ring arm (SD)      difference hub - ring")
    for b in (0.40, math.log(2), 1.00):
        hub = [group("hub", cq, b, rng) for _ in range(1000)]
        ring = [group("ring", cq, b, rng) for _ in range(1000)]
        print(f"  {b:.3f} (x{math.exp(b):.2f})  {mean(hub):.4f} ({stdev(hub):.4f})"
              f"    {mean(ring):.4f} ({stdev(ring):.4f})"
              f"     {mean(hub) - mean(ring):+.4f}")
    print("analysable groups per arm, power 90 % (+1 for the t distribution):")
    print("   SD of outcome   SESOI 0.02   SESOI 0.03   SESOI 0.05")
    for sd in (0.025, 0.030, 0.040):
        print(f"       {sd:.3f}      " + "".join(f"    {groups_per_arm(sd, s):5d}    "
                                              for s in (0.02, 0.03, 0.05)))
    n = groups_per_arm(0.030, 0.02); rec = math.ceil(n / 0.85)
    print(f"plan (b = ln 2): SD 0.030, SESOI 0.02, 15 % of groups lost -> {n}"
          " analysable,")
    print(f"   {rec} randomised per arm: {2 * rec} groups of 20 seats,"
          f" {2 * rec * H} people")
    n80 = groups_per_arm(0.030, 0.02, power=0.80)
    print(f"80 % power alternative: {n80} analysable per arm")

唯一数据源与引用

范雅福(Fan, Y.). (2026). 《集群动力学、耦合振子同步与分布式共识的数学模型》第 8 章「实践与预注册试验」(版本 1.0.0). 5D Library. https://doi.org/10.5281/zenodo.23828063

DOI: 10.5281/zenodo.23828063 · 阅读本章所在专著 · 5DL-B-044 · v1.0.0 · CC-BY-NC-ND-4.0

BibTeX
@book{fan2026044,
  author    = {Fan, Yafu},
  title     = {Collective Dynamics, Coupled-Oscillator Synchrony and Distributed Consensus},
  year      = {2026},
  publisher = {5D Library},
  edition   = {1.0.0},
  doi       = {10.5281/zenodo.23828063},
  url       = {https://doi.org/10.5281/zenodo.23828063}
}

本书其他章节结论