5D Library › 结账顺手加购弹性、一键升单动力学与跨领域推荐矩阵 · English

第八章 增量收入、护栏指标与预注册的留出实验

归因收入不等于增量收入

推导

# Chapter 8. p14: How much cross-sell revenue is truly caused?
# Some readers routed from site i to site j would have found j anyway.
# With a random holdout (no recommendation shown), incremental revenue =
# (rate with recommendation - rate in holdout) x value. Attributed
# revenue counts every purchase after a click. Illustrative rates.
def report(shown_rate, holdout_rate, click_share, value=98.0, n=10000):
    attributed = n * shown_rate * click_share * value
    incremental = n * (shown_rate - holdout_rate) * value
    return attributed, incremental

if __name__ == "__main__":
    print("   buy rate shown  holdout  attributed RM  incremental RM  share")
    for s, h in ((0.020, 0.005), (0.020, 0.012), (0.020, 0.018)):
        a, i = report(s, h, 0.9)
        print("   {:14.3f}  {:7.3f}  {:13,.0f}  {:14,.0f}  {:.3f}".format(
            s, h, a, i, i / a))
#    buy rate shown  holdout  attributed RM  incremental RM  share
#             0.020    0.005         17,640          14,700  0.833
#             0.020    0.012         17,640           7,840  0.444
#             0.020    0.018         17,640           1,960  0.111

被推荐、点击、购买的读者,未必是因为推荐才购买。设看到推荐的读者购买率为 0.020,归因收入把点击后的全部购买都算作推荐的功劳;若随机留出一组读者不展示推荐,其购买率为 0.005,则增量收入是归因收入的 0.833;若留出组的购买率为 0.012,只有 0.444;若为 0.018,只有 0.111。没有留出组,就无法区分推荐「带来」的购买与读者本来就会做的购买 (Kohavi et al. 2020)。

护栏

推导

# Chapter 8. p15: Base rates a bump and upsell programme must watch.
# For every 1,000 orders: bump takes, upsell acceptances, and the refunds
# and chargebacks each step adds (rates from p02, p03, p04; chargeback
# fee RM 60). A programme is healthy only if the added refunds cost far
# less than the added revenue.
if __name__ == "__main__":
    orders = 1000
    bump_rev = orders * 0.501 * 44
    up_rev = orders * 0.13 * 300
    bump_ref = orders * 0.501 * 0.04 * 44
    up_ref = orders * 0.13 * (0.12 * 300 + 0.12 * 0.5 * 98)
    cb = orders * 0.13 * 0.01 * (300 + 60)
    print("   added revenue: bumps RM {:,.0f}, upsells RM {:,.0f}".format(
        bump_rev, up_rev))
    print("   refunds: bumps RM {:,.0f}, upsells RM {:,.0f};"
          " chargebacks RM {:,.0f}".format(bump_ref, up_ref, cb))
    net = bump_rev + up_rev - bump_ref - up_ref - cb
    print("   net added RM {:,.0f}; refunds and chargebacks take {:.1%}"
          .format(net, 1 - net / (bump_rev + up_rev)))
#    added revenue: bumps RM 22,044, upsells RM 39,000
#    refunds: bumps RM 882, upsells RM 5,444; chargebacks RM 468
#    net added RM 54,250; refunds and chargebacks take 11.1%

每 1,000 笔订单,加购带来 RM 22,044,升单带来 RM 39,000;退款分别为 RM 882 与 RM 5,444,拒付 RM 468。净增 RM 54,250,退款与拒付吃掉 11.1%。这一比例应当与加购和升单的收入一起报告;它若上升,说明加购或升单开始卖给不该买的人。

注

四步核查。 第一,加购默认不勾选,价格清楚可见。第二,升单全额抵扣已付金额,并在第一秒与第七天之间留出一次反悔的机会。第三,跨站点按历史推荐须事先取得同意,默认按页面内容推荐。第四,推荐与加购的效果用留出组度量增量,并以退款率作为护栏。

预注册的留出实验

推导

# Chapter 8. p16: A pre-registered holdout test of cross-fleet routing.
# Readers are randomised: 90% see the two routed links, 10% (holdout)
# see none. Primary outcome: purchase on the target site within 30 days.
# Detect 2.0% vs 1.2% (two-sided 0.05, power 0.80) with unequal arms.
from math import sqrt, ceil
from statistics import NormalDist

N = NormalDist()

def n_unequal(p1, p2, ratio, alpha=0.05, power=0.80):
    # n2 = holdout size, n1 = ratio x n2
    za, zb = N.inv_cdf(1 - alpha / 2), N.inv_cdf(power)
    var = p1 * (1 - p1) / ratio + p2 * (1 - p2)
    return ceil((za + zb) ** 2 * var / (p1 - p2) ** 2)

if __name__ == "__main__":
    print("   outcome: purchase within 30 days; 2.0% vs 1.2%")
    print("   test: two-sided 0.05, power 0.80")
    for share in (0.5, 0.2, 0.1):
        ratio = (1 - share) / share
        n2 = n_unequal(0.020, 0.012, ratio)
        print("   holdout {:.0%}: holdout {:,} readers, total {:,}".format(
            share, n2, ceil(n2 * (1 + ratio))))
#    outcome: purchase within 30 days; 2.0% vs 1.2%
#    test: two-sided 0.05, power 0.80
#    holdout 50%: holdout 3,858 readers, total 7,716
#    holdout 20%: holdout 2,055 readers, total 10,275
#    holdout 10%: holdout 1,722 readers, total 17,220

读者被随机分成两组:大部分看到两条路由推荐,少部分(留出组)看不到。主要结局为 30 天内在目标站点购买,检验 2.0% 对 1.2%(双侧 0.05,把握度 0.80)。留出组占一半时,留出组 3,858 人、共 7,716 人;占两成时留出组 2,055 人、共 10,275 人;占一成时留出组 1,722 人、共 17,220 人。留出组越小,对日常收入的影响越小,但需要的总人数越多。

假说 · 尚未验证

预注册的预测(尚未验证): 跨舰队推荐的增量收入不超过归因收入的一半;加购与升单的退款与拒付占其收入的比例低于 15%。什么会证明它错: 增量收入显著超过归因收入的一半,或退款与拒付比例超过 15%。

全书小结

结账加购的优势来自零摩擦,最优价格比由估值分布决定;客单价的大幅提升要靠加购、第二个加购与升单共同完成。升单的主峰在付款后第一秒,次峰在第七天;计入退款后第一秒仍然更优。互信息路由在合成模型中不稳定,应按组轮换。跨站点使用个人数据需要同意。推荐的真正价值必须用留出组度量。

参考文献

Kohavi, Ron, Diane Tang, and Ya Xu. 2020. Trustworthy Online Controlled Experiments: A Practical Guide to a/b Testing. Cambridge University Press.

Fan, Y. (2026). Order-Bump Friction Elasticity, One-Click Upsell Kinetics and Cross-Domain Recommendation Matrices: Zero-Reentry Impulse Attachment, Conditional Mutual Information and Cart-Value Multipliers [结账顺手加购弹性、一键升单动力学与跨领域推荐矩阵] (Version 1.0.0). 5D Library. https://doi.org/10.5281/zenodo.24090207 · Licensed under Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International (CC BY-NC-ND 4.0).