5D Library › 算法营销、多触点沙普利归因与获客漏斗的随机控制 · English

第六章 扩散与买量:巴斯模型、多夫曼—斯坦纳条件与全周期支出

巴斯扩散模型

巴斯(Bass)1969 年在《管理科学》上提出了一个新产品首购的增长模型 (Bass 1969)。设潜在购买者总数为 MM,到时刻 tt 为止已购买的比例为 F(t)F(t),则

dFdt=(p+qF)(1−F).\frac{dF}{dt} = (p + qF)(1 – F).

pp 是创新系数:不受已购买者影响的外部影响(广告、媒体);qq 是模仿系数:已购买者通过口碑带来的内部影响。作者框架给出的方程核对无误。它的解为

F(t)=1−e−(p+q)t1+qpe−(p+q)t,F(t) = \frac{1 – e^{-(p+q)t}}{1 + \frac{q}{p}e^{-(p+q)t}},

当 q>pq > p 时,新增购买在 t*=ln⁡(q/p)/(p+q)t^* = \ln(q/p)/(p+q) 达到峰值,此时 F(t*)=12−p2qF(t^*) = \tfrac12 – \tfrac{p}{2q}。它是第 25 本中「简单传染」在完全混合人群中的版本:每个未购买者被已购买者影响的概率与已购买者的比例成正比,没有网络结构,也没有复杂传染的阈值。

证据

参数的经验范围。 苏尔坦(Sultan)、法利(Farley)与莱曼(Lehmann)对 15 篇文章中的 213 个扩散模型应用做了元分析,考察参数与创新类型、国家、模型设定和估计方法的关系 (Sultan et al. 1990)。不同产品与市场之间参数差异很大,所以本章的参数只是示意值。巴斯、克里希南(Krishnan)与杰恩(Jain)1994 年提出了把价格与广告等决策变量放进模型的「广义巴斯模型」,并解释了为什么不含决策变量的原始模型在许多数据上仍然拟合良好:当决策变量的百分比变化大致稳定时,它们的作用被吸收进了 pp 与 qq (Bass et al. 1994)。

多夫曼—斯坦纳条件

多夫曼(Dorfman)与斯坦纳(Steiner)1954 年研究了一家垄断企业如何同时选择价格、广告与质量 (Dorfman and Steiner 1954)。广告部分的结论是:在利润最大化处,

APQ=βη,\frac{A}{PQ} = \frac{\beta}{\eta},

即广告支出占销售额的比例等于需求的广告弹性 β\beta 除以价格弹性 η\eta(取正值)。直觉是:价格弹性越大,加价空间越小,每一元销售额带来的利润越少,广告就越不值得。

推导

# 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})")
# 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 部分取 p=0.01p = 0.01、q=0.40q = 0.40、M=100,000M = 100{,}000,峰值在第 9.00 个月,峰值时 F=0.4875F = 0.4875,与公式一致。然后在月度销量上加入 15% 的噪声,用最小二乘估计 pp、qq 与 MM。只用前 6 个月的数据时,估计的市场规模为 66,359,峰值月为 7.27;用前 9 个月(恰好到峰值)时,市场规模被估为 219,286,峰值月为 12.58;到 12 个月以后才稳定在真值附近。这说明一个实际问题:在峰值之前,巴斯模型的三个参数很难分开估计,早期的预测(包括据此做的预算)可能差一倍以上。

B 部分用常弹性需求 Q=kP−ηAβQ = kP^{-\eta}A^{\beta} 与单位成本 10 直接搜索最优价格与广告,得到的广告/销售额之比(0.0497、0.0333、0.1240)与 β/η\beta/\eta(0.0500、0.0333、0.1250)一致,差别来自网格的粗细;最优价格等于 ηc/(η−1)\eta c/(\eta – 1),是标准的加成定价。

注

多夫曼—斯坦纳条件是静态的。 它比较的是同一时期的边际收益与边际成本,没有「今天的广告带来明天的顾客」这一层。作者框架希望「结合巴斯扩散方程与多夫曼—斯坦纳定理求全周期最优买量分配」;把一个静态条件逐期套用到动态问题上,相当于假设每期的广告只影响当期。动态的问题需要把广告写进状态方程:纳洛夫(Nerlove)与阿罗(Arrow)1962 年把广告看作对「商誉」存量的投资,商誉随时间折旧 (Nerlove and Arrow 1962);维达尔(Vidale)与沃尔夫(Wolfe)1957 年较早地给出了销售对广告响应的微分方程 (Vidale and Wolfe 1957);霍斯基(Horsky)与西蒙(Simon)1983 年把广告放进巴斯模型的创新项,研究新产品生命周期中的最优广告路径 (Horsky and Simon 1983)。

作者的全周期买量模型

下面是作者的模型,思路与霍斯基和西蒙一致,但形式更简单,参数都是示意值。月度新增购买者为

nt=M(p0+g(At)+qFt)(1−Ft),n_t = M\bigl(p_0 + g(A_t) + qF_t\bigr)(1 – F_t),

AtA_t 是第 tt 月的获客支出,gg 是广告响应函数;目标是 36 个月内贴现利润 ∑tdt(mnt−At)\sum_t d^t (m\,n_t – A_t) 最大,每个新客户毛利 m=60m = 60,月贴现因子 d=0.98d = 0.98,M=100,000M = 100{,}000,p0=0.002p_0 = 0.002,q=0.20q = 0.20。用逐月黄金分割搜索求最优支出路径,再与同样总预算的三种规则比较:每月平均、按销售额的固定比例(多夫曼—斯坦纳式规则的动态套用)与不投放。

推导

# THE AUTHOR'S MODEL of "whole-life optimal acquisition spend" (a Bass model with
# advertising in the innovation term, in the spirit of Horsky & Simon 1983). Monthly:
#   new adopters n_t = M (p0 + g(A_t) + q F_t)(1 - F_t),  profit = sum d^t (m n_t - A_t)
# M 100,000, p0 0.002, q 0.20, margin m 60 per adopter, 36 months, d = 0.98.
# A: concave response g(A) = 0.02 ln(1 + A / 20,000). Optimal schedule by coordinate
#    search; compared with even spend and a Dorfman-Steiner-style constant share of
#    revenue, each with the same total budget, and with no advertising.
# B: S-shaped response g(A) = 0.03 A^2 / (40,000^2 + A^2): pulsing (twice the monthly
#    budget in alternate months) against even spend of the same total, months 1-12,
#    at several budgets, to locate where the better policy switches.
import math

M, P0, Q, MARGIN, T, D = 100_000, 0.002, 0.20, 60.0, 36, 0.98

def path(A, g):
    F, prof, sales = 0.0, 0.0, []
    for t, a in enumerate(A):
        n = M * min(P0 + g(a) + Q * F, 1.0) * (1 - F)
        F += n / M; sales.append(n); prof += D ** t * (MARGIN * n - a)
    return prof, sales, F

def optimise(g, sweeps=8):
    A = [20_000.0] * T
    for _ in range(sweeps):
        for t in range(T):
            lo, hi = 0.0, 400_000.0                    # golden-section on A_t
            for _ in range(40):
                m1, m2 = lo + 0.382 * (hi - lo), lo + 0.618 * (hi - lo)
                f1 = path(A[:t] + [m1] + A[t + 1:], g)[0]
                f2 = path(A[:t] + [m2] + A[t + 1:], g)[0]
                lo, hi = (lo, m2) if f1 > f2 else (m1, hi)
            A[t] = (lo + hi) / 2
    return A

def share_of_revenue(g, budget):
    lo, hi = 0.0, 1.0                                   # constant A_t = s * revenue_t
    for _ in range(50):
        s = (lo + hi) / 2; F, A = 0.0, []
        for t in range(T):
            a = 0.0
            for _ in range(30):                         # fixed point A = s * m * n(A)
                a = s * MARGIN * M * min(P0 + g(a) + Q * F, 1.0) * (1 - F)
            n = M * min(P0 + g(a) + Q * F, 1.0) * (1 - F); F += n / M; A.append(a)
        lo, hi = (s, hi) if sum(A) < budget else (lo, s)
    return A

if __name__ == "__main__":
    g1 = lambda a: 0.02 * math.log(1 + a / 20_000)
    A = optimise(g1); B = sum(A)
    print("A. concave response; profit in thousands, budget fixed at the optimum's total")
    print(f"   optimal schedule (thousands): months 1-6 "
          + " ".join(f"{a / 1e3:.0f}" for a in A[:6])
          + f"; 12: {A[11] / 1e3:.0f}; 24: {A[23] / 1e3:.0f}; 36: {A[35] / 1e3:.0f}")
    stop = min(t for t in range(T) if A[t] < 1000) + 1
    print(f"   spend falls below 1 thousand in month {stop};"
          f" {sum(A[:6]) / B:.0%} of the total falls in months 1-6")
    rows = (("optimal", A), ("even", [B / T] * T),
            ("constant share of revenue", share_of_revenue(g1, B)),
            ("no advertising", [0.0] * T))
    for lab, sched in rows:
        pr, sales, F = path(sched, g1)
        peak = max(range(T), key=lambda t: sales[t]) + 1
        print(f"   {lab:26s} spend {sum(sched) / 1e3:7.0f}  profit {pr / 1e3:8.1f}"
              f"  peak month {peak:2d}  F(36) {F:.3f}")
    g2 = lambda a: 0.03 * a * a / (40_000 ** 2 + a * a)
    print("B. S-shaped response, first 12 months, same total: even against pulsed")
    print(f"   inflection k/sqrt(3) = {40 / math.sqrt(3):.1f} thousand; static break-even"
          f" k/sqrt(2) = {40 / math.sqrt(2):.1f}")
    print("   monthly budget   even profit   pulsed profit   better")
    for mon in (15, 20, 25, 30, 32.5, 35, 40, 60):
        e = path([mon * 1e3] * 12 + [0.0] * 24, g2)[0]
        pu = path([2 * mon * 1e3, 0.0] * 6 + [0.0] * 24, g2)[0]
        print(f"   {mon:6.1f} thousand   {e / 1e3:9.1f}     {pu / 1e3:9.1f}"
              f"       {'pulsed' if pu > e else 'even'}")
    print("   same comparison under the concave response of A:")
    for mon in (15_000.0, 60_000.0):
        e = path([mon] * 12 + [0.0] * 24, g1)[0]
        pu = path([2 * mon, 0.0] * 6 + [0.0] * 24, g1)[0]
        print(f"   {mon / 1e3:3.0f} a month: even {e / 1e3:8.1f}, pulsed {pu / 1e3:8.1f}")
# A. concave response; profit in thousands, budget fixed at the optimum's total
#    optimal schedule (thousands): months 1-6 74 58 45 34 25 18; 12: 0; 24: 0; 36: 0
#    spend falls below 1 thousand in month 10; 93% of the total falls in months 1-6
#    optimal                    spend     273  profit   4493.2  peak month 13  F(36) 0.995
#    even                       spend     273  profit   4147.9  peak month 17  F(36) 0.988
#    constant share of revenue  spend     273  profit   3860.9  peak month 20  F(36) 0.977
#    no advertising             spend       0  profit   3548.1  peak month 25  F(36) 0.921
# B. S-shaped response, first 12 months, same total: even against pulsed
#    inflection k/sqrt(3) = 23.1 thousand; static break-even k/sqrt(2) = 28.3
#    monthly budget   even profit   pulsed profit   better
#      15.0 thousand      3946.7        4109.9       pulsed
#      20.0 thousand      4062.3        4182.0       pulsed
#      25.0 thousand      4138.9        4207.9       pulsed
#      30.0 thousand      4185.3        4206.1       pulsed
#      32.5 thousand      4199.5        4198.5       even
#      35.0 thousand      4208.9        4187.6       even
#      40.0 thousand      4215.4        4158.4       even
#      60.0 thousand      4140.7        3991.5       even
#    same comparison under the concave response of A:
#     15 a month: even   4361.4, pulsed   4317.3
#     60 a month: even   4267.6, pulsed   4152.0

A 部分用凹的响应 g(A)=0.02ln⁡(1+A/20,000)g(A) = 0.02\ln(1 + A/20{,}000)。最优路径前重后轻:第 1 个月 74 千,之后每月递减,第 10 个月降到 1 千以下,93% 的预算花在前 6 个月。原因是早期获得的客户会通过口碑带来更多客户,越早投入,这部分「利息」越多;而市场一旦接近饱和,广告只是把本来就会到来的购买提前一点。同样花 273 千,最优路径获利 4,493.2 千,平均投放 4,147.9 千(最优比平均高 8.3%),按销售额固定比例只有 3,860.9 千,比不投放(3,548.1 千)好一些,但远不如前重后轻。按销售额比例投放之所以差,是因为它把钱集中花在销售高峰期,而高峰期恰恰是口碑最强、广告边际作用最小的时候。图 5 画出了支出与新增购买的路径。

作者的全周期买量模型(凹响应)。左:最优、平均与按销售额比例三种支出路径(总预算相同)。右:对应的每月新增购买者,虚线为不投放(示意参数)。

B 部分讨论脉冲投放。马哈詹(Mahajan)与米勒(Muller)1986 年分析了脉冲与平均投放对新产品知名度的影响 (Mahajan and Muller 1986);费恩伯格(Feinberg)1992 年证明,在常见的总量广告模型中脉冲不可能最优,只有当响应函数呈 S 形并带有平滑滤波时,在某些参数下周期性的脉冲才可能最优 (Feinberg 1992)。程序用 S 形响应 g(A)=0.03A2/(40,0002+A2)g(A) = 0.03A^2/(40{,}000^2 + A^2) 在前 12 个月、多个月均预算下比较平均与隔月脉冲(同样总额):月均 15 千时脉冲获利 4,109.9 千,高于平均的 3,946.7 千;20、25、30 千时脉冲仍然更好(30 千时 4,206.1 对 4,185.3);32.5 千时平均略好(4,199.5 对 4,198.5),35、40、60 千时平均更好(60 千时 4,140.7 对 3,991.5)。分界在月均 30–32.5 千之间。它不是响应曲线的拐点:拐点在 k/3≈23.1k/\sqrt3 \approx 23.1 千,而拐点以上的 25、30 千仍是脉冲更好。只看单月的静态比较,g(2m)/2>g(m)g(2m)/2 > g(m) 当且仅当 m<k/2≈28.3m < k/\sqrt2 \approx 28.3 千;扩散的动态(早期客户带来的口碑)把分界又推高了一些。在凹响应下,无论预算高低,脉冲都不如平均。所以「脉冲」是否有利,取决于响应函数的形状与预算的相对大小,而这两者都需要实验来测,不能从模型中推出。

注

这个模型不是预算建议。 它假设广告响应函数已知且不随时间变化,竞争对手不反应,口碑系数 qq 与广告无关,所有客户毛利相同;真实的投放环境几乎违反每一条。它说明的只是方向性的结论:在有口碑扩散的市场中,静态的「按销售额比例」规则可能把钱花在最不需要的时候。

本章小结

巴斯方程 dF/dt=(p+qF)(1−F)dF/dt = (p+qF)(1-F) 核对无误,峰值时刻 ln⁡(q/p)/(p+q)\ln(q/p)/(p+q);在峰值之前,市场规模与模仿系数难以分开估计,早期预测可能差一倍以上。多夫曼—斯坦纳条件(广告/销售额 = 广告弹性/价格弹性)核对无误,但它是静态条件,不能直接给出全周期分配。作者的全周期模型显示,在凹响应与口碑扩散下,最优支出前重后轻,比同预算的平均投放多获利 8.3%,而按销售额比例投放在同预算的三种投放中最差(仍优于不投放);在凹响应下脉冲投放总不如平均投放,在示例的 S 形响应下,脉冲只在月均预算相对较低(本例不超过 30 千)时有利,分界不等于拐点。

假说 · 尚未验证 · 早期获客支出的口碑乘数

作者的假说(尚未确立): 在有明显口碑扩散的新品类中,上市前三个月随机提高获客支出的地区,其 12 个月累计购买者中「非付费渠道」的部分高于对照地区,即早期广告通过口碑产生了乘数效应。什么样的结果能证明它是错的: 在事先登记的地区随机化实验中(由独立研究者实施),处理地区与对照地区 12 个月累计非付费购买者之比的 95% 置信区间包含 1。

参考文献

Bass, Frank M. 1969. “A New Product Growth for Model Consumer Durables.” Management Science 15 (5): 215–27. https://doi.org/10.1287/mnsc.15.5.215.
Bass, Frank M., Trichy V. Krishnan, and Dipak C. Jain. 1994. “Why the Bass Model Fits without Decision Variables.” Marketing Science 13 (3): 203–23.
Dorfman, Robert, and Peter O. Steiner. 1954. “Optimal Advertising and Optimal Quality.” American Economic Review 44 (5): 826–36.
Feinberg, Fred M. 1992. “Pulsing Policies for Aggregate Advertising Models.” Marketing Science 11 (3): 221–34. https://doi.org/10.1287/mksc.11.3.221.
Horsky, Dan, and Leonard S. Simon. 1983. “Advertising and the Diffusion of New Products.” Marketing Science 2 (1): 1–17. https://doi.org/10.1287/mksc.2.1.1.
Mahajan, Vijay, and Eitan Muller. 1986. “Advertising Pulsing Policies for Generating Awareness for New Products.” Marketing Science 5 (2): 89–106. https://doi.org/10.1287/mksc.5.2.89.
Nerlove, Marc, and Kenneth J. Arrow. 1962. “Optimal Advertising Policy under Dynamic Conditions.” Economica 29 (114): 129–42.
Sultan, Fareena, John U. Farley, and Donald R. Lehmann. 1990. “A Meta-Analysis of Applications of Diffusion Models.” Journal of Marketing Research 27 (1): 70–77.
Vidale, M. L., and H. B. Wolfe. 1957. “An Operations-Research Study of Sales Response to Advertising.” Operations Research 5 (3): 370–81.

Fan, Y. (2026). Algorithmic Marketing, Multi-Touch Shapley Attribution and Stochastic Control of Acquisition Funnels: From Thompson Sampling Bandits and Absorbing Markov Chains to BG/NBD Customer Lifetime Value, Read Beside the Strategic Dispositions of the Sunzi [算法营销、多触点沙普利归因与获客漏斗的随机控制] (Version 1.0.0). 5D Library. https://doi.org/10.5281/zenodo.23836264 · Licensed under Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International (CC BY-NC-ND 4.0).