gambler's ruin with unequal bet

Like all existing gamble's ruin problem, assume P(i) represents the probability that the gambler wins N dollars given that his current wealth is i dollars (he has i dollars at the moment). In most of the existing solutions, it is assumed that the gambler bets on 1 dollars. It means, if the gambler wins the current step, his state is changed to (i+1) and if he loses, the state is changed to (i-1). In this case, P(i) is calculated using the iterative equation below: P(i+1) - P(i) = (q/p)(P(i) - P(i-1)) where p is the probability of winning in each single game and q = 1-p. Moreover, P(0) = 0 and P(N) = 1

Here I have a little different assumption. In a single gamble, assume the gambler wins 2 dollars with the probability of p and loses 1 dollar with the probability of q = 1-p (I just changed the bet in case he wins). In this especial case, if the gambler wins, then the current state i is changed to i+2. If the gambler loses, the current state is changed to i-1.

Does anybody know how to calculate P(i) in such an especial case? I have tried the mentioned iterative equation like below: P(i+2) - P(i) = (q/p)(P(i) - P(i-1)) But I cannot achieve a general solution for P(i). The result through the iterative method will be quite complicated. Using the iterative solution, you should calculate P(i) according to P(i-1). Then, since P(0) = 0, P(1) is calculated easily and other P(i) would be appeared. But, I could not find a general equation to calculate P(i) directly. Please note that P(N+1) = P(N) = 1 and P(0) = 0

The problem is simply an ordinary homogeneous linear recurrence

$$P(i+2) = \frac{1}{p} P(i) - \frac{q}{p} P(i-1)$$

which can be solved with standard methods. Every solution to this will be a linear combination of the three basis solutions of the form

$$P(n) = r^n$$

which we can plugin to the recurrence

$$r^{i+2} = \frac{1}{p} r^i - \frac{q}{p} r^{i-1}$$ $$r^3 - \frac{1}{p} r + \frac{q}{p} = 0$$

and solve for the three possible values for $r$. (If this equation has repeated roots, then there will be basis solutions of different forms)

Note that $r=1$ is one of the three solutions, so after dividing out $r-1$ you only need to use the quadratic formula to get the other roots.

Wolfram alpha gives the general form. (I was only able to figure out how to specify the boundary condition at zero)

Incidentally, you could alternatively solve this by repeating the trick you used. Writing $D(n) = P(n) - P(n-1)$, the recurrence you wrote becomes

$$D(n+2) + D(n+1) = \frac{q}{p} D(n)$$

Then, writing $E(n) = D(n) - u D(n-1)$ for an unspecified $u$, we get

$$E(n+2) + u D(n+1) + E(n+1) + u D(n) = \frac{q}{p} D(n)$$ $$E(n+2) + u E(n+1) + u^2 D(n) + E(n+1) + u D(n) = \frac{q}{p} D(n)$$

so if we pick $u$ such that $u^2 + u = \frac{q}{p}$, the equation becomes $$E(n+2) + (u+1) E(n+1) = 0$$ whose general form is easily solved for.

• That's cool. If P(n) = $r^n$, then what about P(0). Acording to what you described, P(0) = $r^0$ = 1 but it is 0. – Abbas Arghavani Mar 16 '17 at 19:48
• @AbbasArghavani: The general solution is a linear combination of the basis solutions. You have three coefficients and three boundary conditions; you have to solve the system of three linear equations if you want the solution satisfying the boundary conditions. – user14972 Mar 16 '17 at 19:56