Skip to content
Vamshi Jandhyala

Books · The Fiddler: Solutions

Chapter 39

How Low (or High) Can You Go?

In “high-low” you see a sequence of independent uniform [0,1][0,1] numbers and, before each new one, guess whether it will be higher or lower than the previous. The optimal rule is to guess “high” when the last number is below 12\tfrac12 and “low” when it is above. Playing this way, what is the probability you earn at least two points, that is, you correctly compare x2x_2 to x1x_1 and then x3x_3 to x2x_2?

The Fiddler, Zach Wissner-Gross, September 5, 2025(original post)

Solution

Condition on the middle value x2x_2. Given x2x_2, the two comparisons are independent: the second is correct with probability B(x2)=max(x2,1x2)B(x_2)=\max(x_2,1-x_2), and integrating the first over x1x_1 gives A(x2)=x2+12A(x_2)=x_2+\tfrac12 for x2<12x_2<\tfrac12 and 32x2\tfrac32-x_2 for x2>12x_2>\tfrac12. Hence P(2 points)=01A(x2)B(x2)dx2=201/2 ⁣(x2+12)(1x2)dx2=132454.2%.\begin{aligned} P(\text{2 points})&=\int_0^{1}A(x_2)\,B(x_2)\,dx_2\\ &=2\int_0^{1/2}\!\bigl(x_2+\tfrac12\bigr)(1-x_2)\,dx_2 =\frac{13}{24}\approx\boxed{54.2\%}. \end{aligned}

The computation

Play the game: draw three numbers, apply the optimal rule (guess high if the previous is below 12\tfrac12, else low) on both comparisons, and take the fraction of rounds scoring both.

import numpy as np
rng = np.random.default_rng(0); M = 8_000_000
x1, x2, x3 = (rng.random(M) for _ in range(3))
ok = lambda p, n: np.where(p < .5, n > p, n < p)         # high if prev<.5 else low
print(round((ok(x1, x2) & ok(x2, x3)).mean(), 5))        # 0.5417 = 13/24

Extra Credit

A friend has been playing forever and amassed a huge score. Given only that, what is the probability they win the next round?

Solution

A long survivor sits at a value drawn from the game’s quasi-stationary distribution. The kernel that carries a surviving value vv to the next is K(v,u)=1[v<12,u>v]+1[v>12,u<v]K(v,u)=\mathbf 1[v<\tfrac12,\,u>v]+\mathbf 1[v>\tfrac12,\,u<v]; its leading eigenfunction is φ(v)ev/λ\varphi(v)\propto e^{v/\lambda} on (0,12)(0,\tfrac12) (symmetric about 12\tfrac12), and substituting back forces e1/(2λ)=2e^{1/(2\lambda)}=2. The per-round survival probability, which is exactly the chance of winning the next round, is the eigenvalue λ=12ln20.7213.\lambda=\frac{1}{2\ln 2}\approx\boxed{0.7213}. (The source value is paywalled; this closed form is my own.)

The computation

Discretise the survival kernel KK on a fine grid and power-iterate to its leading eigenvalue: that eigenvalue is the long-run per-round survival probability, the chance the veteran wins again.

n = 2000; xs = (np.arange(n) + .5) / n; dx = 1 / n
K = np.zeros((n, n))
for i, v in enumerate(xs): K[i, (xs > v) if v < .5 else (xs < v)] = 1.0
w = np.ones(n)
for _ in range(20000):
    w2 = (K.T @ w) * dx; lam = w2.sum() / w.sum(); w = w2 / np.linalg.norm(w2)
print(round(lam, 4), round(1/(2*np.log(2)), 4))          # 0.7211 (n=2000) -> 0.7213