News for hackers. Stuff that matters.
Re:Gambler’s Ruin Problem [pdf] by vital303 on Sunday October 02, 2022 @08:06PM (#33061792)
Here is another solution. Assume a head multiplies your money by `r = q/p', and a tail divides by `r'. This bet is fair (the expected value of a dollar is a dollar: `p r + q 1/r = q + p = 1').

Start with a dollar, after several tosses you have `r^(head-tail difference)' dollars. The game ends if head-tail difference is `N - i' (with probability `x') or if head-tail difference is `-i' (probability is `1 - x'). The expected value is still a dollar:

1 = x r^(N - i) + (1 - x) (1/r)^i

Solve this equation for x.

There are no comments on this comment yet.