Finite mean matters in Wald's equation (source code)

= Finite mean matters in Wald's equation

For a <simple symmetric random walk> starting at zero, let $T_1$ be its first <hitting time> of $1$. The <infinite mean first passage of a simple symmetric random walk> shows that $T_1<\infty$ <almost surely> but $\mathbb E[T_1]=\infty$. Since $S_{T_1}=1$, assuming a finite <expected value> for $T_1$ would let Wald's equation assert $1=0\mathbb E[T_1]=0$, a contradiction. The formal expression $0\cdot\infty$ is not an allowed use of the theorem.<Lecture notes for Introduction to Stochastic Processes by Gordan Žitković/More about Random Walks>[§4.3, Problem 4.10 and its solution]{ref}

Compare $T_{\pm2}=\inf\{n\geq0:|S_n|=2\}$. From every surviving position in $\{-1,0,1\}$, three consecutive positive <increments> force absorption within three steps. Each fresh block has <probability> $1/8$ of this event, so $\mathbb P(T_{\pm2}>3k)\leq(7/8)^k$ and $\mathbb E[T_{\pm2}]\leq24$. This establishes finiteness before invoking the theorem. If $e_j$ is the average remaining time from position $j$, the <law of total expectation> gives
$$
e_{-2}=e_2=0,\qquad e_0=1+\frac{e_{-1}+e_1}{2},\qquad e_{-1}=e_1=1+\frac{e_0}{2},
$$
so \b[$\mathbb E[T_{\pm2}]=4$]. Symmetry gives equal exit <probabilities> at $-2$ and $2$, and $\mathbb E[S_{T_{\pm2}}]=0$, as Wald's equation predicts. This is a small <gambler's ruin> problem with two absorbing barriers.

\Image[/wald-one-and-two-barrier-waiting-times.png]
{title=Almost sure stopping can have either a finite or an infinite mean}
{description=Original exact <simple symmetric random walk> calculation from zero. The left compares survival <probabilities> for first hitting $1$ and first hitting either $-2$ or $2$; the right sums these tails to obtain capped average waiting times $\mathbb E[\min(T,n)]$. These are calculated laws, not simulated measurements.}

Even for $T_1$, each bounded <stopping time> $T_1\wedge n$ satisfies $\mathbb E[S_{T_1\wedge n}]=0$. The <stopped process> tends to $1$ <almost surely>, but its <expected value> does not tend to $1$. Rare long negative excursions retain the balancing contribution. The existing <stopped-walk martingale with almost sure but not L1 convergence> explains the related failure of <uniform integrability>; almost sure convergence alone does not permit exchanging a <limit> and an <expected value>.