Biased random walk hitting probability (source code)

= Biased random walk hitting probability

For nearest-neighbour random walk on $\mathbb Z_+$ with upward probability $p>q$, the probability of ever hitting zero from $i$ is $(q/p)^i$.