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
LcyclejittermarkovJiran wins in
01.00001.00001.0000-
10.83330.83340.8333-
20.66670.66690.7222-
30.50000.50030.6481-
40.33330.33370.5988cycle,jitter
50.16670.23410.5658cycle,jitter
60.00000.20120.5439cycle,jitter
70.16670.23310.5293cycle,jitter
80.33330.33250.5195cycle,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