A Reliable Setup for Finite Ruin Probabilities
Finite gambler’s ruin calculations are short, but several conventions must line up: which probability means a win, which boundary is ruin, and whether the target fortune is counted as a state. A formula can look plausible and still answer a different question if one of these choices is reversed. This tutorial develops checks that expose those errors before they affect the answer.
Let \(N\ge2\) be an integer, and let \((X_n)_{n\ge0}\) be a discrete-time Markov chain on the probability space \((\Omega,\mathcal{F},\mathbb{P})\), with state space \(S=\{0,1,\ldots,N\}\). The process describes a gambler’s capital. States \(0\) and \(N\) are absorbing: capital \(0\) is ruin, and reaching \(N\) is success. At each interior state \(i\in\{1,\ldots,N-1\}\), the capital increases by one with probability \(p\), and decreases by one with probability \(q=1-p\), where \(0<p<1\). Thus \(P=(p_{ij})\) is row-stochastic: from an interior state \(i\), \(p_{i,i+1}=p\), \(p_{i,i-1}=q\), and the other entries in that row are zero; the boundary rows have \(p_{00}=p_{NN}=1\).
Write \(T_0=\inf\{n\ge0:X_n=0\}\) and \(T_N=\inf\{n\ge0:X_n=N\}\). The finite ruin probability from capital \(i\) is \(u_i=\mathbb{P}_i(T_0<T_N)\). The strict inequality matters: this event means ruin occurs before success. If the chain starts at \(0\), then \(u_0=1\); if it starts at \(N\), then \(u_N=0\).
That equation is a useful first diagnostic. A win leads to \(i+1\), so its probability multiplies \(u_{i+1}\); a loss leads to \(i-1\), so its probability multiplies \(u_{i-1}\). The order of the terms is determined by the model, not by the order in which a formula happens to be remembered.
Why the Recurrence Gives the Ruin Probability
For completeness, we first check that the process is absorbed at a boundary with probability one. Let \(\mathcal{F}_n=\sigma(X_0,\ldots,X_n)\) be the history through time \(n\). From any interior state \(j\), \(j\) consecutive losses reach \(0\) within at most \(N\) steps. The probability of those losses is \(q^j\): all \(j\) transitions occur while the chain is still in the interior, and the last one takes it to \(0\). Since \(j\le N-1\) and \(0<q<1\), \(q^j\ge q^{N-1}\ge q^N\). Consequently, from every interior state the conditional probability of absorption within the next \(N\) steps is at least \(q^N>0\).
Proof. Set \(T=\min(T_0,T_N)\), and let \(a_k=\mathbb{P}_i(T>kN)\), for any fixed initial interior state \(i\) and integer \(k\ge0\). On \(\{T>kN\}\), the chain is in an interior state at time \(kN\). By the Markov property and the bound just established, its conditional probability of remaining unabsorbed for the next \(N\) steps is at most \(1-q^N\). Therefore \(a_{k+1}\le(1-q^N)a_k\). Since \(a_0\le1\), induction gives \(a_k\le(1-q^N)^k\). The right-hand side tends to zero because \(0<1-q^N<1\). If \(T=\infty\), then \(T>kN\) for every \(k\), so \(\mathbb{P}_i(T=\infty)\le a_k\) for every \(k\), and hence \(\mathbb{P}_i(T=\infty)=0\). Thus absorption occurs almost surely from every interior state. \(\square\)
The recurrence follows by conditioning on the first step: from \(i\), a win moves to \(i+1\) and a loss to \(i-1\). The boundary values follow from the definitions of \(T_0\) and \(T_N\). We can now solve the recurrence and verify that its solution is unique.
Proof. Define differences \(d_i=u_i-u_{i-1}\) for \(1\le i\le N\). The recurrence at an interior state is equivalent to \(p(u_{i+1}-u_i)=q(u_i-u_{i-1})\), so \(d_{i+1}=r d_i\). It follows by induction that \(d_i=d_1r^{i-1}\). The boundary conditions require $$ -1=u_N-u_0=\sum_{i=1}^{N}d_i=d_1\sum_{k=0}^{N-1}r^k. $$ The sum is positive because \(r>0\), so these equations determine \(d_1\) uniquely and thus determine every \(u_i\) uniquely. For \(r\ne1\), summing the first \(i\) differences gives \(u_i=1-\frac{\sum_{k=0}^{i-1}r^k}{\sum_{k=0}^{N-1}r^k}\). Since \(\sum_{k=0}^{i-1}r^k=(1-r^i)/(1-r)\) and \(\sum_{k=0}^{N-1}r^k=(1-r^N)/(1-r)\), this equals \((r^i-r^N)/(1-r^N)\). If \(r=1\), all the differences are equal; their sum is \(-1\), so each is \(-1/N\) and \(u_i=1-i/N=(N-i)/N\). The actual ruin probabilities satisfy the boundary conditions and recurrence, so uniqueness identifies them with these solutions. \(\square\)
The finite-sum form also makes the fair-game limit precise. For \(r>0\), $$ u_i=\frac{\sum_{k=i}^{N-1}r^k}{\sum_{k=0}^{N-1}r^k}. $$ When \(p\) tends to \(1/2\), \(r=q/p\) tends to \(1\). Both sums contain finitely many terms, and each term tends to \(1\), so their ratio tends to \((N-i)/N\). The fair formula is therefore the continuous limiting value of the biased formula, not a separate value obtained by substituting \(r=1\) into a quotient with zero denominator.
Worked Examples: Diagnose the Common Errors
Worked Example: Matching Step Probabilities to Destinations
Suppose \(N=4\), the gambler starts at \(i=2\), and each step is a win with probability \(p=\tfrac23\) or a loss with probability \(q=\tfrac13\). Find the ruin probability, checking the recurrence directly.
The transition matrix, in the state order \(0,1,2,3,4\), is $$ P= \begin{bmatrix} 1&0&0&0&0\\ \tfrac13&0&\tfrac23&0&0\\ 0&\tfrac13&0&\tfrac23&0\\ 0&0&\tfrac13&0&\tfrac23\\ 0&0&0&0&1 \end{bmatrix}. $$ Its row sums are \(1\), \(0+ \tfrac13+\tfrac23=1\), \(\tfrac13+\tfrac23=1\), \(\tfrac13+\tfrac23=1\), and \(1\), respectively. Here \(r=q/p=(1/3)/(2/3)=1/2\). The formula gives $$ u_2=\frac{(1/2)^2-(1/2)^4}{1-(1/2)^4} =\frac{1/4-1/16}{1-1/16} =\frac{3/16}{15/16} =\frac15. $$ For a recurrence check, the same formula gives \(u_1=(1/2-1/16)/(15/16)=7/15\) and \(u_3=(1/8-1/16)/(15/16)=1/15\). Thus $$ p u_3+q u_1=\frac23\cdot\frac1{15}+\frac13\cdot\frac7{15} =\frac2{45}+\frac7{45}=\frac15=u_2. $$ If the probabilities are swapped in the recurrence, the calculation instead describes a model with upward probability \(\tfrac13\) and downward probability \(\tfrac23\), not the stated game.
Worked Example: Keeping Ruin and Success Boundaries Straight
Let \(N=3\), \(p=q=\tfrac12\), and \(i=1\). The state order is \(0,1,2,3\), and the transition matrix is $$ P= \begin{bmatrix} 1&0&0&0\\ \tfrac12&0&\tfrac12&0\\ 0&\tfrac12&0&\tfrac12\\ 0&0&0&1 \end{bmatrix}. $$ The row sums are \(1\), \(\tfrac12+\tfrac12=1\), \(\tfrac12+\tfrac12=1\), and \(1\). Since ruin is hitting \(0\), set \(u_0=1\), not \(0\), and set \(u_3=0\). The fair formula gives \(u_1=(3-1)/3=2/3\). To check, it gives \(u_2=(3-2)/3=1/3\), and the recurrence at state \(1\) gives \(\tfrac12u_2+\tfrac12u_0=\tfrac16+\tfrac12=\tfrac23\).
A common reversed-boundary calculation sets a quantity \(v_0=0\), \(v_3=1\). That quantity is the probability of reaching \(3\) before \(0\), not the ruin probability. Indeed, for this fair chain \(v_1=1/3\), and \(u_1+v_1=2/3+1/3=1\). The boundary values must describe the event named in the question.
Worked Example: Counting the Target as a State
A fair gambler starts with capital \(1\) and stops upon reaching \(0\) or \(4\). The target is capital \(4\), so the state space is \(\{0,1,2,3,4\}\): there are four unit steps from \(0\) to the target, not three. The transition matrix is $$ P= \begin{bmatrix} 1&0&0&0&0\\ \tfrac12&0&\tfrac12&0&0\\ 0&\tfrac12&0&\tfrac12&0\\ 0&0&\tfrac12&0&\tfrac12\\ 0&0&0&0&1 \end{bmatrix}. $$ Its row sums are \(1\), \(\tfrac12+\tfrac12=1\), \(\tfrac12+\tfrac12=1\), \(\tfrac12+\tfrac12=1\), and \(1\). With \(N=4\), the fair formula gives \(u_1=(4-1)/4=3/4\). The full values \(u_0=1,u_1=3/4,u_2=1/2,u_3=1/4,u_4=0\) satisfy each interior equation: $$ \tfrac12u_0+\tfrac12u_2=\tfrac12+\tfrac14=\tfrac34,\quad \tfrac12u_1+\tfrac12u_3=\tfrac38+\tfrac18=\tfrac12,\quad \tfrac12u_2+\tfrac12u_4=\tfrac14. $$ Using \(N=3\) by mistake would give \(2/3\) from capital \(1\). That calculation treats capital \(3\), rather than capital \(4\), as the success boundary.
Checks That Catch Errors Early
Before accepting a finite ruin calculation, write down the event, the state space, and the direction of each step. Then test the answer against the endpoints and the first-step recurrence. These checks address different mistakes: a correctly solved recurrence can still answer the wrong boundary problem, while correct boundary values cannot repair a recurrence with \(p\) and \(q\) assigned to the wrong destinations.
Use the following audit in order:
- Check the model: \(p\) must multiply the upward destination and \(q\) the downward destination, with \(p+q=1\).
- Check the event: ruin has boundary values \(u_0=1\), \(u_N=0\); success has the reverse values.
- Check the endpoint: a target capital of \(N\) produces states \(0,1,\ldots,N\), including both endpoints.
- Check the equations: substitute the proposed values into \(u_i=p u_{i+1}+q u_{i-1}\) at interior states.
- Check the fair limit: the biased expression must tend to \((N-i)/N\) as \(p\) tends to \(1/2\).
These checks are useful because a finite recurrence has a unique solution under the stated conditions. Once the model and boundary conditions are correct, a proposed answer that satisfies the recurrence is fixed; if a check fails, the issue is usually a modeling or indexing choice rather than an algebraic detail.
Check Your Understanding
For each question, state the event and boundary values before calculating.
- In a game with \(p=\tfrac25\), \(q=\tfrac35\), and target \(N=3\), write the first-step equation for the ruin probability at state \(i=1\).
- For \(N=5\), what are the two boundary values for the probability of reaching \(N\) before \(0\)? How do they differ from the ruin-probability boundaries?
- A fair gambler starts at capital \(2\) and stops at \(0\) or \(4\). Calculate the ruin probability and state which number of unit steps separates the two boundaries.
- Explain why the expression \((r^i-r^N)/(1-r^N)\) cannot be evaluated by direct substitution at \(r=1\), and give its limiting value.
- Why does the probability of \(j\) consecutive losses from an interior state \(j\) equal \(q^j\), even though a block of \(N\) steps was used to bound the chance of absorption?