关于「扩散与买量:巴斯模型、多夫曼—斯坦纳条件与全周期支出」,《算法营销与归因》给出的定量结论是什么?
结论:巴斯方程 \(dF/dt = (p+qF)(1-F)\) 核对无误,峰值时刻 \(\ln(q/p)/(p+q)\);在峰值之前,市场规模与模仿系数难以分开估计,早期预测可能差一倍以上。多夫曼—斯坦纳条件(广告/销售额 = 广告弹性/价格弹性)核对无误,但它是静态条件,不能直接给出全周期分配。作者的全周期模型显示,在凹响应与口碑扩散下,最优支出前重后轻,比同预算的平均投放多获利 8.3%,而按销售额比例投放在同预算的三种投放中最差(仍优于不投放);在凹响应下脉冲投放总不如平均投放,在示例的 S 形响应下,脉冲只在月均预算相对较低(本例不超过 30 千)时有利,分界不等于拐点。
数据口径:一笔成交该算在哪个广告渠道头上?一个 A/B 测试什么时候可以停?一位客户还值多少钱?本书是教学与研究用的数学模型,不是营销、投资或法律建议。 第八章给出归因、实验、生命周期价值与预算四步核查表,以及一项预注册的模拟基准研究:在独立第三方冻结、已知真实增量的合成多渠道数据生成器上,比较观测沙普利归因与末次点击对真实增量份额的误差(唯一主要结局为二者平均绝对误差之差,最小关注效应 2 个百分点,90% 把握度需要 79 个合成世界、计划 90 个,判定规则写成代码)。
对照数据表
下表数字由本章 Python 程序原样打印,可重新运行复现。 程序只用 Python 标准库
| A. Bass p 0.01, q 0.4, market 100,000: peak adoption at month 9.00, | ||||
| F(peak) 0.4875 (formula 1/2 - p/(2q) = 0.4875); sales with 15 % noise | ||||
| fitted on | p | q | market M | peak month |
| (truth) | 0.0100 | 0.400 | 100,000 | 9.00 |
| months 1-6 | 0.0165 | 0.433 | 66,359 | 7.27 |
| months 1-9 | 0.0067 | 0.294 | 219,286 | 12.58 |
| months 1-12 | 0.0122 | 0.390 | 96,003 | 8.62 |
| months 1-36 | 0.0126 | 0.364 | 102,285 | 8.93 |
| B. Dorfman-Steiner: Q = k P^-eta A^beta, unit cost c = 10, k = 1e6 | ||||
| eta | beta | optimal A/(PQ) by search | beta/eta | optimal price |
| 2.0 | 0.10 | 0.0497 | 0.0500 | 20.00 (eta/(eta-1) c = 20.00) |
| 3.0 | 0.10 | 0.0333 | 0.0333 | 15.00 (eta/(eta-1) c = 15.00) |
| 2.0 | 0.25 | 0.1240 | 0.1250 | 20.00 (eta/(eta-1) c = 20.00) |
核心公式
查看完整验算程序
# A: Bass (1969) diffusion dF/dt = (p + qF)(1 - F): closed form, peak time
# ln(q/p)/(p+q) and F at the peak (1/2 - p/(2q)); p, q and market size M refitted
# by least squares to a FICTIONAL noisy monthly series, before and after the peak.
# B: Dorfman-Steiner (1954). With demand Q = k P^(-eta) A^beta and unit cost c, profit
# (P - c)Q - A is maximised at A/(PQ) = beta/eta (advertising elasticity over price
# elasticity); checked by a direct numerical search. The rule is STATIC: it says
# nothing about how to spread spend over a product's life (see p12).
import math, random
def bass_F(t, p, q):
e = math.exp(-(p + q) * t)
return (1 - e) / (1 + q / p * e)
def fit(sales):
"""Least squares over p, q (grid, then local search); the market size M enters
linearly, so for each (p, q) it is profiled out in closed form."""
def sse(pq):
g = [bass_F(t + 1, *pq) - bass_F(t, *pq) for t in range(len(sales))]
M = sum(a * b for a, b in zip(g, sales)) / sum(a * a for a in g)
return sum((M * a - b) ** 2 for a, b in zip(g, sales)), M
best = min(((sse((i / 2000, j / 100))[0], (i / 2000, j / 100))
for i in range(1, 60) for j in range(1, 150)))
(p, q), step = best[1], 0.0005
for _ in range(60):
cand = [(max(p + dp, 1e-5), max(q + dq, 1e-4)) for dp in (-step, 0, step)
for dq in (-10 * step, 0, 10 * step)]
p, q = min(cand, key=lambda pq: sse(pq)[0]); step *= 0.8
return p, q, sse((p, q))[1]
if __name__ == "__main__":
p, q, M = 0.01, 0.40, 100_000
tp = math.log(q / p) / (p + q)
print(f"A. Bass p {p}, q {q}, market {M:,}: peak adoption at month {tp:.2f},")
fp = 0.5 - p / (2 * q)
print(f" F(peak) {bass_F(tp, p, q):.4f} (formula 1/2 - p/(2q) = {fp:.4f});"
f" sales with 15 % noise")
rng = random.Random(1969)
sales = [max(0.0, M * (bass_F(t + 1, p, q) - bass_F(t, p, q))
* (1 + rng.gauss(0, 0.15))) for t in range(36)]
print(" fitted on p q market M peak month")
print(f" (truth) {p:.4f} {q:.3f} {M:9,.0f} {tp:5.2f}")
for n in (6, 9, 12, 36):
pp, qq, MM = fit(sales[:n])
print(f" months 1-{n:<3d} {pp:.4f} {qq:.3f} {MM:9,.0f}"
f" {math.log(qq / pp) / (pp + qq):5.2f}")
print("B. Dorfman-Steiner: Q = k P^-eta A^beta, unit cost c = 10, k = 1e6")
print(" eta beta optimal A/(PQ) by search beta/eta optimal price")
for eta, beta in ((2.0, 0.10), (3.0, 0.10), (2.0, 0.25)):
k, c = 1e6, 10.0
prof = lambda P, A: (P - c) * k * P ** -eta * A ** beta - A
best = max(((prof(P, A), P, A) for P in [10 + 0.05 * i for i in range(1, 600)]
for A in [10 * 1.03 ** j for j in range(500)]))
_, P, A = best; R = P * k * P ** -eta * A ** beta
print(f" {eta:3.1f} {beta:4.2f} {A / R:6.4f}"
f" {beta / eta:6.4f}"
f" {P:6.2f} (eta/(eta-1) c = {eta / (eta - 1) * c:.2f})")唯一数据源与引用
范雅福(Fan, Y.). (2026). 《算法营销、多触点沙普利归因与获客漏斗的随机控制》第 6 章「扩散与买量:巴斯模型、多夫曼—斯坦纳条件与全周期支出」(版本 1.0.0). 5D Library. https://doi.org/10.5281/zenodo.23836264
DOI: 10.5281/zenodo.23836264 · 阅读本章所在专著 · 5DL-B-048 · v1.0.0 · CC-BY-NC-ND-4.0
BibTeX
@book{fan2026048,
author = {Fan, Yafu},
title = {Algorithmic Marketing, Multi-Touch Shapley Attribution and Stochastic Control of Acquisition Funnels},
year = {2026},
publisher = {5D Library},
edition = {1.0.0},
doi = {10.5281/zenodo.23836264},
url = {https://doi.org/10.5281/zenodo.23836264}
}