[Paper Review] How to lose as little as possible
This paper investigates the optimal number of coin tosses $ n $ that maximizes the probability of an underdog (with lower heads probability $ q $) beating a stronger opponent (with higher heads probability $ p > q $) in a head-to-head comparison over $ n $ trials. Using a multivariate Zeilberger algorithm and analysis of a Legendre polynomial-based indicator function $ J_n(q,p) $, the authors prove unimodality of the win probability and derive tight bounds for the unique maximizer $ N(q,p) $, which satisfies $ \left\lfloor \frac{1}{2(p-q)} - \frac{1}{2} \right\rfloor \leq N(q,p) \leq \left\lceil \frac{\max(1-p,q)}{p-q} \right\rceil $. The method enables efficient computation of $ N(q,p) $ even for extremely small $ q $ and $ p $, such as $ 10^{-100} $, via high-precision numerical integration.
Suppose Alice has a coin with heads probability $q$ and Bob has one with heads probability $p>q$. Now each of them will toss their coin $n$ times, and Alice will win iff she gets more heads than Bob does. Evidently the game favors Bob, but for the given $p,q$, what is the choice of $n$ that maximizes Alice's chances of winning? The problem of determining the optimal $N$ first appeared in \cite{wa}. We show that there is an essentially unique value $N(q,p)$ of $n$ that maximizes the probability $f(n)$ that the weak coin will win, and it satisfies $\frac{1}{2(p-q)}-\frac12\le N(q,p)\le \frac{\max{(1-p,q)}}{p-q}$. The analysis uses the multivariate form of Zeilberger's algorithm to find an indicator function $J_n(q,p)$ such that $J>0$ iff $n
Motivation & Objective
- To determine the optimal number of trials $ n $ that maximizes the probability that a weaker coin (with heads probability $ q $) produces more heads than a stronger coin (with heads probability $ p > q $) over $ n $ tosses.
- To prove that the win probability function $ f(n) $ is unimodal, with a unique or consecutive pair of maximizers, and to identify the exact location of this maximum.
- To derive tight analytical bounds for $ N(q,p) $, the value of $ n $ that maximizes Alice’s winning probability, using properties of Legendre polynomials and nullcline analysis.
- To develop a robust, high-precision algorithm for computing $ N(q,p) $, even for extremely small $ q $ and $ p $, using numerical integration of an integral representation of the indicator function $ J_n(q,p) $.
- To explore the asymptotic behavior of $ N(q,p) $ as $ p \to q $, and to conjecture improved bounds and asymptotic forms for $ N(q,p) $.
Proposed method
- The authors define a win probability function $ f(n) $ as a double sum over binomial probabilities, representing the chance that Alice (with coin $ q $) gets more heads than Bob (with coin $ p > q $).
- They introduce an indicator function $ J_n(q,p) $, a linear combination of consecutive Legendre polynomials, such that the sign of $ f(n+1) - f(n) $ matches the sign of $ J_n(q,p) $, enabling efficient detection of the maximum.
- Using the multivariate form of Zeilberger’s algorithm, they derive a closed-form recurrence for $ f(n) $, which leads to the expression for $ J_n(q,p) $ in terms of $ \phi_n(xy) $, a hypergeometric-type sum related to Legendre polynomials.
- They analyze the function $ p_n(q) $, the value of $ p $ for which $ J_n(q,p) = 0 $, and use its nullcline structure in the $ (p,q) $-plane to derive bounds on $ N(q,p) $.
- For large $ N(q,p) $, they use a high-precision numerical integration method to evaluate the sign of $ J_n(q,p) $, based on an integral representation involving $ \int_0^\pi (u + \sqrt{u^2 - 1} \cos t)^n dt $.
- They implement a differential equation approach to compute the $ p_n(q) $ nullcline, enabling fast generation of the boundary curve and efficient root-finding for $ N(q,p) $.
Experimental results
Research questions
- RQ1What value of $ n $ maximizes the probability that a weaker coin (with heads probability $ q $) produces more heads than a stronger coin (with heads probability $ p > q $) over $ n $ tosses?
- RQ2Is the win probability function $ f(n) $ unimodal, and if so, is the maximum unique or shared by two consecutive $ n $ values?
- RQ3Can tight analytical bounds be derived for $ N(q,p) $, the optimal $ n $, in terms of $ p $ and $ q $?
- RQ4How can $ N(q,p) $ be efficiently computed when $ q $ and $ p $ are extremely small, such as $ 10^{-100} $, where direct computation fails?
- RQ5What is the asymptotic behavior of $ N(q,p) $ as $ p \to q $, and can improved bounds or closed-form approximations be derived?
Key findings
- The win probability $ f(n) $ is unimodal: there exists a unique or consecutive pair of $ n $ values where $ f(n) $ achieves its maximum, and $ N(q,p) $ is defined as the smallest such $ n $.
- The optimal $ n $, $ N(q,p) $, satisfies the bounds $ \left\lfloor \frac{1}{2(p-q)} - \frac{1}{2} \right\rfloor \leq N(q,p) \leq \left\lceil \frac{\max(1-p,q)}{p-q} \right\rceil $, which are tight and asymptotically sharp.
- For $ p = 2q $ and small $ q $, $ N(q,p) $ grows approximately as $ \frac{1}{2(p-q)} $, and the paper computes $ N(10^{-100}, 2 \cdot 10^{-100}) = 727689031794675988529598753552387528452110838880220070528794638971962649789 $.
- The indicator function $ J_n(q,p) $, a linear combination of Legendre polynomials, determines the sign of $ f(n+1) - f(n) $, enabling efficient computation of the maximum via sign detection.
- An efficient algorithm using high-precision numerical integration of an integral representation of $ J_n(q,p) $ allows computation of $ N(q,p) $ even for $ q, p \sim 10^{-100} $, with execution times under a few seconds.
- The asymptotic limit $ \lim_{(p,q) \to (q_0,q_0)} (p - q) N(q,p) = \frac{1}{2} $ holds, confirming that $ N(q,p) \sim \frac{1}{2(p-q)} $ as $ p \to q $.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.