关于「没有历史的先验:六种来源与一次合成」,《冷启动测价与贝叶斯调价》给出的定量结论是什么?
结论:零历史时,老板手里有六种信息。成本给出硬边界:栖桐工作室虚构的单位成本 32.50 元、一成费用,零贡献下限 36.11 元,四成贡献率下限 65.00 元。竞品带的几何平均 117.5 元,相邻品类锚 126.7 元,Gabor–Granger 梯子的收入最高级 119 元,专家校准后的合成 142.0 元,加上上一章 NMS 的 140.0 元,合成为中心 128.6 元的对数正态先验,保守八成区间 100.6 到 164.3 元。简化联合分析不给价格水平,只给功能的价差:礼盒约 21.8 元,视频导读约 26.7 元。四个价格臂各自有一个 n0 = 60 的 Beta 先验,按收入排序时 129 元领先,按转化率排序时 99 元领先。第一周的虚构数据显示,弱先验会被运气左右,所以后验先用来调流量,不用来关臂。下一章把这些先验交给赌博机,在真实流量上边卖边学。
数据口径:价格展示与分群定价的法规只写一般框架,不是法律或税务意见。 书中以标注框区分已发表的证据、可运行的计算、原典与作者的假说,每条假说都写明什么结果会推翻它;原典考辨取《管子·国蓄》的轻重敛散与「准平」。
对照数据表
下表数字由本章 Python 程序原样打印,可重新运行复现。 程序只用 Python 标准库与结论吻合的打印值: 100.6, 117.5, 126.7, 128.6, 129, 140.0
| NMS revenue max | 140.0 yuan log sd 0.200 weight 0.366 |
| Gabor-Granger max | 119.0 yuan log sd 0.200 weight 0.366 |
| pooled experts | 142.0 yuan log sd 0.472 weight 0.066 |
| competitor band | 117.5 yuan log sd 0.419 weight 0.083 |
| adjacent anchor | 126.7 yuan log sd 0.350 weight 0.119 |
| prior on log price: centre 128.6 yuan, sd 0.121 | 80% 110.1 .. 150.1 |
| if only 2 sources were independent: sd 0.191 | 80% 100.6 .. 164.3; floor 65.00 stays |
| arm NMS trial prior mean Beta a Beta b revenue/visitor | |
| 99 | 0.196 0.0307 1.84 58.16 3.04 |
| 129 | 0.192 0.0300 1.80 58.20 3.87 |
| 149 | 0.164 0.0257 1.54 58.46 3.84 |
| 179 | 0.118 0.0185 1.11 58.89 3.31 |
| prior P(arm is revenue-best) | 99 0.186 129 0.292 149 0.294 179 0.228 |
| arm visitors sales posterior mean prior weight | |
| 99 | 300 10 0.0329 0.167 |
| 129 | 300 9 0.0300 0.167 |
| 149 | 300 3 0.0126 0.167 |
| 179 | 300 4 0.0142 0.167 |
| invented true revenue/visitor | 99 3.366 129 3.870 149 3.874 179 2.864 |
| posterior P(arm is revenue-best) | 99 0.280 129 0.561 149 0.036 179 0.124 |
| belief mean 0.03 sd 0.01 -> n0 | 290 visitors |
| belief mean 0.03 sd 0.02 -> n0 | 72 visitors |
查看完整验算程序
# Chapter 3. p35: Merging the zero-history sources into a normal prior on log price and Beta priors per arm.
# (a) Each source's estimate of the revenue-best launch price, with an analyst-assigned log sd (ASSUMED):
# NMS revenue maximum 140 (p23), sd 0.20; Gabor-Granger ladder maximum 119 (p32), sd 0.20;
# pooled experts 142.0 (p34), sd 0.472; competitor geometric mean 117.5 (p31), sd 0.419;
# adjacent-category anchor 126.7 (p31), sd 0.35. Precision-weighted on the log scale; because the
# sources share errors, the sd is also shown inflated as if only 2 of the 5 sources were independent.
# The cost floor at a 40% target margin, 65.00 (p30), is a hard lower bound, not a source.
# (b) Beta priors for four price arms. Shape from the NMS trial curve of p23 (same fictional survey,
# base weights), scaled so the 129-yuan arm has prior mean 0.030 (an ASSUMED page conversion, to be
# replaced by the shop's own funnel data); prior strength n0 = 60 visitors. Week-one data are invented:
# 300 visitors per arm, sales drawn from invented true rates (seed 3503).
# Moment matching: a belief "mean m, sd s" is a Beta with n0 = m (1 - m) / s^2 - 1.
import math
import random
SEED, N, CENTER, SIGMA = 13302, 300, 150.0, 0.28
def r5(x):
return max(5, 5 * round(x / 5))
def survey(n=N, seed=SEED):
rng = random.Random(seed)
rows = []
for _ in range(n):
m = math.exp(rng.gauss(math.log(CENTER), SIGMA))
tc, ch = r5(m * rng.uniform(0.40, 0.60)), r5(m * rng.uniform(0.70, 0.88))
ex, te = r5(m * rng.uniform(1.12, 1.35)), r5(m * rng.uniform(1.45, 1.95))
if rng.random() < 0.07:
ch, ex = ex, ch
rows.append((tc, ch, ex, te))
return [r for r in rows if r[0] < r[1] < r[2] < r[3]]
def intents(rows, seed=2301):
rng = random.Random(seed)
out = []
for _ in rows:
u = rng.random()
a = 5 if u < 0.22 else 4 if u < 0.52 else 3 if u < 0.78 else 2 if u < 0.93 else 1
v = rng.random()
drop = 0 if v < 0.25 else 1 if v < 0.70 else 2 if v < 0.95 else 3
out.append((a, max(1, a - drop)))
return out
def prob(row, w_c, w_e, p):
tc, ch, ex, te = row
if p < tc or p >= te:
return 0.0
if p <= ch:
return w_c
if p <= ex:
return w_c + (w_e - w_c) * (p - ch) / (ex - ch)
return w_e * (te - p) / (te - ex)
def curve(rows, ans, weights, grid):
t = []
for p in grid:
t.append(math.fsum(prob(r, weights[a], weights[b], p) for r, (a, b) in zip(rows, ans)) / len(rows))
return t
BASE = {5: 0.70, 4: 0.30, 3: 0.10, 2: 0.0, 1: 0.0}
SOURCES = [("NMS revenue max", 140.0, 0.20), ("Gabor-Granger max", 119.0, 0.20),
("pooled experts", 142.0, 0.472), ("competitor band", 117.5, 0.419),
("adjacent anchor", 126.7, 0.35)]
ARMS, REF, C_REF, N0 = (99, 129, 149, 179), 129, 0.030, 60
TRUE_RATES, VISITORS = (0.034, 0.030, 0.026, 0.016), 300
def best_share(params, rng, draws=20000):
wins = [0] * len(params)
for _ in range(draws):
rev = [p * rng.betavariate(a, b) for p, (a, b) in zip(ARMS, params)]
wins[rev.index(max(rev))] += 1
return [w / draws for w in wins]
if __name__ == "__main__":
w = [1 / sd ** 2 for _, _, sd in SOURCES]
mu = math.fsum(wi * math.log(m) for wi, (_, m, _) in zip(w, SOURCES)) / math.fsum(w)
sd = math.sqrt(1 / math.fsum(w))
wide = sd * math.sqrt(len(SOURCES) / 2)
for (name, m, s), wi in zip(SOURCES, w):
print(" {:<18} {:6.1f} yuan log sd {:.3f} weight {:.3f}".format(name, m, s, wi / math.fsum(w)))
print(" prior on log price: centre {:.1f} yuan, sd {:.3f} -> 80% {:.1f} .. {:.1f}".format(
math.exp(mu), sd, math.exp(mu - 1.2816 * sd), math.exp(mu + 1.2816 * sd)))
print(" if only 2 sources were independent: sd {:.3f} -> 80% {:.1f} .. {:.1f}; floor 65.00 stays"
.format(wide, math.exp(mu - 1.2816 * wide), math.exp(mu + 1.2816 * wide)))
rows = survey()
ans = intents(rows)
t = {p: curve(rows, ans, BASE, [p])[0] for p in ARMS}
params = []
print(" arm NMS trial prior mean Beta a Beta b revenue/visitor")
for p in ARMS:
m = C_REF * t[p] / t[REF]
params.append((m * N0, (1 - m) * N0))
print(" {:3d} {:10.3f} {:11.4f} {:8.2f} {:8.2f} {:12.2f}".format(
p, t[p], m, m * N0, (1 - m) * N0, p * m))
rng = random.Random(3502)
print(" prior P(arm is revenue-best): " + " ".join(
"{} {:.3f}".format(p, x) for p, x in zip(ARMS, best_share(params, rng))))
data = random.Random(3503)
post = []
print(" arm visitors sales posterior mean prior weight")
for p, (a, b), r in zip(ARMS, params, TRUE_RATES):
s = sum(1 for _ in range(VISITORS) if data.random() < r)
post.append((a + s, b + VISITORS - s))
print(" {:3d} {:9d} {:6d} {:15.4f} {:13.3f}".format(p, VISITORS, s, (a + s) / (a + b + VISITORS),
N0 / (N0 + VISITORS)))
print(" invented true revenue/visitor: " + " ".join(
"{} {:.3f}".format(p, p * r) for p, r in zip(ARMS, TRUE_RATES)))
print(" posterior P(arm is revenue-best): " + " ".join(
"{} {:.3f}".format(p, x) for p, x in zip(ARMS, best_share(post, rng))))
for m, s in ((0.03, 0.01), (0.03, 0.02)):
print(" belief mean {:.2f} sd {:.2f} -> n0 = {:.0f} visitors".format(
m, s, m * (1 - m) / s ** 2 - 1))唯一数据源与引用
范雅福(Fan, Y.). (2026). 《零历史数据冷启动测价、范氏价格敏感度边界与贝叶斯自适应调价母典》第 3 章「没有历史的先验:六种来源与一次合成」(版本 0.1.0). 5D Library. DOI 待发布
DOI 待发布 · 专著页正式发布后上线(本站暂无专著页) · 5DL-B-133 · v0.1.0 · CC-BY-NC-ND-4.0
BibTeX
@book{fan2026133,
author = {Fan, Yafu},
title = {Zero-History Cold-Start Price Testing, Van Westendorp Sensitivity Bounds and Bayesian Adaptive Repricing},
year = {2026},
publisher = {5D Library},
edition = {0.1.0},
note = {DOI pending}
}