What does Weekly Quotas for Business Lines conclude, in numbers, about “Calibration: Setting a Business Line against a Permanent Safe Yield and Bisecting for the Gittins Index”?
Answer: Chapter 2 computes the Gittins index by calibration and by restart; a line never tried has an index of 0.7029 at a discount of 0.9.
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.7029, 0.9
| bisection for Beta(1, 1), beta = 0.9 (first 6 steps) | ||||
| step | lam | retire | continue | verdict |
| 1 | 0.75000 | 7.50000 | 7.34844 | retire |
| 2 | 0.62500 | 6.25000 | 6.53388 | explore |
| 3 | 0.68750 | 6.87500 | 6.92889 | explore |
| 4 | 0.71875 | 7.18750 | 7.13536 | retire |
| 5 | 0.70312 | 7.03125 | 7.03043 | retire |
| 6 | 0.69531 | 6.95313 | 6.97948 | explore |
| index of Beta(1, 1), the untried line, by discount factor | ||||
| beta 0.50 | depth | 40 | index 0.5590 | bonus +0.0590 |
| beta 0.70 | depth | 40 | index 0.6046 | bonus +0.1046 |
| beta 0.90 | depth | 40 | index 0.7029 | bonus +0.2029 |
| beta 0.95 | depth | 80 | index 0.7614 | bonus +0.2614 |
| beta 0.99 | depth 160 | index 0.8698 | bonus +0.3698 |
Key formula
Show the full program
# Chapter 2. p21: the Gittins index by calibration against a safe arm.
# Model: a line in state Beta(a, b) faces a safe arm that pays lam per
# period for ever. Value with retirement allowed:
# V(a, b) = max( lam / (1 - beta),
# p (1 + beta V(a + 1, b)) + (1 - p) beta V(a, b + 1) )
# with p = a / (a + b). The index is the lam at which retiring now and
# continuing are equally good (Gittins and Jones 1974; Whittle 1980).
# Truncation: after depth steps learning stops and the line is worth
# max(lam, p) / (1 - beta). Bisection on lam to 1e-6.
import math
def cont_value(a, b, beta, lam, depth):
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, 0, -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
p = a / (a + b)
return math.fsum((p * (1.0 + beta * v[1]), (1.0 - p) * beta * v[0]))
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)
print("bisection for Beta(1, 1), beta = 0.9 (first 6 steps)")
print("%4s %9s %11s %11s %9s" % ("step", "lam", "retire", "continue",
"verdict"))
lo, hi = 0.5, 1.0
for step in range(1, 7):
lam = 0.5 * (lo + hi)
ret = lam / (1 - 0.9)
con = cont_value(1, 1, 0.9, lam, 40)
better = con > ret
print("%4d %9.5f %11.5f %11.5f %9s" % (
step, lam, ret, con, "explore" if better else "retire"))
if better:
lo = lam
else:
hi = lam
print("index of Beta(1, 1), the untried line, by discount factor")
for beta, depth in ((0.5, 40), (0.7, 40), (0.9, 40), (0.95, 80),
(0.99, 160)):
g = gittins(1, 1, beta, depth)
print(" beta %.2f depth %3d index %.4f bonus %+.4f" % (
beta, depth, g, g - 0.5))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 2: Calibration: Setting a Business Line against a Permanent Safe Yield and Bisecting for the Gittins Index. 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 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