The Finite-Capital Game as a Markov Chain
In a gambler’s ruin model, the state records the gambler’s current fortune. Each play changes the fortune by one unit, but the available capital is finite: the fortune cannot fall below zero or rise above a fixed upper level. Specifying what happens at these two limits is part of defining the model, not a detail that can be added later. This tutorial sets out the process and its event terminology; it does not calculate the probability of eventual ruin.
Work on a probability space \((\Omega,\mathcal{F},\mathbb{P})\). Fix an integer \(N\ge1\), and let the state space be \(S=\{0,1,\ldots,N\}\). At each discrete time \(n\ge0\), \(X_n\) is the fortune after \(n\) plays. The initial fortune is a specified \(i\in S\), so \(X_0=i\) under \(\mathbb{P}_i\). Choose \(p,q\in[0,1]\) with \(p+q=1\). At an interior fortune, the next play wins one unit with probability \(p\) and loses one unit with probability \(q\). The endpoints are absorbing: once the fortune is \(0\) or \(N\), it remains there.
The symbol \(p\) denotes the probability of an upward step and \(q\) the probability of a downward step. This convention is worth fixing at the outset: reversing the meanings of \(p\) and \(q\) reverses every later formula involving bias. At an interior state, the two possible next fortunes are \(i+1\) and \(i-1\); neither is a new endpoint convention. At a boundary, the chain stays at that boundary rather than making a step outside \(S\).
The natural filtration is \(\mathcal{F}_n=\sigma(X_0,\ldots,X_n)\), the information generated by the fortunes observed through time \(n\). The Markov property says that, conditional on this history, the distribution of \(X_{n+1}\) depends only on \(X_n\). In this model, if \(1\le X_n\le N-1\), the conditional probabilities of \(X_{n+1}=X_n+1\) and \(X_{n+1}=X_n-1\) are \(p\) and \(q\), respectively. At either endpoint the next state equals the current one with probability one.
What Counts as Ruin?
For \(A\subseteq S\), write \(T_A=\inf\{n\ge0:X_n\in A\}\), with \(\inf\varnothing=\infty\). In particular, \(T_0=T_{\{0\}}\) is the first time the fortune is zero, and \(T_N=T_{\{N\}}\) is the first time it is \(N\). These definitions include time zero. Thus a chain started at zero has \(T_0=0\), and a chain started at \(N\) has \(T_N=0\).
When the process is described as a game that stops at the first boundary, its stopping time is \(T_{\{0,N\}}=\inf\{n\ge0:X_n\in\{0,N\}\}\). The terminal outcome is ruin if the boundary reached is zero and an upper-boundary win if it is \(N\). It is useful to distinguish this stopping description from the chain itself: the chain can be defined for all \(n\), because it stays at whichever endpoint it reaches. The first boundary time may be infinite on a path that never reaches either boundary, so no claim about its finiteness is needed to define the model.
Two Basic Consequences of the Transition Rules
Proof. On the event \(X_n=i\) for an interior state \(i\), the increment \(X_{n+1}-X_n\) equals \(1\) with conditional probability \(p\), and equals \(-1\) with conditional probability \(q\). Its conditional expectation is therefore \(1\cdot p+(-1)\cdot q=p-q\). Since the Markov transition probabilities are fixed given \(X_n\), conditioning on the full history \(\mathcal{F}_n\) gives the same expectation. At \(X_n=0\) or \(X_n=N\), the chain stays put, so the increment is zero. Adding the expected increment to \(X_n=i\) gives \(i+p-q\) at an interior state. \(\square\)
This is a one-step statement, not a conclusion about the probability of eventual ruin. If \(p=q=\tfrac12\), the conditional drift is zero at interior fortunes. If \(p>q\), it is positive there; if \(p<q\), it is negative. The endpoint rule matters: the drift at a boundary is zero, not \(p-q\).
Proof. For \(m=0\), the path consists only of \(X_0=i\), which has probability one under \(\mathbb{P}_i\), and the empty product is one. Suppose the formula holds for paths of length \(m-1\). For a specified path of length \(m\), the probability of its first \(m\) states multiplied by the conditional probability of its final transition gives $$ \mathbb{P}_i(X_0=x_0,\ldots,X_m=x_m) =\mathbb{P}_i(X_0=x_0,\ldots,X_{m-1}=x_{m-1})p_{x_{m-1},x_m}. $$ The Markov property gives this conditional transition factor. Applying the induction hypothesis yields the stated product. If a transition is forbidden, its transition probability is zero, so the whole path probability is zero. \(\square\)
Worked Models
Worked Example: A Biased Game with Four Units of Capital
Let \(N=4\), \(p=\tfrac23\), \(q=\tfrac13\), and start at \(i=2\). Write the transition matrix and find the probability of the path \(2\to1\to2\to3\to4\).
In the state order \(0,1,2,3,4\), the matrix 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}. $$ The row sums are \(1\) for state \(0\), \(\tfrac13+\tfrac23=1\) for state \(1\), \(\tfrac13+\tfrac23=1\) for state \(2\), \(\tfrac13+\tfrac23=1\) for state \(3\), and \(1\) for state \(4\). Thus every row is a probability distribution.
The path has transition probabilities \(p_{2,1}=\tfrac13\), \(p_{1,2}=\tfrac23\), \(p_{2,3}=\tfrac23\), and \(p_{3,4}=\tfrac23\). Multiplying them gives $$ \mathbb{P}_2(X_1=1,X_2=2,X_3=3,X_4=4) =\tfrac13\cdot\tfrac23\cdot\tfrac23\cdot\tfrac23 =\tfrac{8}{81}. $$ The path does not visit either boundary before its final transition, so this is also the probability of following that particular four-step route to the upper boundary.
Check: The numerator in the product is \(1\cdot2\cdot2\cdot2=8\), and the denominator is \(3\cdot3\cdot3\cdot3=81\). Hence the product is \(\tfrac{8}{81}\), not \(\tfrac{2}{81}\).
Worked Example: Two Steps in a Fair Game
Let \(N=3\), \(p=q=\tfrac12\), and \(X_0=1\). Find the distribution of \(X_2\).
In state order \(0,1,2,3\), 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\). From state \(1\), the first step goes to \(0\) or \(2\), each with probability \(\tfrac12\). From \(0\) the chain stays at \(0\); from \(2\), it goes to \(1\) or \(3\), each with probability \(\tfrac12\). Therefore $$ \mathbb{P}_1(X_2=0)=\tfrac12,\qquad \mathbb{P}_1(X_2=1)=\tfrac14,\qquad \mathbb{P}_1(X_2=2)=0,\qquad \mathbb{P}_1(X_2=3)=\tfrac14. $$ For example, the probability of \(1\to2\to3\) is \(\tfrac12\cdot\tfrac12=\tfrac14\), while the probability of \(1\to0\to0\) is \(\tfrac12\cdot1=\tfrac12\).
Check: The four probabilities sum to \(\tfrac12+\tfrac14+0+\tfrac14=1\). The state \(2\) has probability zero at time two because neither possible first step from \(1\) can return to \(2\) on the second step.
Worked Example: Deterministic Upward Play and a Boundary Start
Let \(N=4\), \(p=1\), \(q=0\). First start at \(i=2\), then consider a separate game started at \(i=4\). Describe the paths and the boundary times.
For the first start, the path is deterministic: \(X_0=2\), \(X_1=3\), \(X_2=4\), and \(X_n=4\) for every \(n\ge2\). The probability of the two-step path \(2\to3\to4\) is \(1\cdot1=1\). Thus \(T_4=2\) and \(T_0=\infty\) on this path. This illustrates that reaching the upper boundary is not ruin.
For the second start, \(X_0=4\), and the absorbing boundary rule gives \(X_n=4\) for all \(n\ge0\). By the definition that includes time zero, \(T_4=0\) and \(T_0=\infty\). The row for state \(4\) has probability \(1\) of moving to \(4\), so its row sum is \(1\). The interior rows also sum to \(p+q=1+0=1\); state \(0\)'s row sum is \(1\). Thus the degenerate step probabilities still give a valid transition matrix.
Common Modeling Errors
A frequent mistake is to let the transition rule send the gambler from zero to \(-1\), or from \(N\) to \(N+1\). That defines a different process on a larger state space, not the finite-capital model above. Another mistake is to call reaching \(N\) “ruin.” In this model, ruin refers to the zero boundary; the upper boundary is the other terminal outcome. Finally, the path-product calculation can be wrong even when the transition probabilities have been identified correctly: for the four transitions \(\tfrac13,\tfrac23,\tfrac23,\tfrac23\), the product is \(\tfrac{8}{81}\), since \((\tfrac23)^3=\tfrac8{27}\) and \(\tfrac13\cdot\tfrac8{27}=\tfrac8{81}\).
Before analyzing a gambler’s ruin question, check the state order, the meanings of \(p\) and \(q\), and the endpoint transitions. Also check whether the initial state is interior or already a boundary. These basic choices determine which event is being asked about and which transition probabilities apply.
Check Your Understanding
Use the model definitions to answer each question. For path events, include only the specified sequence of states.
- For \(N=5\), \(p=\tfrac35\), and \(q=\tfrac25\), list the possible next states and their probabilities when the current fortune is \(3\).
- With \(N=4\), \(p=\tfrac14\), \(q=\tfrac34\), and initial fortune \(2\), calculate the probability of the path \(2\to1\to0\).
- If the initial fortune is \(0\), what are \(T_0\) and \(T_N\) under the definitions in this tutorial?
- For an interior fortune \(i\), compute the conditional expected increment when \(p=\tfrac12\) and \(q=\tfrac12\). Why does the same statement not apply at an endpoint?
- Explain in words the difference between \(\{T_0<T_N\}\) and \(\{T_N<T_0\}\).