关于「东西方原典考辨:《韩非子·显学》的参验与 Wald 的《序贯分析》」,《规则的一生》给出的定量结论是什么?

结论:《韩非子·显学》的「无参验而必之者,愚也」,在 p71 里是一个具体的数:不试就转正,转正名单中 0.9000 是无效规则。「授车就驾,观其末涂」是一次序贯检验,无效份额 0.2554;「宰相必起于州部」是两级选拔,无效份额 0.0129,但功效降到 0.7594,与一次 α 为 0.0025 的单级检验相差不大。Wald 的《序贯分析》在 p72 里接受了九组精确核对,三条不等式全部成立,真实 β′ 偶尔略超目标,但和的不等式始终守住。古人给出了态度,Wald 给出了算法,前六章补上了流水线。剩下的问题是最实际的:下周一早上,经营者打开每周雷达的报告,应该按什么顺序做什么?蒸馏出来的小工具怎么用?又该怎样预先登记一次检验,让本书的主张接受真实数据的裁决?第八章回答。

数据口径:书中的转化率、流量与每周计数均为示意;全部计算由书中程序生成;本书属非个人化经营方法,不构成经营、法律或投资建议,规则的转正、降级与退役须由主事者人工放行,紧迫感只能来自真实库存与真实截止。 书中以标注框区分已发表的证据、可运行的 Python 计算(20 段程序)、原典与作者的假说。

English version

对照数据表

下表数字由本章 Python 程序原样打印,可重新运行复现。 程序只用 Python 标准库与结论吻合的打印值: 0.0025, 0.0129, 0.2554, 0.7594, 0.9000

pi good = 0.10; weeks = mean weekly batches used
policydud ratepowerdud sharewk dudwk good
no trial (bi zhi)1.000001.00000.90000.000.00
one SPRT 0.050.033220.87140.25545.837.71
staged 0.05 + 0.050.001100.75940.01296.0214.42
one SPRT 0.00250.001630.87450.01656.4915.30
查看完整验算程序
# Chapter 7. p71: Han Feizi's three trials as promotion policies
# Model: "no trial, yet certain" promotes every candidate, so the share
# of duds among promoted rules is 1 - pi. "Harness the horse and watch
# it run" is one SPRT. "Ministers rise from the provinces" is a staged
# promotion: a local SPRT, then a confirming SPRT on fresh traffic.
# Exact weekly-batch recursion (600 visitors a week, p0 0.03, p1 0.036,
# beta 0.20), as in p41. Share of good rules pi = 0.10 (illustrative).
# Staged results assume the two stages use independent visitors.
import math

P0, P1, M, BETA, PI = 0.03, 0.036, 600, 0.20, 0.10
LA = math.log(P1 / P0)
LB = math.log((1 - P1) / (1 - P0))


def pmf(p):
    hi = min(M, int(M * p + 14 * math.sqrt(M * p * (1 - p))) + 2)
    return [math.exp(math.lgamma(M + 1) - math.lgamma(j + 1)
                     - math.lgamma(M - j + 1) + j * math.log(p)
                     + (M - j) * math.log(1 - p)) for j in range(hi + 1)]


def batched(p, alpha, n_max=90000):
    a = math.log((1 - BETA) / alpha)
    b = math.log(BETA / (1 - alpha))
    step = pmf(p)
    open_k, keep, surv = {0: 1.0}, [], [1.0]
    for t in range(1, n_max // M + 1):
        n = t * M
        bins = {}
        for k, w in open_k.items():
            for j, q in enumerate(step):
                bins.setdefault(k + j, []).append(w * q)
        open_k = {}
        for k in sorted(bins):
            mass = math.fsum(bins[k])
            llr = k * LA + (n - k) * LB
            if llr >= a:
                keep.append(mass)
            elif llr > b:
                open_k[k] = mass
        surv.append(math.fsum(open_k.values()))
    return math.fsum(keep), math.fsum(surv[:-1])


a1, n0 = batched(P0, 0.05)
w1, n1 = batched(P1, 0.05)
a2, m0 = batched(P0, 0.0025)
w2, m1 = batched(P1, 0.0025)
rows = [
    ("no trial (bi zhi)", 1.0, 1.0, 0.0, 0.0),
    ("one SPRT 0.05", a1, w1, n0, n1),
    ("staged 0.05 + 0.05", a1 * a1, w1 * w1, n0 * (1 + a1),
     n1 * (1 + w1)),
    ("one SPRT 0.0025", a2, w2, m0, m1),
]
print("pi good = %.2f; weeks = mean weekly batches used" % PI)
print("policy              dud rate   power  dud share  wk dud  wk good")
for name, a, w, e0, e1 in rows:
    share = (1 - PI) * a / ((1 - PI) * a + PI * w)
    print("%-18s  %8.5f  %6.4f  %9.4f  %6.2f  %7.2f"
          % (name, a, w, share, e0, e1))

唯一数据源与引用

范雅福(Fan, Y.). (2026). 《线上规则实证淘汰、序贯概率比检验接入真实转化流与新文案规则转正降级母典》第 7 章「东西方原典考辨:《韩非子·显学》的参验与 Wald 的《序贯分析》」(版本 1.0.0). 5D Library. DOI 待发布

DOI 待发布 · 专著页正式发布后上线(本站暂无专著页) · 5DL-B-263 · v1.0.0 · CC-BY-NC-ND-4.0

BibTeX
@book{fan2026263,
  author    = {Fan, Yafu},
  title     = {Empirical Retirement of Live Rules: Wiring the Sequential Probability Ratio Test into Real Conversion Streams to Promote, Demote and Retire Copy Rules},
  year      = {2026},
  publisher = {5D Library},
  edition   = {1.0.0},
  note      = {DOI pending}
}

本书其他章节结论