关于「归因不是增量:末次点击、潜在结果与随机持出」,《算法营销与归因》给出的定量结论是什么?
结论:这个世界里共有 7,676 次转化,其中约 4,000 次即使没有任何广告也会发生(高意向者本来就会买),广告真正造成的只有约 3,636 次。末次点击把 7,299 次转化记在了广告名下,是真实增量的两倍。更重要的是份额:社交的真实增量份额是 51.2%,末次点击只给它 21.0%;搜索的真实份额是 11.0%,末次点击给了 38.5%。原因有两个,而且彼此独立:第一,搜索通常出现在路径末端(用户决定买了才去搜),所以末次规则天然偏向它;第二,搜索与邮件主要触达本来就要买的人,它们在路径上「出现」的频率远高于它们「造成」转化的频率。首次点击与线性规则也好不到哪里去,平均绝对误差分别为 12.3 与 11.9 个百分点(末次点击 18.1)。
数据口径:一笔成交该算在哪个广告渠道头上?一个 A/B 测试什么时候可以停?一位客户还值多少钱?本书是教学与研究用的数学模型,不是营销、投资或法律建议。 第八章给出归因、实验、生命周期价值与预算四步核查表,以及一项预注册的模拟基准研究:在独立第三方冻结、已知真实增量的合成多渠道数据生成器上,比较观测沙普利归因与末次点击对真实增量份额的误差(唯一主要结局为二者平均绝对误差之差,最小关注效应 2 个百分点,90% 把握度需要 79 个合成世界、计划 90 个,判定规则写成代码)。
对照数据表
下表数字由本章 Python 程序原样打印,可重新运行复现。 程序只用 Python 标准库与结论吻合的打印值: 11.0, 11.9, 12.3, 18.1, 21.0, 3636
| 200,000 fictional users | 7,676 conversions (377 with no touch) |
| expected | 4,000 would happen without any ad, 3,636 are incremental |
| share of credit truth last click first click linear | |
| Search | 11.0% 38.5% 6.4% 20.3% |
| Social | 51.2% 21.0% 31.2% 27.4% |
| Display | 22.0% 16.1% 46.7% 30.4% |
| 15.8% 24.5% 15.7% 22.0% | |
| mean absolute error of last click | 18.1% |
| mean absolute error of first click | 12.3% |
| mean absolute error of linear | 11.9% |
| last click credits 7,299 conversions to ads; the ads caused about 3,636 |
核心公式
查看完整验算程序
# A FICTIONAL world of customer journeys whose true incrementality is known.
# 20 % of users have high purchase intent. Four channels: Search (S), Social (F),
# Display (D), Email (E). Exposure to S and E depends strongly on intent (selection);
# D is untargeted. Conversion probability = base(intent) + sum of the causal lifts
# of the channels seen (additive, so each channel's incremental effect is unique).
# Touch times: D and F early, S late, E anywhere; a conversion follows the last touch.
# Rule-based attribution (last, first, linear click) is compared with the truth.
import random
CH = "SFDE"
P_HIGH = 0.20
EXPO = {"S": (0.60, 0.10), "F": (0.35, 0.30), "D": (0.50, 0.50), "E": (0.60, 0.15)}
BASE = (0.08, 0.005) # (high intent, low intent)
LIFT = {"S": 0.010, "F": 0.030, "D": 0.008, "E": 0.012}
WHEN = {"S": (0.6, 1.0), "F": (0.0, 0.7), "D": (0.0, 0.5), "E": (0.2, 1.0)}
def user(rng, sel=1.0):
"""One journey: (intent, channels in time order, converted)."""
hi = rng.random() < P_HIGH
touches = []
for c in CH:
p_hi, p_lo = EXPO[c]
p = p_lo + sel * (p_hi - p_lo) if hi else p_lo # sel = 0: no selection
if rng.random() < p:
touches.append((rng.uniform(*WHEN[c]), c))
path = [c for _, c in sorted(touches)]
p_conv = BASE[0 if hi else 1] + sum(LIFT[c] for c in path)
return hi, path, rng.random() < p_conv
def truth(n, sel=1.0):
"""Expected incremental conversions per channel (exact, from the model)."""
out = {}
for c in CH:
p_hi, p_lo = EXPO[c]
expo = P_HIGH * (p_lo + sel * (p_hi - p_lo)) + (1 - P_HIGH) * p_lo
out[c] = n * expo * LIFT[c]
return out
def shares(d):
tot = sum(d.values())
return {c: d[c] / tot for c in CH}
def rules(data):
last, first, linear = ({c: 0.0 for c in CH} for _ in range(3))
for _, path, conv in data:
if conv and path:
last[path[-1]] += 1; first[path[0]] += 1
for c in path:
linear[c] += 1 / len(path)
return last, first, linear
if __name__ == "__main__":
n = 200_000
rng = random.Random(2026)
data = [user(rng) for _ in range(n)]
conv = sum(d[2] for d in data)
untouched = sum(d[2] for d in data if not d[1])
tr = truth(n)
base = n * (P_HIGH * BASE[0] + (1 - P_HIGH) * BASE[1])
print(f"{n:,} fictional users: {conv:,} conversions ({untouched:,} with no touch)")
print(f"expected: {base:,.0f} would happen without any ad,"
f" {sum(tr.values()):,.0f} are incremental")
last, first, linear = rules(data)
print("share of credit truth last click first click linear")
T, L, F, Li = shares(tr), shares(last), shares(first), shares(linear)
names = {"S": "Search", "F": "Social", "D": "Display", "E": "Email"}
for c in CH:
print(f" {names[c]:8s} {T[c]:6.1%} {L[c]:6.1%} {F[c]:6.1%}"
f" {Li[c]:6.1%}")
for lab, s in (("last click", L), ("first click", F), ("linear", Li)):
mae = sum(abs(s[c] - T[c]) for c in CH) / len(CH)
print(f" mean absolute error of {lab:11s} {mae:6.1%}")
credited = sum(last.values())
print(f"last click credits {credited:,.0f} conversions to ads;"
f" the ads caused about {sum(tr.values()):,.0f}")唯一数据源与引用
范雅福(Fan, Y.). (2026). 《算法营销、多触点沙普利归因与获客漏斗的随机控制》第 1 章「归因不是增量:末次点击、潜在结果与随机持出」(版本 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}
}