5D Library › 节律声刺激、听觉稳态反应与双耳等时调制工程 · English

第八章 十项审计与一项预注册交叉试验

十个问题

本章把全书写成十个可以由脚本检查的问题,适用于任何节律音频或睡眠声音产品,包括作者自己的产品。它们不是医疗或听力保健建议。

  1. 是否声称用扬声器或骨传导播放双耳拍?(第四章)
  2. 双耳拍的载波是否高于 1,000 Hz?(第一章)
  3. 是否声称静态纯音能「夹带」脑波或修复什么?(第一、二章)
  4. 是否把 7.83 Hz 当作「舒曼共振」出售?(第五章)
  5. 所谓粉红噪声的斜率是否偏离每倍频程 3.01 dB 超过 0.5 dB?(第三章)
  6. 枕边的掩蔽声是否超过 45 dBA?(第三章)
  7. 建议的每日用法是否使听力剂量超过 0.5?(第五章)
  8. 等时音是否使用没有斜坡的方波门控?(第四章)
  9. 证据是否只来自没有对照的前后对比调查?(第六章)
  10. 是否检验了大量脑电格子而不作校正?(第六章)

审计程序

程序把十个问题写成十个自动标记,并用于两个示意产品:一个「朴素」产品(典型的市售音轨及其宣传),一个按本书各章修正后的「审计后」产品。

推导

# Chapter 8. p15: Ten automatic flags for an audio entrainment product.
# Each flag is a yes / no check that a script can run on a product's
# own specification and claims; the chapter of this book that supplies
# the threshold is given in brackets. Two illustrative products:
#   "naive": the typical marketplace track and its claims;
#   "audited": the same product after the corrections of this book.
FLAGS = [
    ("binaural claimed via speakers or bone conduction [4]",
     lambda p: p["binaural"] and p["ia_db"] < 30),
    ("binaural carrier above 1,000 Hz [1]",
     lambda p: p["binaural"] and p["carrier"] > 1000),
    ("static tone claimed to entrain or repair [1, 2]",
     lambda p: p["static_claim"]),
    ("7.83 Hz sold as the Schumann resonance [5]",
     lambda p: p["schumann_claim"]),
    ("pink noise slope off by more than 0.5 dB/oct [3]",
     lambda p: abs(p["slope"] + 3.01) > 0.5),
    ("masker above 45 dBA at the pillow [3]",
     lambda p: p["masker_dba"] > 45),
    ("recommended daily dose above 0.5 [5]",
     lambda p: p["dose"] > 0.5),
    ("square gating with no ramp [4]",
     lambda p: p["ramp_ms"] < 2),
    ("evidence only from before / after surveys [6]",
     lambda p: not p["sham_controlled"]),
    ("many EEG cells tested, none corrected [6]",
     lambda p: p["tests"] > 1 and not p["corrected"]),
]

PRODUCTS = {
    "naive": dict(binaural=True, ia_db=3, carrier=1200,
                  static_claim=True, schumann_claim=True, slope=-4.2,
                  masker_dba=55, dose=0.79, ramp_ms=0,
                  sham_controlled=False, tests=285, corrected=False),
    "audited": dict(binaural=False, ia_db=50, carrier=400,
                    static_claim=False, schumann_claim=False,
                    slope=-2.99, masker_dba=40, dose=0.012, ramp_ms=20,
                    sham_controlled=True, tests=3, corrected=True),
}

if __name__ == "__main__":
    for name, prod in PRODUCTS.items():
        hits = [f for f, test in FLAGS if test(prod)]
        print("   {}: {} of {} flags".format(name, len(hits), len(FLAGS)))
        for f in hits:
            print("     [x] " + f)
    print("\nReading: the naive product trips every flag. The audited")
    print("one trips none, which only means its claims are no longer")
    print("contradicted by acoustics and arithmetic; whether it helps")
    print("anyone sleep or focus is a question for the trial of p16.")
#    naive: 10 of 10 flags
#      [x] binaural claimed via speakers or bone conduction [4]
#      [x] binaural carrier above 1,000 Hz [1]
#      [x] static tone claimed to entrain or repair [1, 2]
#      [x] 7.83 Hz sold as the Schumann resonance [5]
#      [x] pink noise slope off by more than 0.5 dB/oct [3]
#      [x] masker above 45 dBA at the pillow [3]
#      [x] recommended daily dose above 0.5 [5]
#      [x] square gating with no ramp [4]
#      [x] evidence only from before / after surveys [6]
#      [x] many EEG cells tested, none corrected [6]
#    audited: 0 of 10 flags
#
# Reading: the naive product trips every flag. The audited
# one trips none, which only means its claims are no longer
# contradicted by acoustics and arithmetic; whether it helps
# anyone sleep or focus is a question for the trial of p16.

朴素产品触发全部十个标记。审计后的产品一个也不触发,但这只说明它的说法不再与声学和算术矛盾,并不说明它对任何人的睡眠或专注有帮助。后者只能由试验回答。

一项预注册的交叉试验

假说 · 尚未验证

试验方案。 每位受试者在随机顺序下经历三种夜晚:40 dBA 粉红噪声掩蔽;先听 40 Hz 等时音再接粉红噪声;安静对照。主要结局按霍尔姆逐步校正在 0.05 水平检验 (Holm 1979):H1 掩蔽对照安静的微觉醒指数;H2 等时音对照双耳拍的 40 Hz 稳态反应锁相;H3 掩蔽对照安静的晨间自评睡眠质量。由与作者无经济关系的独立分析者按预先登记的代码执行,结果不论正负都发表。

推导

# Chapter 8. p16: Sizing and checking a pre-registered crossover trial.
# Each sleeper spends nights in three arms in random order: pink noise
# masker at 40 dBA, an isochronic 40 Hz track then pink noise, and a
# quiet control. Outcomes, tested with Holm's procedure at 0.05:
#   H1 micro-arousal index, masker vs control (paired d_z = 0.3);
#   H2 40 Hz ASSR phase locking, isochronic vs binaural (d_z = 1.0);
#   H3 morning self-rated sleep quality, masker vs control (d_z = 0.2).
# Paired normal approximation: n = (z_a + z_b)^2 / d_z^2 at power 0.80,
# with the first Holm level 0.05 / 3. Then 20 % dropout. Finally a
# simulation of 4,000 null trials checks that the Holm procedure keeps
# the chance of any false claim at or below 0.05.
import math
import random

def z_two_sided(alpha):
    lo, hi = 0.0, 10.0
    for _ in range(100):
        mid = (lo + hi) / 2
        if math.erfc(mid / math.sqrt(2)) > alpha:
            lo = mid
        else:
            hi = mid
    return (lo + hi) / 2

def holm_any(pvals, alpha=0.05):
    m = len(pvals)
    for i, p in enumerate(sorted(pvals)):
        if p > alpha / (m - i):
            return i > 0
    return True

if __name__ == "__main__":
    za, zb = z_two_sided(0.05 / 3), 0.8416
    print("   Holm first level 0.05 / 3 -> |z| > {:.3f}".format(za))
    need = 0
    for name, d in (("H1 micro-arousals", 0.3),
                    ("H2 ASSR locking", 1.0),
                    ("H3 sleep quality", 0.2)):
        n = math.ceil((za + zb) ** 2 / d ** 2)
        need = max(need, n)
        print("   {:18s} d_z = {:.1f}   n = {:4d}".format(name, d, n))
    print("   sleepers to complete: {}   to enrol (20 % dropout): {}"
          .format(need, math.ceil(need / 0.8)))
    rng = random.Random(5)
    false_any = 0
    for _ in range(4000):
        zs = [rng.gauss(0, 1) for _ in range(3)]
        ps = [math.erfc(abs(z) / math.sqrt(2)) for z in zs]
        false_any += holm_any(ps)
    print("   null simulation: any false claim in {:.4f} of trials"
          .format(false_any / 4000))
    print("\nReading: the subjective outcome sets the size of the trial.")
    print("If only H2 were wanted, eleven sleepers would do; the")
    print("claims a buyer cares about need hundreds.")
#    Holm first level 0.05 / 3 -> |z| > 2.394
#    H1 micro-arousals  d_z = 0.3   n =  117
#    H2 ASSR locking    d_z = 1.0   n =   11
#    H3 sleep quality   d_z = 0.2   n =  262
#    sleepers to complete: 262   to enrol (20 % dropout): 328
#    null simulation: any false claim in 0.0498 of trials
#
# Reading: the subjective outcome sets the size of the trial.
# If only H2 were wanted, eleven sleepers would do; the
# claims a buyer cares about need hundreds.

霍尔姆的第一级阈值为 |z|>2.394|z| > 2.394。H1 需要 117 人,H2 只需要 11 人,H3 需要 262 人;考虑 20% 的脱落,需要招募 328 人。对 4,000 次无效应试验的模拟中,至少作出一次错误结论的比例为 0.0498,不超过 0.05。试验的规模由主观结局决定:消费者真正关心的问题需要数百人,而不是一份几十人的问卷。

小结

十个问题(双耳拍的播放途径、载波、静态纯音、舒曼频率、噪声斜率、掩蔽声级、听力剂量、门控、对照设计、多重比较)都可以写成自动审计。检验节律音频是否真的有用的试验,应当使用安静对照与假刺激对照,并以主观结局决定样本量。

参考文献

Holm, Sture. 1979. “A Simple Sequentially Rejective Multiple Test Procedure.” Scandinavian Journal of Statistics 6 (2): 65–70.

Fan, Y. (2026). Rhythmic Acoustic Stimulation, Auditory Steady-State Responses and Modulation Signal Engineering: Binaural versus Isochronic Envelope Depth, 40-Hz Phase-Locking Bounds and Pink-Noise Spectral Masking [节律声刺激、听觉稳态反应与双耳等时调制工程] (Version 1.0.0). 5D Library. https://doi.org/10.5281/zenodo.24090211 · Licensed under Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International (CC BY-NC-ND 4.0).