What does Bayesian Search and Optimal Stopping conclude, in numbers, about “Applications: Testing Lanes and Selecting People”?
Answer: In lane testing, "earning while learning" and "learning, then earning" are different objectives: Thompson sampling obtains the most conversions during the test, top-two Thompson sampling keeps more trials for challengers to raise the probability of choosing correctly, and successive halving is a form of early stopping that needs no probability calculation; with the illustrative parameters, differences in the probability of choosing correctly lie within simulation error, while differences in conversions are clearer. Real applications must attend to delayed outcomes, the choice of measure and the winner's curse. In selecting people, when the payoff is actual quality the best cutoff is about \(\sqrt{n}\), so that with 40 applicants only 5 need be skipped; when quality is visible, its distribution known and interviews costly, the optimal rule often hires among the first few applicants. The next chapter reads these ideas beside several classical Chinese texts.
Scope of the numbers: Marked boxes separate published evidence, runnable Python calculations (17 programs, all checked), classical sources and the author's hypotheses.
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: 40
| (a) cardinal payoff, relative ranks only: expected quality of the hire | |
| n best c sqrt(n) E at best c | 1/e cutoff c E at 1/e cutoff |
| 10 | 3 3.2 0.7333 5 0.7000 |
| 40 | 6 6.3 0.8542 16 0.7812 |
| 100 | 10 10.0 0.9050 38 0.8018 |
| 400 | 20 20.0 0.9513 148 0.8129 |
| (b) interview cost k, quality seen, n | 40: net value (interviews used) |
| k first reservation reservation rule | 1/e rank rule |
| 0.000 | 0.955 0.955 (15.0) 0.781 (30.0) |
| 0.005 | 0.898 0.898 ( 9.2) 0.628 (30.0) |
| 0.020 | 0.800 0.800 ( 5.0) 0.179 (30.1) |
Show the full program
# (a) Cardinal payoff (Bearden 2006): quality ~ U(0, 1), relative ranks only, payoff =
# quality hired; cutoff c, last applicant if nobody qualifies; exact formula.
# (b) Quality seen, distribution known, cost k per interview: reservation levels by
# backward induction, against the 1/e rank rule (20,000 simulated runs).
import math, random
def cardinal(n, c):
if c == 1:
return 0.5
return (c - 1) * sum(1 / ((i - 1) * (i + 1)) for i in range(c, n + 1)) \
+ (c - 1) / (2 * (n + 1))
def reservation(n, k):
w = [0.0] # w[j]: value with j interviews left
for j in range(1, n + 1):
prev = w[-1]
emax = (1 + prev ** 2) / 2 if prev > 0 else 0.5
w.append(max(0.0, emax - k))
return w
def sim(n, k, rule, rng, runs=20000):
w, val, cnt = reservation(n, k), 0.0, 0
r = round(n / math.e) + 1
for _ in range(runs):
xs = [rng.random() for _ in range(n)]
if rule == "reservation":
for i, x in enumerate(xs):
if w[n - i] <= 0:
i, x = i - 1, 0.0
break
if x >= w[n - 1 - i]:
break
else:
bar = max(xs[:r - 1])
i = next((j for j in range(r - 1, n) if xs[j] > bar), n - 1); x = xs[i]
val += x - k * (i + 1); cnt += i + 1
return val / runs, cnt / runs
if __name__ == "__main__":
print("(a) cardinal payoff, relative ranks only: expected quality of the hire")
print(" n best c sqrt(n) E at best c 1/e cutoff c E at 1/e cutoff")
for n in (10, 40, 100, 400):
c = max(range(1, n + 1), key=lambda c: cardinal(n, c))
r = round(n / math.e) + 1
print(f" {n:4d} {c:5d} {math.sqrt(n):5.1f} {cardinal(n, c):.4f}"
f" {r:4d} {cardinal(n, r):.4f}")
print("(b) interview cost k, quality seen, n = 40: net value (interviews used)")
print(" k first reservation reservation rule 1/e rank rule")
rng = random.Random(2006)
for k in (0.0, 0.005, 0.02):
w = reservation(40, k)
a = sim(40, k, "reservation", rng); b = sim(40, k, "1/e", rng)
print(f" {k:6.3f} {w[39]:.3f} {a[0]:.3f} ({a[1]:4.1f})"
f" {b[0]:.3f} ({b[1]:4.1f})")Single source and citation
Fan, Y. (2026). Bayesian Search in Unknown Landscapes, Optimal Stopping and Gittins Indices (Version 1.0.0), Chapter 6: Applications: Testing Lanes and Selecting People. 5D Library. https://doi.org/10.5281/zenodo.23810102
DOI: 10.5281/zenodo.23810102 · Read the monograph · 5DL-B-042 · v1.0.0 · CC-BY-NC-ND-4.0
BibTeX
@book{fan2026042,
author = {Fan, Yafu},
title = {Bayesian Search in Unknown Landscapes, Optimal Stopping and Gittins Indices},
year = {2026},
publisher = {5D Library},
edition = {1.0.0},
doi = {10.5281/zenodo.23810102},
url = {https://doi.org/10.5281/zenodo.23810102}
}Other chapter answers in this book
- Chapter 1 · The Secretary Problem and 1/e: When to Stop If You See Only Ranks and Cannot Go Back
- Chapter 2 · Variants of the Secretary Problem and How People Stop
- Chapter 3 · Bayesian Search: Where to Look, and What Not Finding Means
- Chapter 4 · Multi-Armed Bandits: Gittins Indices, Thompson Sampling and the Regret Lower Bound
- Chapter 5 · Sunk Costs: Rational Persistence, Fallacious Persistence and Stop-Loss Boundaries Set in Advance
- Chapter 8 · Practice and a Pre-Registered Trial