What does The Life of a Rule conclude, in numbers, about “Classical Sources East and West: Checking by Trial in the Han Feizi, and Wald's Sequential Analysis”?
Answer: "Certainty without checking is folly" from the Han Feizi becomes a concrete number in p71: promote without trial and 0.9000 of the promotion list is useless. Harnessing the horse and watching it to the end of the road is one sequential test, with a useless share of 0.2554; ministers rising from the provinces is two-stage selection, with a useless share of 0.0129 but power down to 0.7594, much like one single-stage test at alpha 0.0025. Wald's Sequential Analysis passes nine exact checks in p72: all three inequalities hold, the true beta' occasionally exceeds its target slightly, and the inequality on the sum always holds. The ancient author supplied an attitude, Wald supplied an algorithm, and the first six chapters supplied the pipeline. The remaining question is the most practical one: on Monday morning, when the owner opens the weekly radar's report, what should be done and in what order? How is the distilled tool used? And how should a test be pre-registered so that the claims of this book face the verdict of real data? Chapter 8 answers.
Scope of the numbers: Marked boxes separate published evidence, runnable Python calculations (20 programs), classical sources and the author's hypotheses.
Data table
The numbers below are printed verbatim by the chapter's Python program and can be reproduced by running it. standard-library Python onlyprinted values that match the answer: 0.0025, 0.0129, 0.2554, 0.7594, 0.9000
| pi good = 0.10; weeks = mean weekly batches used | |||||
| policy | dud rate | power | dud share | wk dud | wk good |
| no trial (bi zhi) | 1.00000 | 1.0000 | 0.9000 | 0.00 | 0.00 |
| one SPRT 0.05 | 0.03322 | 0.8714 | 0.2554 | 5.83 | 7.71 |
| staged 0.05 + 0.05 | 0.00110 | 0.7594 | 0.0129 | 6.02 | 14.42 |
| one SPRT 0.0025 | 0.00163 | 0.8745 | 0.0165 | 6.49 | 15.30 |
Show the full program
# 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))Single source and citation
Fan, Y. (2026). Empirical Retirement of Live Rules: Wiring the Sequential Probability Ratio Test into Real Conversion Streams to Promote, Demote and Retire Copy Rules (Version 1.0.0), Chapter 7: Classical Sources East and West: Checking by Trial in the Han Feizi, and Wald's Sequential Analysis. 5D Library. DOI pending
DOI pending · monograph page goes live after publication · 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}
}Other chapter answers in this book
- Chapter 1 · A Weekly Glance: How a Mediocre Copy Rule Gets Promoted by Mistake
- Chapter 2 · Wald's Two Straight Lines: Boundaries, the OC Function and the Mean Sample Size
- Chapter 3 · Exact Recursions: the Long Tail of the Sample Size and the Cost of a Cap
- Chapter 4 · Connecting Real Conversion Streams: Weekly Batches and Where the Baseline Comes From
- Chapter 5 · The Rule Lifecycle as a State Machine: Promotion, Demotion and Retirement
- Chapter 6 · Many Rules in Parallel: Sharing Alpha, and How Many Promoted Rules Are Duds
- Chapter 8 · Closing the Loop: Wiring the Weekly Radar's Verdicts into the Rule State Machine