关于「出手时机:发问即证据、成本门槛与校准」,《隐马尔可夫与客户决策阶段》给出的定量结论是什么?

结论:第六章给出出手时机:不先开口、问价必答、同价、紧迫感只来自真实,回答其他问题时按校准后验与代价门槛决定是否附报价,把发问本身算作证据后每千次发问代价 318.3,只用点击是 345.0;用错参数时过早报价从 0.0684 翻到 0.1449。

数据口径:书中阶段、页面类型与全部概率均为示意;全部计算由书中程序生成;本书是非个人化经营建议,只使用站内匿名化与客户同意的数据,不跨站追踪,不推断敏感属性,阶段解码不用于施压、差别定价或主动联系客户,紧迫感只来自真实库存与真实截止。 第一章在示意参数下量出:前向滤波的四分类准确率比最后一次点击高 0.0410,就绪判别从 0.6990 提高到 0.7630;增益随阶段黏性与页面区分力在 0.0307 到 0.1187 之间变化,维特比最后一格在页面模糊时反而低 0.1007。

English version

对照数据表

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

20000 visits4498 price questions (always answered), 5577 other
ready share among other inquiries0.6595
rule quote rate early/notready miss/ready cost/1k
always quote1.0000 1.0000 0.0000 681.0
never quote0.0000 0.0000 1.0000 659.5
last page SHIP+0.3181 0.1306 0.5851 474.8
clicks only 0.5000.5876 0.2396 0.2327 316.7
clicks only 0.6670.4361 0.1190 0.4002 345.0
with ask0.500 0.7124 0.4034 0.1281 359.2
with ask0.667 0.5779 0.2317 0.2433 318.3
with ask0.800 0.4223 0.1127 0.4179 352.3

核心公式

\[p \ge \frac{c_e}{c_e + c_m}.\]
查看完整验算程序
# Chapter 6. p61: when a reply may carry a quote.
# Model: the four-stage HMM of p11 (illustrative). At every click a
# visitor may open a chat on her own (chance by stage 0.01, 0.03, 0.06,
# 0.10); the first such inquiry ends the simulated visit. A price
# question is always answered with the real price (chance by stage
# 0.10, 0.20, 0.40, 0.60). For any other question the shop decides
# whether to add a quote to its answer. Ready = compare or decide at
# that click. A quote to a visitor not ready is premature (cost 2); no
# quote to a ready visitor is a miss (cost 1); Bayes cut 2/(2+1).
# The posterior is taken from the clicks alone, and again with the
# inquiry itself counted as evidence (ready visitors ask more often).
# No rule ever sends a message the visitor did not ask for.
import math
import random

PI = [0.70, 0.20, 0.08, 0.02]
A = [[0.70, 0.22, 0.06, 0.02],
     [0.08, 0.64, 0.23, 0.05],
     [0.02, 0.10, 0.66, 0.22],
     [0.01, 0.03, 0.16, 0.80]]
B = [[0.45, 0.30, 0.08, 0.07, 0.06, 0.04],
     [0.15, 0.35, 0.25, 0.12, 0.08, 0.05],
     [0.08, 0.22, 0.15, 0.30, 0.17, 0.08],
     [0.05, 0.12, 0.08, 0.15, 0.30, 0.30]]
ASK = [0.01, 0.03, 0.06, 0.10]
PRICE_Q = [0.10, 0.20, 0.40, 0.60]
C_EARLY, C_MISS = 2.0, 1.0
K = 4


def draw(rng, probs):
    u, acc = rng.random(), 0.0
    for k, p in enumerate(probs):
        acc += p  # step
        if u < acc:
            return k
    return len(probs) - 1


rng = random.Random(20261113)
cases = []
n_visits = 20000
n_price = 0
for _ in range(n_visits):
    s = draw(rng, PI)
    f = None
    for t in range(14):
        if t:
            s = draw(rng, A[s])
        o = draw(rng, B[s])
        if f is None:
            f = [PI[k] * B[k][o] for k in range(K)]
        else:
            f = [math.fsum(f[i] * A[i][j] for i in range(K)) * B[j][o]
                 for j in range(K)]
        z = math.fsum(f)
        f = [x / z for x in f]
        if rng.random() < ASK[s]:
            if rng.random() < PRICE_Q[s]:
                n_price += 1  # step
            else:
                # 发问本身也是证据:乘上各阶段「发问且非问价」的概率
                g = [f[k] * ASK[k] * (1 - PRICE_Q[k]) for k in range(K)]
                cases.append((s >= 2, math.fsum(f[2:]), o >= 4,
                              math.fsum(g[2:]) / math.fsum(g)))
            break
n = len(cases)
n_ready = len([1 for c in cases if c[0]])
print("%d visits: %d price questions (always answered), %d other"
      % (n_visits, n_price, n))
print("ready share among other inquiries: %.4f" % (n_ready / n))
print("rule              quote rate  early/notready  miss/ready  cost/1k")
rules = [("always quote", lambda c: True),
         ("never quote", lambda c: False),
         ("last page SHIP+", lambda c: c[2])]
for th in (0.5, C_EARLY / (C_EARLY + C_MISS)):
    rules.append(("clicks only %.3f" % th,
                  lambda c, th=th: c[1] >= th))
for th in (0.5, C_EARLY / (C_EARLY + C_MISS), 0.8):
    rules.append(("with ask   %.3f" % th,
                  lambda c, th=th: c[3] >= th))
for name, rule in rules:
    q = [rule(c) for c in cases]
    early = len([1 for c, x in zip(cases, q) if x and not c[0]])
    miss = len([1 for c, x in zip(cases, q) if c[0] and not x])
    cost = (C_EARLY * early + C_MISS * miss) / n * 1000
    print("%-17s %10.4f  %14.4f  %10.4f  %7.1f"
          % (name, len([1 for x in q if x]) / n, early / (n - n_ready),
             miss / n_ready, cost))

唯一数据源与引用

范雅福(Fan, Y.). (2026). 《隐马尔可夫维特比解码、浏览点击序列反推客户隐藏决策阶段与出手时机母典》第 6 章「出手时机:发问即证据、成本门槛与校准」(版本 1.0.0). 5D Library. DOI 待发布

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

BibTeX
@book{fan2026300,
  author    = {Fan, Yafu},
  title     = {Hidden Markov Models and Viterbi Decoding: Inferring a Customer's Hidden Decision Stage from Click Sequences and Timing the Offer},
  year      = {2026},
  publisher = {5D Library},
  edition   = {1.0.0},
  note      = {DOI pending}
}

本书其他章节结论