Expected value and variance of the random walk hitting time Let $\{Y_n,n\ge1\}$ be i.i.d. random variables, and $P\{Y_i=1\}=p, P\{Y_i=-1\}=q=1-p,p>1/2>q$.
Let $S_0=0,S_n=\sum_{k=1}^nY_k$, and $T=\min\{n:S_n\ge b\}$ with $b>0$.
What is the expected value and variance of $T$?
 A: In other words, you are seeking the mean and variance of the first passage time of a discrete random walk, given an absorbing barrier at $b > 0$. 
You can find the detailed derivation / solution in a text such as: 

Cox and Miller (1965), The Theory of Stochastic Processes, Chapman and Hall 

[ See Section 2.2 .... p.38 in my copy]
They obtain the very neat solution for the mean as:  $\frac{b}{2p-1}$   ... given $p > \frac{1}{2}$
and also a solution for the variance.
A: To reach $b$ starting from $0$, one needs to reach $1$ starting from $0$, then to reach $2$ starting from $1$, ..., and finally to reach $b$ starting from $b-1$. By the Markov property and the translational invariance of the random walk, this shows that $T_b$ is the sum of $b$ i.i.d. copies of $T_1$ hence $E[T_b]=b\cdot E[T_1]$ and $\mathrm{var}(T_b)=b\cdot \mathrm{var}(T_1)$.
Regarding $T_1$, the usual one-step recursion works perfectly. Thus, $T_1=1$ with probability $p$ and $T_1=1+T'_1+T''_1$ with probability $q$, where $T'_1$ and $T''_1$ are i.i.d. copies of $T_1$. The generating function $g(s)=E[s^{T_1}]$ solves $g(s)=s(p+qg(s)^2)$. One can deduce from this identity (without even fully identifying $g$) the values of $g'(1)=E[T_1]$ and $g''(1)=E[T_1(T_1-1)]$, and finally the values of $E[T_1]=g'(1)$ and $\mathrm{var}(T_1)=g''(1)+g'(1)-g'(1)^2$.

 $E[T_1]=1/(p-q)$, $\mathrm{var}(T_1)=4pq/(p-q)^2$.

