Expected duration of biased gambler's ruin
= Expected duration of biased gambler's ruin
{title2=$m_i=[N(1-\rho^i)/(1-\rho^N)-i]/(p-q)$}
For a nearest-neighbour fortune on $\{0,\ldots,N\}$, with win probability $p$, loss probability $q=1-p$ and $p\ne q$, put $\rho=q/p$. <First-step analysis> gives $m_i=1+pm_{i+1}+qm_{i-1}$, with zero endpoint values. Solving the recurrence gives the displayed mean duration. Its symmetric limit is $i(N-i)$.