关于「实践与预注册试验」,《规模法则与组织新陈代谢》给出的定量结论是什么?
结论:所以样本量按保守得多的假设计算:组间对数完成时间的标准差取 0.35,最小关注效应为几何均数之比 0.85(分队组快 15%),基线协变量与结局的相关取 0.5(方差乘以 0.75),双侧 \(\alpha = 0.05\)。主方案的把握度取 90%:每组需要 75 个可分析的小组;考虑约 10% 的小组因有人缺席或中途退出而作废,每组招募 84 个小组,即每组 1,008 人,共 2,016 人。若标准差是 0.25 或 0.45,所需小组数分别为 39 与 122;若不用协变量,标准差 0.35 时需要 99 个。预先登记的次要备选方案只把把握度改为 80%,其余假设不变:每组 56 个可分析小组,招募 63 个,每组 756 人,共 1,512 人(程序最后两行)。这些参数都是假设值。正式试验之前先做一个小规模预试验,只用来检查任务难度、隐藏测试与聊天系统是否正常运行(例如 90 分钟内的完成比例),不用来改变样本量。
数据口径:本书讨论生物异速生长与城市、企业规模的数学模型,不是投资建议,也不构成任何企业管理成效的承诺。 书中以标注框区分已发表的证据、可运行的 Python 计算(15 段程序,全部核对)、原典与作者的假说。
对照数据表
下表数字由本章 Python 程序原样打印,可重新运行复现。 程序只用 Python 标准库与结论吻合的打印值: 0.05, 0.25, 0.35, 0.45, 0.5, 0.85
| model, flat arm: geometric mean 50.6 min, SD of log time 0.18, rework 1.04 | |
| model, modular arm: geometric mean 42.4 min, SD of log time 0.18, rework 0.45 | |
| model ratio of geometric means (modular / flat) | 0.84 |
| analysable GROUPS per arm, 90 % power, alpha 0.05: | |
| SD of log time ratio 0.80 ratio 0.85 ratio 0.85 with rho | 0.5 |
| 0.25 | 28 51 39 |
| 0.35 | 53 99 75 |
| 0.45 | 87 163 122 |
| pre-registered plans: SD 0.35, ratio 0.85, rho 0.5, 10 % void groups | |
| plan power analysable/arm recruited/arm people/arm in all | |
| primary | 90 % 75 84 1,008 2,016 |
| fallback | 80 % 56 63 756 1,512 |
查看完整验算程序
# Chapter 8 trial. Part 1: a MODEL of the hypothesis (simulated groups, not data about
# people). Twelve people each write one of 12 components (3 code modules x 4); work time
# per person ~ lognormal, median 20 min. Each person loses 1.2 % of working time for every
# colleague he or she actually messages: 11 in the flat arm; 3 teammates (plus the other
# two liaisons, for liaisons) in the modular arm. Each of the 3 module boundaries fails
# the hidden integration tests with probability 0.35 (flat, no separate interface
# sheet) or 0.15 (modular, with an interface sheet); a failure costs 8 min of rework.
# Integration itself takes 5 min.
# Part 2: sample size for the primary outcome, log completion time of the 12-person group,
# adjusted for a baseline covariate (mean log time of the members' solo warm-up coding
# exercise) that correlates rho with it; adjustment multiplies the variance by 1 - rho^2.
import math, random
from statistics import NormalDist, mean, stdev
rng = random.Random(1975)
def group(modular):
t = []
for i in range(12):
partners = (3 + (2 if i % 4 == 0 else 0)) if modular else 11
work = 20 * math.exp(rng.gauss(0, 0.3))
t.append(work / (1 - 0.012 * partners))
fails = sum(rng.random() < (0.15 if modular else 0.35) for _ in range(3))
return math.log(max(t) + 5 + 8 * fails), fails
def n_per_arm(sd, ratio, rho=0.0, alpha=0.05, power=0.90):
z = NormalDist().inv_cdf
return math.ceil(2 * (z(1 - alpha / 2) + z(power)) ** 2 * sd ** 2 * (1 - rho ** 2)
/ math.log(ratio) ** 2) + 1
if __name__ == "__main__":
flat = [group(False) for _ in range(5000)]; mod = [group(True) for _ in range(5000)]
lf, lm = [x[0] for x in flat], [x[0] for x in mod]
for lab, arm, logs in (("flat", flat, lf), ("modular", mod, lm)):
print(f"model, {lab:7s} arm: geometric mean {math.exp(mean(logs)):.1f} min,"
f" SD of log time {stdev(logs):.2f}, rework {mean(x[1] for x in arm):.2f}")
gm = math.exp(mean(lm) - mean(lf))
print(f"model ratio of geometric means (modular / flat): {gm:.2f}")
print("analysable GROUPS per arm, 90 % power, alpha 0.05:")
print(" SD of log time ratio 0.80 ratio 0.85 ratio 0.85 with rho = 0.5")
for sd in (0.25, 0.35, 0.45):
print(f" {sd:.2f} {n_per_arm(sd, 0.80):4d} "
f"{n_per_arm(sd, 0.85):4d} {n_per_arm(sd, 0.85, 0.5):4d}")
print("pre-registered plans: SD 0.35, ratio 0.85, rho 0.5, 10 % void groups")
print(" plan power analysable/arm recruited/arm people/arm in all")
for lab, pw in (("primary", 0.90), ("fallback", 0.80)):
n = n_per_arm(0.35, 0.85, 0.5, power=pw); rec = math.ceil(n / 0.9)
print(f" {lab:9s} {100 * pw:.0f} % {n:3d} {rec:3d}"
f" {12 * rec:5,d} {24 * rec:5,d}")唯一数据源与引用
范雅福(Fan, Y.). (2026). 《规模法则、异速生长与组织新陈代谢的统计物理》第 8 章「实践与预注册试验」(版本 1.0.0). 5D Library. https://doi.org/10.5281/zenodo.23788553
DOI: 10.5281/zenodo.23788553 · 阅读本章所在专著 · 5DL-B-036 · v1.0.0 · CC-BY-NC-ND-4.0
BibTeX
@book{fan2026036,
author = {Fan, Yafu},
title = {Scaling Laws, Allometric Growth and the Statistical Physics of Organisational Metabolism},
year = {2026},
publisher = {5D Library},
edition = {1.0.0},
doi = {10.5281/zenodo.23788553},
url = {https://doi.org/10.5281/zenodo.23788553}
}