关于「小预算多素材:汤普森抽样、均分预算与筛选速度」,《收费站买量精算》给出的定量结论是什么?

结论:第四章比较均分与汤普森抽样,两周示意利润由 -706 变为 1,766,并计算一周能筛几条新素材。

数据口径:按示意参数,tarotmalaysia 一个破冰买家的期望净值是破冰价的 2.68 倍,按首单回本线止损,在四十条合成素材上只拿到可得利润的 0.222。 书中参数为示意,全部计算由书中程序生成。

English version

对照数据表

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

budget RM 4,200 over 14 days; T = 26.51
policyconversionsprofit RMspend on 2.5T+4.0TP(loss)
even131.8-7061,4000.988
red191.68792440.062
thomp225.01,7662300.015
oracle (all on 0.6 T): 264.1 conversions, profit 2,800
查看完整验算程序
# Chapter 4. p41: Thompson sampling against an even split, small budget.
# Six creatives with true CPA (in units of T = 26.51 RM, the break-even
# CPA of p11): 0.6, 0.9, 1.1, 1.5, 2.5, 4.0. Budget RM 300 a day for 14
# days, spent in 30 chunks of RM 10. Results are reported once a day, so
# every policy updates in daily batches. Prior per creative: Gamma(1, T)
# on the conversion rate. Policies:
#   even    RM 50 a day each, never stops
#   red     even split, but stop a creative once P(CPA > T) >= 0.90
#   thomp   each chunk goes to the creative with the largest posterior
#           draw of the conversion rate (Thompson 1933)
# Profit = conversions * T - spend (T is break-even, so profit is the
# margin above break-even). 400 runs, fixed seed.
import math
import random

T = 26.51
TRUE = [0.6, 0.9, 1.1, 1.5, 2.5, 4.0]
DAYS, CHUNKS, CHUNK = 14, 30, 10.0


def poisson(mu, rng):
    lim, k, p = math.exp(-mu), 0, 1.0
    while True:
        p *= rng.random()
        if p <= lim:
            return k
        k += 1


def p_bad(n, s):
    x = (T + s) / T                  # posterior Gamma(1 + n, T + s)
    return 1.0 - math.fsum([math.exp(-x) * x ** j / math.factorial(j)
                            for j in range(1 + n)])


def run(policy, rng):
    n = [0] * 6
    s = [0.0] * 6
    alive = [True] * 6
    for _ in range(DAYS):
        plan = [0.0] * 6
        live = [i for i in range(6) if alive[i]]
        for c in range(CHUNKS):
            if policy == "thomp":
                draws = [rng.gammavariate(1 + n[i], 1.0 / (T + s[i]))
                         for i in range(6)]
                i = max(range(6), key=lambda j: draws[j])
            else:
                i = live[c % len(live)]
            plan[i] += CHUNK
        for i in range(6):
            if plan[i] > 0:
                n[i] += poisson(plan[i] / (TRUE[i] * T), rng)
                s[i] += plan[i]
        if policy == "red":
            for i in range(6):
                if alive[i] and len([a for a in alive if a]) > 1:
                    if p_bad(n[i], s[i]) >= 0.90:
                        alive[i] = False
    conv = math.fsum(n)
    return conv, conv * T - math.fsum(s), s[4] + s[5]


if __name__ == "__main__":
    rng = random.Random(20261120)
    print("budget RM {:,.0f} over {:d} days; T = {:.2f}".format(
        DAYS * CHUNKS * CHUNK, DAYS, T))
    print("  policy  conversions   profit RM  spend on 2.5T+4.0T  P(loss)")
    for pol in ("even", "red", "thomp"):
        out = [run(pol, rng) for _ in range(400)]
        conv = math.fsum(o[0] for o in out) / 400
        prof = math.fsum(o[1] for o in out) / 400
        worst = math.fsum(o[2] for o in out) / 400
        loss = len([o for o in out if o[1] < 0]) / 400
        print("  {:<6} {:>12.1f} {:>11,.0f} {:>19,.0f} {:>8.3f}".format(
            pol, conv, prof, worst, loss))
    best = DAYS * CHUNKS * CHUNK / (0.6 * T)
    print("  oracle (all on 0.6 T): {:.1f} conversions, profit {:,.0f}"
          .format(best, best * T - DAYS * CHUNKS * CHUNK))

唯一数据源与引用

范雅福(Fan, Y.). (2026). 《测评与命理收费站买量精算、服务端转化回传校准与日入百单扩量母典》第 4 章「小预算多素材:汤普森抽样、均分预算与筛选速度」(版本 1.0.0). 5D Library. DOI 待发布

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

BibTeX
@book{fan2026345,
  author    = {Fan, Yafu},
  title     = {Paid-Ad Scaling for Diagnostic Paywalls: Meta and TikTok Stopping Rules, Server-Side CAPI Calibration and Hundred-Order Daily Unit Economics},
  year      = {2026},
  publisher = {5D Library},
  edition   = {1.0.0},
  note      = {DOI pending}
}

本书其他章节结论