Gambler's ruin with a biased coin
Asked at Jane Street, DE Shaw
A gambler starts with k chips and plays until reaching N chips (cash out) or 0 chips (broke). Each round they win a chip with probability p and lose one with probability 1 - p. Now the coin is biased: p = 0.6.
Estimate the probability of reaching N before going broke by Monte Carlo, then compare against the exact answer.
N = 5, k = 2, p = 0.6 -> ~0.64
Show a hint
The symmetric formula no longer applies with drift. Set up the same first-step recurrence but keep the unequal weights, and you get a geometric solution, not a linear one.
Your answer
This one is open-ended. Work it through, then check your reasoning against the full solution.