What does Paid-Ad Scaling for Paywalls conclude, in numbers, about “Many Creatives on a Small Budget: Thompson Sampling, Even Splits and Screening Speed”?
Answer: Chapter 4 compares an even split with Thompson sampling, which turns an illustrative two-week profit of -706 into 1,766, and computes how many new creatives a week a budget can screen.
Scope of the numbers: Under illustrative parameters one icebreaker buyer on tarotmalaysia is worth 2.68 times the icebreaker price, and a first-order break-even stop rule captures only 0.222 of the attainable profit across forty synthetic creatives. Parameters are illustrative and all calculations are generated by the book's programs.
Data table
The numbers below are printed verbatim by the chapter's Python program and can be reproduced by running it. standard-library Python onlyprinted values that match the answer: -706, 1766
| budget RM 4,200 over 14 days; T = 26.51 | ||||
| policy | conversions | profit RM | spend on 2.5T+4.0T | P(loss) |
| even | 131.8 | -706 | 1,400 | 0.988 |
| red | 191.6 | 879 | 244 | 0.062 |
| thomp | 225.0 | 1,766 | 230 | 0.015 |
| oracle (all on 0.6 T): 264.1 conversions, profit 2,800 |
Show the full program
# 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))Single source and citation
Fan, Y. (2026). Paid-Ad Scaling for Diagnostic Paywalls: Meta and TikTok Stopping Rules, Server-Side CAPI Calibration and Hundred-Order Daily Unit Economics (Version 1.0.0), Chapter 4: Many Creatives on a Small Budget: Thompson Sampling, Even Splits and Screening Speed. 5D Library. DOI pending
DOI pending · monograph page goes live after publication · 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}
}Other chapter answers in this book
- Chapter 1 · Funnel Unit Economics: Why First-Order Break-Even Is Not a Stop Line
- Chapter 2 · Stopping at Zero: the Rule of Three, Gamma-Poisson Posteriors and Spend Red Lines
- Chapter 3 · Signal, Noise and Sequential Tests: Small Budgets Can Only Call "Clearly Bad"
- Chapter 5 · Calibrating Server-Side Events: Deduplication, Net-Value Signals and the Report Inflation Factor
- Chapter 6 · Control Laws for Scaling: Saturation, Carry-Over and Marginal Returns
- Chapter 7 · Classical Sources: the Sunzi on Waging War and Hopkins's Scientific Advertising
- Chapter 8 · Closing the Loop: a Three-Site Ad Ledger, the Distilled Tool and a Pre-Registered Refutation