2 players A and B start with $a$ and $b$ (both integers) dollars respectively, and they bet against each other 1 dollar each time by tossing a fair coin.
Let $X_n = x + \sum_{i=1}^{n}\xi_i$ where $\xi_i$ are i.i.d. with $P(\xi_i=1)=p,P(\xi_i=-1)=q=1-p$.
Let $\tau_0 = \inf{\{n:X_n = 0}\}$, $\tau_{1} = \inf{\{n:X_n = x+y}\}$, and $\tau=\tau_0\wedge \tau_{1}$, which are all stopping times w.r.t. the martingale $(X_n)$.
How to find $E[\tau]$?
My initial thought:Let $E_{a}[\tau]$ denote the value $E[\tau]$ when A start with $a$,so I
get the equation $$E_{a}[\tau]=pE_{a+1}[\tau]+qE_{a-1}[\tau]+1$$
with the initial condition$$E_{0}[\tau]=E_{a+b}[\tau]=0$$
But I don't know how to sovle it.
Or maybe are there some other ways to deal with this problem?
Any hint will be appreciated.
Best Answer
This is a version of the so-called "Gambler's Ruin" problem, and it can be solved elegantly with the Optional Stopping Theorem.
Again, this is a sketch of the solution, but if you'd like more details, let me know.