What does Affiliate Power Laws, Creator Portfolios and Commission Bounds conclude, in numbers, about “Learning While Spending: Thompson Sampling and the Tail of CAC”?
Answer: Chapter 4 compares rules for learning while spending and shows that of three ways of computing CAC (723, 500 and 304 ringgit) only pooled CAC matches profit and loss.
Scope of the numbers: Its numbers of affiliates, sales distributions, conversion rates, customer counts, commission rates and recruitment speeds are illustrative or synthetic; all data are generated by its programs; the book is not legal, financial or investment advice. Marked boxes separate published evidence, runnable Python calculations (16 programs), classical sources and the author's hypotheses.
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: 304, 500, 723
| measure | median | 5% to 95% of years |
| share with no customer | 0.073 | 0.049 to 0.094 |
| mean per-campaign CAC (RM) | 723 | 663 to 789 |
| median per-campaign CAC (RM) | 500 | 417 to 500 |
| pooled CAC (RM) | 304 | 271 to 341 |
| campaigns giving half of sales | 0.154 | 0.130 to 0.174 |
Show the full program
# Chapter 4. p08: Which CAC to report. Each micro campaign spends
# RM 2,500 and wins a Poisson number of customers whose mean is
# lognormal (median 5, log sd 1.0). Over a year of 32 campaigns a month
# (384 campaigns), compare the share of campaigns with no customer at
# all, the mean and the median of per-campaign CAC (over campaigns with
# at least one customer), and the pooled CAC = total spend / total
# customers, and the share of campaigns that bring in half of all
# customers. 1,000 simulated years, seed 87.
import random
from math import exp
def poisson(rng, lam):
k, t, u = 0, exp(-lam), rng.random()
c = t
while u > c and k < 1000:
k += 1
t *= lam / k
c += t
return k
def year(rng):
wins = [poisson(rng, 5.0 * exp(rng.gauss(0, 1.0))) for _ in range(384)]
cac = sorted(2500.0 / w for w in wins if w)
zero = 1 - len(cac) / 384
pooled = 2500.0 * 384 / sum(wins)
acc, half = 0, 0
for w in sorted(wins, reverse=True):
acc += w
half += 1
if acc >= sum(wins) / 2:
break
return zero, sum(cac) / len(cac), cac[len(cac) // 2], pooled, half / 384
if __name__ == "__main__":
rng = random.Random(87)
ys = [year(rng) for _ in range(1000)]
names = ("share with no customer", "mean per-campaign CAC (RM)",
"median per-campaign CAC (RM)", "pooled CAC (RM)",
"campaigns giving half of sales")
print(" measure median 5% to 95% of years")
for j, name in enumerate(names):
v = sorted(y[j] for y in ys)
fmt = "{:.3f}" if j in (0, 4) else "{:,.0f}"
print(" {:<31} {:>7} {} to {}".format(
name, fmt.format(v[500]), fmt.format(v[50]), fmt.format(v[949])))Single source and citation
Fan, Y. (2026). Affiliate Network Power Laws, Influencer Portfolio Optimization and Incentive Stability Bounds (Version 1.0.0), Chapter 4: Learning While Spending: Thompson Sampling and the Tail of CAC. 5D Library. https://doi.org/10.5281/zenodo.24090229
DOI: 10.5281/zenodo.24090229 · Read the monograph · 5DL-B-087 · v1.0.0 · CC-BY-NC-ND-4.0
BibTeX
@book{fan2026087,
author = {Fan, Yafu},
title = {Affiliate Network Power Laws, Influencer Portfolio Optimization and Incentive Stability Bounds},
year = {2026},
publisher = {5D Library},
edition = {1.0.0},
doi = {10.5281/zenodo.24090229},
url = {https://doi.org/10.5281/zenodo.24090229}
}Other chapter answers in this book
- Chapter 1 · Heavy-Tailed Output in Affiliate Networks and Price's Law
- Chapter 2 · First-Sale Activation Bonuses and Sales Contests
- Chapter 3 · Mean-Variance Allocation across a Creator Portfolio
- Chapter 5 · The Geometry of Multi-Level Commissions and the Saturation of Pyramids
- Chapter 6 · Cohort Decay and the Wholesale Margin of Licensed Principals
- Chapter 7 · Tao Zhu Gong's Giving Away, the Labour Shares of the Shanxi Merchants and the Rewards of the *Wei Liaozi*
- Chapter 8 · Practice: A Year's Ledger, Monitoring Concentration and a Pre-Registered Activation Experiment