Gambler's Ruin — 2D Random Walk

Capital vs. round number, between two absorbing barriers at 0 and N.

P(ruin) theory
—
Empirical ruin rate
—
Current capital
—
Fair game: P(ruin) = 1 − k/N. Biased game (r = q/p, q = 1−p): P(ruin) = (1 − r^k) / (1 − r^N). Each round the walk moves +1 with probability p or −1 with probability q, stopping at the barriers 0 (ruin) or N (target).