关于「实践与预注册试验」,《心理物理学与多感官整合》给出的定量结论是什么?

结论:四步核查表依次检查:是否依赖一个可能失效的单一通道、微弱信号是否有第二通道的同步支持、视听时间差是否在不对称的窗口之内(声音提前不超过约 45 毫秒、延后不超过约 125 毫秒),以及学习者有多少时间在主动探索。预注册试验在相同的视听条件下,比较「把实时音高或共振峰误差编码为前臂振动」与「佩戴同款但不振动的设备」两种训练对 24 小时后无反馈音高模仿误差的影响:唯一的主要结局以音分计,先做 20 人的外部预试验,再按写成代码的规则(标准差取 80% 置信上限、最小关注差异固定为 20 音分、每组 150 至 350 人)确定样本量,计划值为每组 191 名可分析(招募 225 名),判定规则写成代码,并有嗓音负荷与振动的安全条款,无论结果如何都发表。

数据口径:物理强度与主观感觉之间是什么关系?大脑怎样把几种各有噪声的感觉合成一个判断?本书用心理物理学与贝叶斯模型回答这两个问题。 本书不是医疗建议,不能诊断任何感官或神经疾病。

English version

对照数据表

下表数字由本章 Python 程序原样打印,可重新运行复现。 程序只用 Python 标准库与结论吻合的打印值: 150, 191, 20, 225, 350, 80

check16% poor-pitch singers (229 c), rest 30 c -> mean 61 c; split alone gives SD 72 c
plan: SD 75, r 0.6, SESOI 20 (d0.27), 90 % power: 191 per arm, recruit 225 (450)
analysable per arm SESOI 1520 30
SD 60, r 0.4284 160 72
SD 60, r 0.6217 123 55
SD 75, r 0.4443 250 112
SD 75, r 0.6338 191 86
SD 90, r 0.4637 359 160
SD 90, r 0.6486 274 123
pilot of 10 per arm: SE of an arm difference about 27 c (SESOI 20)
80 % upper limit with df 18: SD x 1.183, so n x 1.40
pilot SD, r -> SD used, r used -> n per arm -> clamped -> recruit (all)
50, 0.6559.2, 0.60 -> 119 -> 150 -> 177 (354)
60, 0.7071.0, 0.60 -> 171 -> 171 -> 202 (404)
75, 0.6088.7, 0.60 -> 266 -> 266 -> 313 (626)
90, 0.45106.5, 0.45 -> 477 -> 350 -> 412 (824)
true benefit0.0: P(some benefit verdict) 0.028, P(benefit >= SESOI shown) 0.000
true benefit 20.0: P(some benefit verdict) 0.908, P(benefit >= SESOI shown) 0.026
true benefit 40.0: P(some benefit verdict) 1.000, P(benefit >= SESOI shown) 0.894

核心公式

\[e = 1200\,\log_2\frac{f_0}{f_t},\]
查看完整验算程序
# Sample size for the Chapter 8 trial, with a pre-registered re-estimation rule.
# Primary outcome: mean absolute pitch error (cents) when imitating 5 target notes,
# 24 h after training, without feedback. Planning values, all ASSUMED:
#   SD between people 75 cents (published means only; see the check below),
#   correlation with baseline r 0.6, smallest effect of interest (SESOI) 20 cents,
#   two-sided alpha 0.05, 90 % power, 15 % loss. ANCOVA on the baseline shrinks the
#   variance by (1 - r^2) (Borm, Fransen & Lemmens 2007).
# Pilot rule: external pilot, n = 20 (10 per arm), never in the main analysis. An
# independent statistician reports only the pooled within-arm SD (df 18) and r.
# SD used = one-sided 80 % upper confidence limit (Browne 1995); r used = pilot r, but
# never above the planned 0.6 nor below 0. SESOI stays 20: the pilot never estimates
# the effect. Final n is clamped to [150, 350] analysable per arm.
import math, random
from statistics import NormalDist
N = NormalDist()
SESOI, LOSS, N_MIN, N_MAX = 20.0, 0.15, 150, 350

def per_arm(sd, delta, r, alpha=0.05, power=0.90):
    z = N.inv_cdf(1 - alpha / 2) + N.inv_cdf(power)    # +1 below ~ t correction z_a^2/4
    return math.ceil(2 * z ** 2 * sd ** 2 * (1 - r ** 2) / delta ** 2) + 1

def chi2_cdf(x, k):                          # regularised lower gamma P(k/2, x/2), series
    a, y = k / 2, x / 2
    term = total = 1 / a
    for i in range(1, 500):
        term *= y / (a + i); total += term
    return total * math.exp(-y + a * math.log(y) - math.lgamma(a))

def chi2_ppf(p, k):
    lo, hi = 1e-9, 10 * k + 100
    for _ in range(100):
        mid = (lo + hi) / 2
        lo, hi = (mid, hi) if chi2_cdf(mid, k) < p else (lo, mid)
    return (lo + hi) / 2

def reestimate(s, r, df=18, conf=0.80):
    s_up = s * math.sqrt(df / chi2_ppf(1 - conf, df))
    r_use = min(max(r, 0.0), 0.6)
    n = per_arm(s_up, SESOI, r_use)
    return s_up, r_use, n, min(max(n, N_MIN), N_MAX)

def simulate(rng, n, true_diff, sd=75.0, r=0.6, sims=3000):
    benefit = strongest = 0
    for _ in range(sims):
        arms = []
        for shift in (0.0, -true_diff):                     # arm A lowers the error
            xs = [rng.gauss(0, sd) for _ in range(n)]
            ys = [r * x + rng.gauss(shift, sd * math.sqrt(1 - r * r)) for x in xs]
            arms.append((xs, ys))
        cx = [[x - sum(xs) / n for x in xs] for xs, _ in arms]   # centre within arms
        cy = [[y - sum(ys) / n for y in ys] for _, ys in arms]
        b = sum(x * y for a, c in zip(cx, cy) for x, y in zip(a, c)) \
            / sum(x * x for a in cx for x in a)
        adj = [sum(y - b * x for x, y in zip(xs, ys)) / n for xs, ys in arms]
        d = adj[0] - adj[1]                       # B minus A: positive = A better
        rss = sum((y - b * x) ** 2 for a, c in zip(cx, cy) for x, y in zip(a, c))
        lo = d - 1.96 * math.sqrt(rss / (2 * n - 3) * 2 / n)
        benefit += lo > 0; strongest += lo >= SESOI
    return benefit / sims, strongest / sims

if __name__ == "__main__":
    p, good, poor = 7 / 45, 30.0, 229.0           # Pfordresher & Brown 2007, Exp. 2
    print(f"check: {p:.0%} poor-pitch singers (229 c), rest 30 c -> mean"
          f" {p * poor + (1 - p) * good:.0f} c; split alone gives SD"
          f" {math.sqrt(p * (1 - p)) * (poor - good):.0f} c")
    n = per_arm(75, SESOI, 0.6); rec = math.ceil(n / (1 - LOSS))
    print(f"plan: SD 75, r 0.6, SESOI 20 (d = {20 / 75:.2f}), 90 % power: {n} per arm,"
          f" recruit {rec} ({2 * rec})")
    print("analysable per arm      SESOI 15     20     30")
    for sd in (60, 75, 90):
        for r in (0.4, 0.6):
            print(f"  SD {sd}, r {r:.1f} {'':8s}"
                  + "".join(f"{per_arm(sd, dl, r):7d}" for dl in (15, 20, 30)))
    se = 75 * math.sqrt(2 / 10) * math.sqrt(1 - 0.36)
    print(f"pilot of 10 per arm: SE of an arm difference about {se:.0f} c (SESOI 20)")
    k = math.sqrt(18 / chi2_ppf(0.20, 18))
    print(f"80 % upper limit with df 18: SD x {k:.3f}, so n x {k * k:.2f}")
    print("pilot SD, r -> SD used, r used -> n per arm -> clamped -> recruit (all)")
    for s, r in ((50, 0.65), (60, 0.70), (75, 0.60), (90, 0.45)):
        s_up, r_lo, raw, n2 = reestimate(s, r)
        rec2 = math.ceil(n2 / (1 - LOSS))
        print(f"  {s:4d}, {r:.2f} -> {s_up:5.1f}, {r_lo:.2f} -> {raw:4d} -> {n2:3d}"
              f" -> {rec2} ({2 * rec2})")
    rng = random.Random(2026)
    for true in (0.0, 20.0, 40.0):
        p_any, p_top = simulate(rng, n, true)
        print(f"true benefit {true:4.1f}: P(some benefit verdict) {p_any:.3f},"
              f" P(benefit >= SESOI shown) {p_top:.3f}")

唯一数据源与引用

范雅福(Fan, Y.). (2026). 《心理物理学、韦伯-费希纳定律与多感官贝叶斯整合的数学模型》第 8 章「实践与预注册试验」(版本 1.0.0). 5D Library. https://doi.org/10.5281/zenodo.23788548

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

BibTeX
@book{fan2026034,
  author    = {Fan, Yafu},
  title     = {Psychophysics, the Weber-Fechner Law and Optimal Bayesian Multisensory Integration},
  year      = {2026},
  publisher = {5D Library},
  edition   = {1.0.0},
  doi       = {10.5281/zenodo.23788548},
  url       = {https://doi.org/10.5281/zenodo.23788548}
}

本书其他章节结论