What does Weekly Quotas for Business Lines conclude, in numbers, about “Writing the Tollbooth, Buying and Publishing Lines as Arms: Margins, Unit Costs, Prior Strength and a Stop-Funding Table”?
Answer: Ranked by conversion rate, buying comes first (0.5000), the tollbooth second (0.3095) and publishing last (0.2500). Ranked by net mean, the tollbooth comes first (5.2857), buying second (5.0000) and publishing last (2.0000): buying converts best but its margin per order is too thin. Ranked by net index, publishing comes first (7.1851), the tollbooth second (5.8142) and buying last (5.1241).
Scope of the numbers: Parameters are illustrative, and margins and costs are accounting points, not prices; all calculations are generated by the book's programs. It is not individual business advice, and changes to budgets or live systems need sign-off by the person in charge.
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: 0.2500, 0.3095, 0.5000, 2.0000, 5.0000, 5.1241
line record margin rate index net-mean net-index toll 12/40 30.0 0.3095 0.3271 5.2857 5.8142 buy 45/90 14.0 0.5000 0.5089 5.0000 5.1241 pub 0/2 40.0 0.2500 0.3796 2.0000 7.1851 rank by rate : buy > toll > pub rank by net-mean : toll > buy > pub rank by net-index: pub > toll > buy
Show the full program
# Chapter 6. p61: margins and unit costs turn rates into money indices.
# Model: a funded unit of line i converts with unknown rate p_i (Beta
# posterior from its record, uniform prior); a conversion earns margin
# m_i points and every unit costs c_i points (illustrative points, not
# prices). The index is affine-equivariant: for reward m X - c it is
# m nu - c, with nu the Bernoulli index (p21, beta 0.9). Rank the lines
# by rate, by expected net per unit, and by net index.
import math
def gittins(a, b, beta, depth=40, tol=1e-6):
lo, hi = a / (a + b), 1.0
while hi - lo > tol:
lam = 0.5 * (lo + hi)
r = lam / (1.0 - beta)
n = a + b + depth
v = [max(r, (a + k) / n / (1.0 - beta)) for k in range(depth + 1)]
for d in range(depth - 1, -1, -1):
n = a + b + d
nv = []
for k in range(d + 1):
p = (a + k) / n
c = math.fsum((p * (1.0 + beta * v[k + 1]),
(1.0 - p) * beta * v[k]))
nv.append(c if c > r else r)
v = nv
if v[0] > r + 1e-12:
lo = lam
else:
hi = lam
return 0.5 * (lo + hi)
LINES = (("toll", 12, 40, 30.0, 4.0),
("buy", 45, 90, 14.0, 2.0),
("pub", 0, 2, 40.0, 8.0))
print("%-5s %6s %6s %7s %7s %8s %9s" % ("line", "record", "margin",
"rate", "index", "net-mean",
"net-index"))
rows = []
for name, w, n, m, c in LINES:
a, b = 1 + w, 1 + n - w
mu = a / (a + b)
nu = gittins(a, b, 0.9)
rows.append((name, mu, m * mu - c, m * nu - c))
print("%-5s %6s %6.1f %7.4f %7.4f %8.4f %9.4f" % (
name, "%d/%d" % (w, n), m, mu, nu, m * mu - c, m * nu - c))
for k, label in ((1, "rate"), (2, "net-mean"), (3, "net-index")):
order = sorted(rows, key=lambda r: -r[k])
print("rank by %-9s: %s" % (label, " > ".join(r[0] for r in order)))Single source and citation
Fan, Y. (2026). Dynamic Allocation of Compute and Budget across Business Lines: Gittins-Index Exploration and Weekly Quotas for Tollbooth, Buying and Publishing Lines (Version 1.0.0), Chapter 6: Writing the Tollbooth, Buying and Publishing Lines as Arms: Margins, Unit Costs, Prior Strength and a Stop-Funding Table. 5D Library. DOI pending
DOI pending · monograph page goes live after publication · 5DL-B-264 · v1.0.0 · CC-BY-NC-ND-4.0
BibTeX
@book{fan2026264,
author = {Fan, Yafu},
title = {Dynamic Allocation of Compute and Budget across Business Lines: Gittins-Index Exploration and Weekly Quotas for Tollbooth, Buying and Publishing Lines},
year = {2026},
publisher = {5D Library},
edition = {1.0.0},
note = {DOI pending}
}Other chapter answers in this book
- Chapter 1 · Lock-In: Why Betting Everything on Last Week's Winner Traps a Business on a Second-Best Line
- Chapter 2 · Calibration: Setting a Business Line against a Permanent Safe Yield and Bisecting for the Gittins Index
- Chapter 3 · Thompson Sampling against the Gittins Index: Two Ways of Keeping a Chance Open on the Same Decision
- Chapter 4 · From Choosing a Line to Splitting a Budget: Five Weekly Quota Rules under Batched Feedback
- Chapter 5 · Two Frictions: Switching Costs Call for a Hysteresis Band, Changing Markets Call for Fading Records
- Chapter 7 · Classical Sources East and West: Jiran's "In Drought, Lay In Boats; In Flood, Lay In Carts" and Thompson's Two-Sample Problem of 1933
- Chapter 8 · Closing the Loop: the Weekly Quota Meeting Table, the Business-Line Quota Indexer and a Pre-Registered Test