关于「偷看与早停:在线试验里的可选停止与检验鞅」,《鞅、停时与商业试错的停损界》给出的定量结论是什么?
结论:第六章讲在线试验里偷看一百次时误报率升到 0.3726,以及检验鞅与序贯检验。
数据口径:可选停时定理说,只要停止时刻不偷看未来且有上限,不赚不亏的事情在停下时的期望结果就等于起点;示意参数下,「第一次领先就停」的胜率是 0.824,期望却精确为零。 书中参数均为示意;全部计算由书中程序生成。
对照数据表
下表数字由本章 Python 程序原样打印,可重新运行复现。 程序只用 Python 标准库与结论吻合的打印值: 0.3726
| A/A test, nominal two-sided level 0.05, 20000 tests | ||
| looks false alarm rate | x 0.05 | |
| 1 | 0.0498 | 1.00 |
| 2 | 0.0830 | 1.66 |
| 5 | 0.1409 | 2.82 |
| 10 | 0.1919 | 3.84 |
| 20 | 0.2469 | 4.94 |
| 50 | 0.3214 | 6.43 |
| 100 | 0.3726 | 7.45 |
| Monte Carlo standard error at rate 0.2: 0.0028 |
核心公式
\[L_n=\sqrt{\frac{1}{1+n\tau^2}}\exp\!\left(\frac{\tau^2S_n^2}{2(1+n\tau^2)}\right).\]
查看完整验算程序
# Chapter 6. p61: Peeking at an A/A test and stopping at the first
# "significant" look inflates false alarms. Model: two identical
# arms; the per-visitor difference is N(0, 1), so the running total
# S_n is a fair (Gaussian) walk. At each look the two-sided z test
# |S_n| / sqrt(n) > 1.96 is applied; the test "wins" at the first
# look that crosses. Looks are evenly spaced over 10000 visitors.
# Fixed-seed Monte Carlo, 20000 tests; the plan is illustrative.
import math
import random
rng = random.Random(20261113)
TOTAL, GRID, REPS = 10000, 100, 20000
STEP = TOTAL // GRID
LOOKS = (1, 2, 5, 10, 20, 50, 100)
first = {k: 0 for k in LOOKS}
for _ in range(REPS):
s = 0.0
path = []
for i in range(GRID):
s += rng.gauss(0.0, math.sqrt(STEP))
path.append(s)
for k in LOOKS:
every = GRID // k
for j in range(every - 1, GRID, every):
n = (j + 1) * STEP
if abs(path[j]) / math.sqrt(n) > 1.96:
first[k] += 1
break
print("A/A test, nominal two-sided level 0.05, %d tests" % REPS)
print("%6s %16s %8s" % ("looks", "false alarm rate", "x 0.05"))
for k in LOOKS:
r = first[k] / REPS
print("%6d %16.4f %8.2f" % (k, r, r / 0.05))
print("Monte Carlo standard error at rate 0.2: %.4f" % math.sqrt(
0.2 * 0.8 / REPS))唯一数据源与引用
范雅福(Fan, Y.). (2026). 《杜布鞅论可选停时定理、加倍追注谬误与商业试错见好就收停损界母典》第 6 章「偷看与早停:在线试验里的可选停止与检验鞅」(版本 1.0.0). 5D Library. DOI 待发布
DOI 待发布 · 专著页正式发布后上线(本站暂无专著页) · 5DL-B-249 · v1.0.0 · CC-BY-NC-ND-4.0
BibTeX
@book{fan2026249,
author = {Fan, Yafu},
title = {Doob's Martingales and the Optional Stopping Theorem: the Doubling Fallacy and Rigorous Stop-Loss Bounds for Business Trials},
year = {2026},
publisher = {5D Library},
edition = {1.0.0},
note = {DOI pending}
}