Mean absorption time of a finite birth-death chain with two absorbing end-points I am attempting to understand the mean absorption time of a birth-death process (with non-constant birth and death probabilities) and with two absorbing end-points (i.e. probability of birth and death at x = 0 and x = n is equally 0). 
I am referring in particular to this online reference, however something is not bounds-checking. In particular, in the expression for $m_n(1)$, we see that $A_n$ (expressed here) has a division by zero (in particular, p(0) = 0, and placed in the denominator, this is undefined). Am I missing something here? Or is this a typo? Is there another reference (maybe a book) that analyzes exactly such a chain? 
 A: The expressions for $A_n$ and $m_n$ in this reference do not ever contain a $p(0)$ term; what you're seeing here is an implied empty product. Using product notation, we get
$$
   A_n = \sum_{i=0}^{n-1} \frac{q(1) \dotsm q(i)}{p(1) \dotsm p(i)} = \sum_{i=0}^{n-1} \prod_{j=1}^i \frac{q(j)}{p(j)}.
$$
The $0^{\text{th}}$ term is a sum as $j$ goes from $1$ to $0$; there are no such $j$, so the product is $1$. Written without any indices whatsoever, we get
$$
   A_n = 1 + \frac{q(1)}{p(1)} + \frac{q(1)q(2)}{p(1)p(2)} + \dotsb + \frac{q(1)q(2)\dotsm q(n)}{p(1)p(2)\dotsm p(n)}.
$$
The expressions for $m_n(x)$ and for $m_n(1)$ in particular obey similar conventions. Here, when $y=0$, the product $\frac{q(1) \dotsm q(y)}{p(1) \dotsm p(y)}$ simplifies to $1$, and the sum $\sum\limits_{z=1}^y$ simplifies to $0$ (since there are no values of $z$ that satisfy $1 \le z \le 0$).

We can check that this all makes sense by considering the symmetric random walk where $p(i) = q(i) = \frac12$ and $r(i)=0$ for $0 < i < n$. In that case, $A_n$ simplifies to $n$ (since it's a sum of $n$ terms, all of which are $1$), 
$$
   m_n(1) = \frac1{A_n}\sum_{y=1}^{n-1}\sum_{z=1}^y 2 = \frac1n (2 + 4 + \dots + 2(n-1)) = n-1,
$$
and
$$
   m_n(x) = m_n(1) \sum_{y=0}^{x-1} 1 - \sum_{y=0}^{x-1} \sum_{z=1}^y 2 = (n-1)x - (0+2+\dots + 2(x-1))
$$
which simplifies to the well-known formula $m_n(x) = x(n-x)$.
