# Expectation of $T^2$ where $T$ is the absorption time at ${a,−a}$ of a simple random walk $\{S_n\}$

I asked a very similar question before:

Expectation of $TS_T$ where $T$ is the absorption time at $\{a,-a\}$ of a simple symmetric random walk $\{S_n\}$

But this time I have an ASYMMETRIC random walk, and I want the expectation of $T^2$. Well known martingales don't seem to work.

Assume the steps are $1$ with probability $p$ and $-1$ with probability $1-p$.

-
The accepted answer has the additional "non-symmetric case", which if I am not mistaken is isomorphic to the ASYMMETRIC case. –  Asaf Karagila Oct 27 '11 at 23:51
wircho: I repeat my question from this page, before wondering about $E_0(T^2)$, do you know how to compute $E_0(T)$ in the asymmetric case? –  Did Oct 28 '11 at 0:23
Hmmm. Thanks for pointing out that martingales are not the right method for the moments. Could you direct me towards the right idea? Thanks a lot. –  wircho Oct 28 '11 at 0:27
@Asaf, isomorphic is odd in this context. More to the point, some other arguments are required to get the expectations of $T$ or $TS_T$ or $T^2$ in the asymmetric case. –  Did Oct 28 '11 at 1:07
@Didier: My point was that "non-symmetric case" is the same as "asymmetric case" (as "asymmetric" literally means not symmetric...) :-) –  Asaf Karagila Oct 28 '11 at 1:28

Let $q=1-p$. One can show that for every real number $s$ small enough, $$\mathrm E_0(s^{T})=s^a\,\frac{(2p)^a+(2q)^a}{(1+v(s))^a+(1-v(s))^a},\qquad v(s)=\sqrt{1-4pqs^2}.$$ Let $n$ denote a positive integer. Differentiating this identity $n$ times with respect to $s$ and plugging $s=1$ in the result yields $\mathrm E_0(T(T-1)\cdots(T-n+1))$. Alternatively, plugging $s=\mathrm e^x$ in this identity for $x$ small enough and expanding the resulting identity up to the order of $x^n$ when $x\to0$ yields $\mathrm E_0(T^k)$ for every positive integer $k\leqslant n$. For example, $$\mathrm E_0(T)=\frac{a}{p-q}\,\frac{p ^a-q^a}{p^a+q^a}.$$

-
Wow I didn't know this. So there's no easy way to calculate the moments without using some algebra system? I have Maple but I wonder how they did it before that. –  wircho Oct 28 '11 at 1:24