关于「实践与预注册试验」,《沙盘、宿命与主动推理》给出的定量结论是什么?
结论:按最小值得关注的效应 0.4 个标准差、基线与结局相关 0.5、90% 把握度计算,每组需要 100 人;考虑 12 人小班、组内相关 0.02 的设计效应 1.22,每组需要 122 人完成,按 15% 的脱落招募 144 人,即每组 12 个小班。基线与结局的相关、组内相关都是假设,将在 24 人的预试验中核对;如果基线与结局的相关低于 0.4,正式试验开始前重新计算样本量。
数据口径:本书不是心理治疗或诊断;关于「旧先验驱动重复挫折」的内容是假说与跨学科类比,绝不意味着受害者要为自己的遭遇负责。 书中以标注框区分已发表的证据、可运行的 Python 计算(15 段程序,全部核对)、原典与作者的假说。
对照数据表
下表数字由本章 Python 程序原样打印,可重新运行复现。 程序只用 Python 标准库与结论吻合的打印值: 0.02, 0.4, 0.5, 1.22, 100, 12
| standardised effect 0.3 | 132 per arm for 80 % power, 177 for 90 % (baseline-outcome correlation 0.5) |
| standardised effect 0.4 | 75 per arm for 80 % power, 100 for 90 % (baseline-outcome correlation 0.5) |
| standardised effect 0.5 | 49 per arm for 80 % power, 65 for 90 % (baseline-outcome correlation 0.5) |
| if the correlation is only 0.3, effect 0.4 needs 121 per arm for 90 % | |
| design effect for groups of 12, ICC 0.02 | 1.22 -> 122 completers per arm (power without clustering would be 95%); recruit 144 per arm allowing 15 % loss |
查看完整验算程序
# Sample size for a two-arm parallel trial. Primary outcome: the directed-exploration parameter
# (information bonus) fitted to the Horizon task (Wilson et al. 2014), one week after the course,
# analysed by ANCOVA adjusting for the baseline value. Effect expressed in baseline SD units.
import math
from statistics import NormalDist
N = NormalDist()
def n_per_arm(d, r=0.5, alpha=0.05, power=0.90):
"""Normal approximation; ANCOVA on a baseline correlated r with the outcome shrinks the
variance by (1 - r^2)."""
za, zb = N.inv_cdf(1 - alpha / 2), N.inv_cdf(power)
return math.ceil(2 * (za + zb) ** 2 * (1 - r ** 2) / d ** 2) + 1
def power(n, d, r=0.5, alpha=0.05):
za = N.inv_cdf(1 - alpha / 2)
return N.cdf(d / math.sqrt(2 * (1 - r ** 2) / n) - za)
for d in (0.3, 0.4, 0.5):
print(f"standardised effect {d}: {n_per_arm(d, power=0.80)} per arm for 80 % power, {n_per_arm(d)} for 90 %"
f" (baseline-outcome correlation 0.5)")
print(f"if the correlation is only 0.3, effect 0.4 needs {n_per_arm(0.4, r=0.3)} per arm for 90 %")
# Both courses are taught in groups of 12, so outcomes within a group are correlated (ICC assumed 0.02).
de = 1 + (12 - 1) * 0.02
n = math.ceil(n_per_arm(0.4) * de)
print(f"design effect for groups of 12, ICC 0.02: {de:.2f} -> {n} completers per arm "
f"(power without clustering would be {power(n, 0.4):.0%}); recruit {math.ceil(n / 0.85)} per arm allowing 15 % loss")唯一数据源与引用
范雅福(Fan, Y.). (2026). 《沙盘、宿命与主动推理》第 8 章「实践与预注册试验」(版本 1.0.0). 5D Library. https://doi.org/10.5281/zenodo.23738794
DOI: 10.5281/zenodo.23738794 · 阅读本章所在专著 · 5DL-B-015 · v1.0.0 · CC-BY-NC-ND-4.0
BibTeX
@book{fan2026015,
author = {Fan, Yafu},
title = {The Sandbox, Determinism and Active Inference},
year = {2026},
publisher = {5D Library},
edition = {1.0.0},
doi = {10.5281/zenodo.23738794},
url = {https://doi.org/10.5281/zenodo.23738794}
}