= Solution
The partial sums $S_n$ are a <martingale>, as are $S_n^2-n$. Since the increment has mean zero and nonzero variance, there are $\delta_+,\delta_->0$ with $\mathbb P(X_1\geq\delta_+)>0$ and $\mathbb P(X_1\leq-\delta_-)>0$. From any point in $(-a,b)$, a sufficiently long run of either kind exits the interval. Independence in consecutive blocks therefore bounds $\mathbb P(T>km)$ by a geometric sequence. In particular, $T<\infty$ almost surely and $\mathbb ET<\infty$.
Apply the <optional stopping theorem> first to $T\wedge n$. Since the increments are bounded and $\mathbb ET<\infty$, the stopped variables are uniformly integrable and passage to the limit gives
$$
\mathbb E S_T=0.
$$
Applying the same argument to $S_n^2-n$, using $|S_T|\leq\max\{a,b\}+c$, gives
$$
\mathbb E(S_T^2-T)=0,
\qquad
\mathbb E S_T^2=\mathbb ET.
$$
Back to article page