Gambler's ruin Created 2026-09-24 Updated 2026-11-05
Gambler's ruin is the absorption problem for a fortune that changes by one unit per game. Let , with independent wins of Probability and losses of Probability . Stop when the fortune reaches zero or the target . Zero is ruin; reaching is success.
The success Probability has boundary values , and satisfies . Solving this second-order recurrence gives
Finite-interval exit times have geometric tails, so absorption occurs almost surely and ruin has Probability . The fair case is linear because the fortune itself is harmonic; the biased case uses the harmonic exponential .
For a fair game with initial fortune three and target ten, success has Probability . The Expected duration of symmetric gambler's ruin is , giving 21 steps in this example. The same local first-step method produces expected durations, discounted absorption probabilities and conditional durations; their different boundary conditions encode different questions about the same paths.
Hitting probability Created 2026-09-24 Updated 2026-11-05
A Hitting probability describes reaching a target, possibly before a competing target. For a Markov chain and disjoint sets , let and define
Its boundary values are on and on . Outside , first-step analysis gives the discrete harmonic equation . If the finite chain hits almost surely from every state, these equations determine uniquely: stop at the boundary or use the maximum principle for the difference of two solutions.
For a symmetric nearest-neighbour random walk on absorbed at its endpoints, the Probability of hitting before zero is . It has the correct endpoint values and equals the average of its two neighbours; for example, starting at two on gives Probability .
On an infinite state space, boundary values and harmonicity need not imply uniqueness. The Hitting probability is the minimal nonnegative solution, obtained as the increasing limit of finite-horizon hitting probabilities. Taking empty gives the Probability of ever hitting , with paths that never hit contributing zero. A Hitting probability concerns an entire sample path; it differs from the Probability of occupying the target at a specified time.
Write and for . For the parity correction , the conditional expectations of the increments of are
The holding move contributes zero. Thus the period-two martingale corrector for a birth-death chain exists precisely when
This is the condition that be a harmonic function for a Markov chain. The process has integrable values from a fixed initial state because ; the Markov property therefore turns the zero conditional increments into the required martingale property. Conversely, both parities are reached with positive probability because all right and left probabilities are positive, so the two conditional equations are necessary. Expanding their numerator also gives the equivalent balance condition . Positivity makes .
Put , . The exit time is almost surely finite. Indeed, set and . From any interior point, consecutive right steps reach in at most moves, with probability at least . The Markov property gives . This is the finite-interval exit times have geometric tails argument. The walk cannot skip a boundary because its jumps have size at most one.
Under the balance condition, the stopped martingale is bounded, because the stopped position stays in . Apply the optional stopping theorem at , then dominated convergence as . Starting from zero gives
With and ,
The bounded parity corrections disappear after division by ; the holding probability of a Markov chain may be positive or zero and may differ between parities.
For failure of balance, use scale increments for a birth-death chain rather than the nonexistent bounded correction. Let be the upper exit probability from for boundaries . The Markov property yields
where depend only on parity. Choose positive numbers with . Then satisfies these equations and boundary values. Stopping this bounded harmonic function proves that it is the exit probability. In particular,
If , the positive-index sum stays bounded as , while the negative-index contribution diverges geometrically, so . If , the negative-index sum stays bounded while the positive-index sum diverges, so . Therefore the complete classification is
Thus a fixed nonzero imbalance drives the macroscopic exit to the corresponding side, for every positive .
Period-two martingale corrector for a birth-death chain Created 2026-10-14 Updated 2026-11-05
For a birth-death chain on the integers with right/left probabilities depending on parity , define . It is a harmonic function for a Markov chain exactly when
equivalently . The correction is bounded. Stopping this martingale at boundaries gives a lower exit Probability tending to as , even though the original position need not be a Martingale.
// Target: markov-process.bigb
Scale increments for a birth-death chain Created 2026-10-14 Updated 2026-11-05
The interior equation for a harmonic function for a Markov chain on the integers gives . Positive scale increments satisfy . For absorbing boundaries , the lower exit Probability from is
This satisfies the harmonic equation and the boundary values and therefore is the hitting probability. For parity-dependent probabilities, with ; geometric sums distinguish rightward, balanced and leftward escape.
// Target: markov-process.bigb