关于「奖励函数:每访客净贡献,而不是转化率」,《夜间自治漏斗》给出的定量结论是什么?
结论:以付款率为奖励时,实现的付款率是 0.0550,每访客净贡献是 1.7140;流量份额里打折版拿走 0.623,信任版只有 0.124。以净贡献为奖励时,付款率是 0.0505,略低;每访客净贡献却是 1.9453,高出一截;信任版拿到 0.615 的流量,打折版只剩 0.064。
数据口径:书中参数为示意;全部计算由书中 23 段程序生成;本书是非个人化的经营分析,不构成经营、法律或财务建议,不宣称任何转化率提升的保证。
对照数据表
下表数字由本章 Python 程序原样打印,可重新运行复现。 程序只用 Python 标准库与结论吻合的打印值: 0.0505, 0.0550, 0.064, 0.124, 0.615, 0.623
| reward | pay rate | net/visitor | share: control disc20 trust bundle | ||
| conv | 0.0550 | 1.7140 | 0.068 | 0.623 0.124 | 0.185 |
| net | 0.0505 | 1.9453 | 0.174 | 0.064 0.615 | 0.146 |
| visitors 20,000 per run, 40 runs |
查看完整验算程序
# Chapter 3. p32: Thompson sampling with two reward definitions.
# Rule "conv" rewards a payment (Bernoulli). Rule "net" keeps a Beta
# posterior for the pay rate and one for the refund rate of each
# variant, and ranks the draw conv * ((1 - r) * margin - r * handling),
# with margins known from the price list. Variants as in p31.
import math
import random
HANDLING = 6.0
NAMES = ["control", "discount20", "trust_sample", "bundle_low"]
CONV = [0.046, 0.058, 0.050, 0.052]
MARGIN = [42.0, 30.0, 42.0, 36.0]
REFUND = [0.040, 0.050, 0.035, 0.040]
T = 20000
REPS = 40
rng = random.Random(40532)
def run(rule):
k = len(NAMES)
pay, n, ref = [0] * k, [0] * k, [0] * k
net = []
for _ in range(T):
best, arm = None, 0
for a in range(k):
c = rng.betavariate(1 + pay[a], 1 + n[a] - pay[a])
if rule == "conv":
v = c
else:
r = rng.betavariate(1 + ref[a], 1 + pay[a] - ref[a])
v = c * ((1 - r) * MARGIN[a] - r * HANDLING)
if best is None or v > best:
best, arm = v, a
n[arm] += 1
if rng.random() < CONV[arm]:
pay[arm] += 1
if rng.random() < REFUND[arm]:
ref[arm] += 1
net.append(-HANDLING)
else:
net.append(MARGIN[arm])
paid = 0
for a in range(k):
paid += pay[a]
return paid / T, math.fsum(net) / T, [x / T for x in n]
print("reward pay rate net/visitor share: control disc20 trust bundle")
for rule in ["conv", "net"]:
pr, nv, sh = [], [], [[] for _ in NAMES]
for _ in range(REPS):
a, b, c = run(rule)
pr.append(a)
nv.append(b)
for i in range(len(NAMES)):
sh[i].append(c[i])
m = [math.fsum(x) / REPS for x in sh]
print("{:<6} {:>9.4f} {:>12.4f} {:>12.3f} {:>6.3f} {:>5.3f} {:>6.3f}"
.format(rule, math.fsum(pr) / REPS, math.fsum(nv) / REPS, *m))
print("visitors {:,} per run, {} runs".format(T, REPS))唯一数据源与引用
范雅福(Fan, Y.). (2026). 《夜间自治漏斗微创调优、多臂赌博机流量自动倾斜与零人工转化率自举母典》第 3 章「奖励函数:每访客净贡献,而不是转化率」(版本 1.0.0). 5D Library. DOI 待发布
DOI 待发布 · 专著页正式发布后上线(本站暂无专著页) · 5DL-B-405 · v1.0.0 · CC-BY-NC-ND-4.0
BibTeX
@book{fan2026405,
author = {Fan, Yafu},
title = {Autonomous Nightly Funnel Micro-Surgery, Bandit Traffic Allocation and Zero-Touch Conversion Self-Improvement},
year = {2026},
publisher = {5D Library},
edition = {1.0.0},
note = {DOI pending}
}