关于「规则生命周期状态机:转正、降级与淘汰」,《规则的一生》给出的定量结论是什么?
结论:第五章用穷举检查八状态的规则状态机,用 Page 累积和监视磨损,以吸收链算出磨损规则平均还在线 8.54 周。
数据口径:书中的转化率、流量与每周计数均为示意;全部计算由书中程序生成;本书属非个人化经营方法,不构成经营、法律或投资建议,规则的转正、降级与退役须由主事者人工放行,紧迫感只能来自真实库存与真实截止。 书中以标注框区分已发表的证据、可运行的 Python 计算(20 段程序)、原典与作者的假说。
对照数据表
下表数字由本章 Python 程序原样打印,可重新运行复现。 程序只用 Python 标准库与结论吻合的打印值: 8.54
| start: just promoted, working; wear-out hazard 1/52 per week | |||||
| h | weeks OK | WORN live | re-test OK | re-test WORN | P(cut while OK) |
| 2.0 | 40.6 | 4.95 | 6.18 | 5.42 | 0.1012 |
| 3.0 | 47.5 | 8.54 | 2.41 | 5.79 | 0.0395 |
| 4.0 | 50.2 | 12.04 | 0.95 | 5.93 | 0.0155 |
| h 3.0: expected life 64.3 weeks; P(cut OK) + P(cut WORN) = 1.0000 |
查看完整验算程序
# Chapter 5. p53: weeks a worn-out rule keeps running, as an absorbing
# Markov chain (Kemeny and Snell's fundamental matrix N = (I - Q)^-1)
# Model, one step = one week, starting at promotion. Transient states:
# OK (promoted, still working), WORN (promoted, silently worn out),
# WOK (re-test after a false alarm), WWORN (re-test of a worn rule).
# Absorbing: CUT-OK (a working rule demoted) and CUT-WORN (a worn rule
# demoted). Wear-out hazard 1/52 a week (illustrative). Alarm chances
# are 1/ARL0 and 1/ARL1 from p52; a re-test ends each week with chance
# 600/E[N] and keeps with the exact batched P(KEEP) from p41 (m = 600):
# working 0.8714 at E[N] 4624, worn 0.0332 at E[N] 3495. Approximating
# the re-test length as geometric is the model's main simplification.
from fractions import Fraction as F
import math
WEAR = 1 / 52
CUSUM = {2.0: (43.9, 6.10), 3.0: (132.0, 9.02), 4.0: (354.2, 12.04)}
RE_OK, RE_WORN = (0.8714, 4624), (0.0332, 3495)
S = ["OK", "WORN", "WOK", "WWORN"]
def solve(mat):
n = len(mat)
aug = [[F(x) for x in row] + [F(int(i == j)) for j in range(n)]
for i, row in enumerate(mat)]
for c in range(n):
piv = next(r for r in range(c, n) if aug[r][c] != 0)
aug[c], aug[piv] = aug[piv], aug[c]
pv = aug[c][c]
aug[c] = [x / pv for x in aug[c]]
for r in range(n):
if r != c and aug[r][c] != 0:
f = aug[r][c]
aug[r] = [x - f * y for x, y in zip(aug[r], aug[c])]
return [[float(x) for x in row[n:]] for row in aug]
def chain(h):
arl0, arl1 = CUSUM[h]
a0, a1 = 1 / arl0, 1 / arl1
e_ok, e_worn = 600 / RE_OK[1], 600 / RE_WORN[1]
q = [[0.0] * 4 for _ in range(4)]
r = [[0.0] * 2 for _ in range(4)]
q[0][0] = (1 - WEAR) * (1 - a0)
q[0][1] = WEAR
q[0][2] = (1 - WEAR) * a0
q[1][1] = 1 - a1
q[1][3] = a1
q[2][2] = (1 - WEAR) * (1 - e_ok)
q[2][3] = WEAR
q[2][0] = (1 - WEAR) * e_ok * RE_OK[0]
r[2][0] = (1 - WEAR) * e_ok * (1 - RE_OK[0])
q[3][3] = 1 - e_worn
q[3][1] = e_worn * RE_WORN[0]
r[3][1] = e_worn * (1 - RE_WORN[0])
i_q = [[float(i == j) - q[i][j] for j in range(4)] for i in range(4)]
n = solve(i_q)
absorb = [math.fsum(n[0][k] * r[k][j] for k in range(4))
for j in range(2)]
return n[0], absorb
print("start: just promoted, working; wear-out hazard 1/52 per week")
print(" h weeks OK WORN live re-test OK re-test WORN"
" P(cut while OK)")
for h in sorted(CUSUM):
row, ab = chain(h)
print("%4.1f %8.1f %9.2f %10.2f %12.2f %15.4f"
% (h, row[0], row[1], row[2], row[3], ab[0]))
row, ab = chain(3.0)
print("h 3.0: expected life %.1f weeks; P(cut OK) + P(cut WORN) = %.4f"
% (math.fsum(row), math.fsum(ab)))唯一数据源与引用
范雅福(Fan, Y.). (2026). 《线上规则实证淘汰、序贯概率比检验接入真实转化流与新文案规则转正降级母典》第 5 章「规则生命周期状态机:转正、降级与淘汰」(版本 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}
}