\documentclass[a4paper,12pt]{article}
\newcommand{\ds}{\displaystyle}
\newcommand{\pl}{\partial}
\parindent=0pt
\begin{document}
{\bf Question}
Describe briefly the behaviour of a particle moving in a simple
random walk between two reflecting barriers.
Find the expected number of steps until the particle, initially at
position $j,$ reaches the upper barrier for the first time for the
case $p \not= q,$ $p$ and $q$ nonzero.
Calculate the expected number of consecutive steps for which the
particle remains on the upper barrier during a visit.
\vspace{.25in}
{\bf Answer}
Let $E_j$ be the expected number of steps until the particle
reaches the upper barrier for the first time, starting at $j.$
(Barriers at $a$ and $-b$)
$\ds E_j = p(1 + E_{j+1}) + q(1 + E_{j-1}) + (1-p-q)(1 + E_j)$
which rearranges to give
$\ds pE_{j+1} - (p+q)E_j + qE_{j-1} = -1 \hspace{.2in} -b