# Reference request for the law of the stopping time in the gambler's ruin problem

Suppose we have a sequence of independent and identically distributed random variables $(X_n)_{n\ge 1}$ such that $$P(X_n=1)=p,\quad P(X_n=0)=r,\quad P(X_n=-1)=q$$ with $p,q,r\in[0,1]$, $p+q+r=1$, and $pq>0$ to avoid trivialities.

Choose integers $a,b$, $a<0<b$, and set $$\tau=\inf\left\{n\ge 1; \sum_{k=1}^nX_k\in\{a,b\}\right\},$$ i.e. $\tau$ is the time when the random walk defined by $S_0=0$ and $S_n=\sum_{k=1}^nX_k$ leaves for the first time the interval $[a+1,b-1]$. Or it can be interpreted as the time when a gambler has either lost his initial capital $a$ or won an amount $b$.

One can use Doob's optional stopping theorem or the strong Markov property to determine the law of $\tau$, see, e.g., stopping time expectation for gambler's ruin (where only the symmetric case $p=q=\frac{1}{2}$, $r=0$ is treated).

Does anybody know a reference (article or textbook) where the general case is treated? Many thanks in advance!

-

## migrated from mathoverflow.netJul 4 '13 at 20:13

This question came from our site for professional mathematicians.

– Alexander Chervov Jun 30 '13 at 19:54
It is not (research level). – Did Jul 4 '13 at 9:12
To go to the obvious, did you try Feller? The chances are high that the relevant martingale is in there. – Did Jul 4 '13 at 13:51