What does Martingales, Stopping Times and Stop-Loss Bounds conclude, in numbers, about “Eastern and Western Sources Examined: Laozi on Knowing Enough and Knowing When to Stop, and Bernoulli's Logarithm”?
Answer: Chapter 7 examines Laozi's Chapter 44 on knowing what is enough and when to stop, and Bernoulli's logarithmic utility of 1738.
Scope of the numbers: Its parameters are illustrative; all calculations are generated by its programs. It is not individual financial advice, does not encourage gambling of any kind, and analyses doubling only as a counter-example.
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
| Bernoulli's moral value of the game for a holder of wealth w | |
| wealth w value V | |
| 0 | 2.000 |
| 10 | 3.043 |
| 100 | 4.389 |
| 1000 | 5.972 |
| 100000 | 9.277 |
| 1000000 | 10.937 |
| expected prize when the bank can pay at most 2^m ducats | |
| m bank 2^m E[prize] | |
| 10 | 1024 6.000 |
| 20 | 1048576 11.000 |
| 30 | 1073741824 16.000 |
| 40 | 1099511627776 21.000 |
| 60 1152921504606846976 | 31.000 |
Show the full program
# Chapter 7. p71: Bernoulli 1738: the St Petersburg game, its log value,
# and the finite bank. A fair coin is tossed until the first head; a
# head on toss k pays 2^(k-1) ducats. Part 1: Bernoulli's moral value
# for a holder of wealth w is the certainty amount V with
# log(w + V) = E[log(w + prize)]
# (the game is received free). Part 2: a bank holding 2^m ducats can
# pay at most that, so the expected prize is finite and grows only
# like m / 2 + 1. The game is the mirror of the doubling ladder of
# Chapter 2. Series cut where terms fall below double precision.
import math
def moral_value(w):
terms = []
for k in range(1, 400):
terms.append(math.ldexp(1.0, -k) * math.log(w + 2 ** (k - 1)))
return math.exp(math.fsum(terms)) - w
def capped_mean(m):
cap = 2 ** m
terms = []
for k in range(1, m + 80):
terms.append(math.ldexp(1.0, -k) * min(2 ** (k - 1), cap))
return math.fsum(terms)
print("Bernoulli's moral value of the game for a holder of wealth w")
print("%10s %12s" % ("wealth w", "value V"))
for w in (0, 10, 100, 1000, 100000, 1000000):
print("%10d %12.3f" % (w, moral_value(w)))
print("expected prize when the bank can pay at most 2^m ducats")
print("%4s %16s %12s" % ("m", "bank 2^m", "E[prize]"))
for m in (10, 20, 30, 40, 60):
print("%4d %16d %12.3f" % (m, 2 ** m, capped_mean(m)))Single source and citation
Fan, Y. (2026). Doob's Martingales and the Optional Stopping Theorem: the Doubling Fallacy and Rigorous Stop-Loss Bounds for Business Trials (Version 1.0.0), Chapter 7: Eastern and Western Sources Examined: Laozi on Knowing Enough and Knowing When to Stop, and Bernoulli's Logarithm. 5D Library. DOI pending
DOI pending · monograph page goes live after publication · 5DL-B-249 · v1.0.0 · CC-BY-NC-ND-4.0
BibTeX
@book{fan2026249,
author = {Fan, Yafu},
title = {Doob's Martingales and the Optional Stopping Theorem: the Doubling Fallacy and Rigorous Stop-Loss Bounds for Business Trials},
year = {2026},
publisher = {5D Library},
edition = {1.0.0},
note = {DOI pending}
}Other chapter answers in this book
- Chapter 1 · A Conservation Law for Fair Games: Martingales, Bounded Stopping Times and the Optional Stopping Theorem
- Chapter 2 · The Exact Accounts of the Doubling Ladder: Finite Capital, Tail Losses and Doubling After a Loss
- Chapter 3 · Wald's Identities: a Stop Line Sells Time
- Chapter 4 · Quitting While Ahead Changes Only the Shape: the Win-Rate Illusion and Selling Winners While Holding Losers
- Chapter 5 · The Learning Value of a Stop Line: Lines of Belief, the Gap Between Good and Bad, and Escalating Sunk Costs
- Chapter 6 · Peeking and Early Stopping: Optional Stopping and Test Martingales in Online Experiments
- Chapter 8 · Closing the Loop: the Three-Line Register of a Trial Budget, the Stop-Loss Bound Calculator and a Pre-Registered Protocol