What does Weekly Quotas for Business Lines conclude, in numbers, about “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”?
Answer: Chapter 7 examines Jiran's "in drought, lay in boats; in flood, lay in carts" from the Records of the Grand Historian and Thompson's two-sample problem of 1933: preparing against the present pays only in a regular cycle with a lag beyond a quarter of it.
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 only
| P(same regime after lag L); Jiran rule pays 1 - P | ||||
| L | cycle | jitter | markov | Jiran wins in |
| 0 | 1.0000 | 1.0000 | 1.0000 | - |
| 1 | 0.8333 | 0.8334 | 0.8333 | - |
| 2 | 0.6667 | 0.6669 | 0.7222 | - |
| 3 | 0.5000 | 0.5003 | 0.6481 | - |
| 4 | 0.3333 | 0.3337 | 0.5988 | cycle,jitter |
| 5 | 0.1667 | 0.2341 | 0.5658 | cycle,jitter |
| 6 | 0.0000 | 0.2012 | 0.5439 | cycle,jitter |
| 7 | 0.1667 | 0.2331 | 0.5293 | cycle,jitter |
| 8 | 0.3333 | 0.3325 | 0.5195 | cycle,jitter |
Show the full program
# Chapter 7. p71: when does "in drought, lay in boats" pay?
# Model: two regimes, dry and wet, each lasting 6 periods on average.
# Stock prepared now is used L periods later and pays 1 if it suits the
# regime then, 0 if not (illustrative). The follower prepares for the
# regime of today; the Jiran rule prepares for the opposite one.
# Payoff of the follower = P(regime at t + L equals regime at t).
# cycle : a fixed 12-period cycle, 6 dry then 6 wet
# jitter : spells of 4 to 8 periods, uniform (mean 6), fixed seed
# markov : stay with probability 5/6 each period (mean spell 6),
# P_same = (1 + (2/3)^L) / 2 exactly
# The Jiran rule wins exactly when P_same < 0.5.
import random
def same_share(path, lag):
hit = 0
for t in range(len(path) - lag):
if path[t] == path[t + lag]:
hit += 1
return hit / (len(path) - lag)
rng = random.Random(20261113)
jit, state = [], 0
while len(jit) < 200000:
jit.extend([state] * rng.randint(4, 8))
state = 1 - state
cyc = [(t // 6) % 2 for t in range(200000)]
print("P(same regime after lag L); Jiran rule pays 1 - P")
print("%3s %8s %8s %8s %16s" % ("L", "cycle", "jitter", "markov",
"Jiran wins in"))
for lag in range(0, 9):
c = same_share(cyc, lag)
j = same_share(jit, lag)
m = (1 + (2 / 3) ** lag) / 2
wins = [name for name, v in (("cycle", c), ("jitter", j),
("markov", m)) if v < 0.5]
print("%3d %8.4f %8.4f %8.4f %16s" % (lag, c, j, m,
",".join(wins) or "-"))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 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. 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 6 · Writing the Tollbooth, Buying and Publishing Lines as Arms: Margins, Unit Costs, Prior Strength and a Stop-Funding Table
- Chapter 8 · Closing the Loop: the Weekly Quota Meeting Table, the Business-Line Quota Indexer and a Pre-Registered Test