What does Weekly Quotas for Business Lines conclude, in numbers, about “Lock-In: Why Betting Everything on Last Week's Winner Traps a Business on a Second-Best Line”?
Answer: Chapter 1 quantifies lock-in and shows that its cost grows with the horizon: over 500 periods greedy's regret per period stays at 0.0563 while Thompson sampling's falls to 0.0216.
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.0216, 0.0563, 500
| N | T | grd-wrong | ts-wrong grd-regret | ts-regret | |
| 2 | 20 | 0.2095 | 0.1735 | 0.0506 | 0.0698 |
| 2 | 100 | 0.1800 | 0.0940 | 0.0273 | 0.0266 |
| 2 | 500 | 0.1667 | 0.0400 | 0.0187 | 0.0077 |
| 4 | 20 | 0.4160 | 0.3490 | 0.1084 | 0.1603 |
| 4 | 100 | 0.3620 | 0.1550 | 0.0699 | 0.0690 |
| 4 | 500 | 0.3333 | 0.0567 | 0.0563 | 0.0216 |
Show the full program
# Chapter 1. p13: the longer the horizon, the more greedy lock-in costs.
# Model: N Bernoulli lines with rates drawn from Uniform(0, 1), one unit
# per period, undiscounted horizon T periods. Greedy plays the highest
# posterior mean under Beta(1, 1); Thompson plays the highest posterior
# draw. Wrong-line = the line played most often is not the best line.
# Regret per period = (T max p - successes) / T, averaged over runs.
# Common random numbers as in p12. Illustrative; fixed-seed Monte Carlo.
import math
import random
def play(rule, p, u, horizon, rng):
n = len(p)
s, f, pulls = [0] * n, [0] * n, [0] * n
for _ in range(horizon):
if rule == "greedy":
sc = [(1 + s[i]) / (2 + s[i] + f[i]) for i in range(n)]
else:
sc = [rng.betavariate(1 + s[i], 1 + f[i]) for i in range(n)]
i = max(range(n), key=lambda j: (sc[j], -j))
pulls[i] += 1
if u[i][s[i] + f[i]] < p[i]:
s[i] += 1
else:
f[i] += 1
top = max(range(n), key=lambda j: (pulls[j], -j))
best = max(range(n), key=lambda j: (p[j], -j))
hits = 0
for x in s:
hits += x
return top != best, (horizon * p[best] - hits) / horizon
print("%3s %5s %10s %10s %10s %10s" % ("N", "T", "grd-wrong", "ts-wrong",
"grd-regret", "ts-regret"))
for n in (2, 4):
for horizon, runs in ((20, 2000), (100, 1000), (500, 300)):
world = random.Random(20261113)
rng = random.Random(11)
wrong = {"greedy": 0, "thompson": 0}
reg = {"greedy": [], "thompson": []}
for _ in range(runs):
p = [world.random() for _ in range(n)]
u = [[world.random() for _ in range(horizon)]
for _ in range(n)]
for rule in ("greedy", "thompson"):
w, r = play(rule, p, u, horizon, rng)
wrong[rule] += w
reg[rule].append(r)
print("%3d %5d %10.4f %10.4f %10.4f %10.4f" % (
n, horizon, wrong["greedy"] / runs, wrong["thompson"] / runs,
math.fsum(reg["greedy"]) / runs,
math.fsum(reg["thompson"]) / runs))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 1: Lock-In: Why Betting Everything on Last Week's Winner Traps a Business on a Second-Best Line. 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 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 6 · Writing the Tollbooth, Buying and Publishing Lines as Arms: Margins, Unit Costs, Prior Strength and a Stop-Funding Table
- 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