Does the last hitting time have finite expectation while the stochastic process a.s. converges to another value at some rate? Let's say $X_n$ is a stochastic process and converges almost surely to $1$ with $\lim\limits_{n \rightarrow \infty} n(X_n - 1) = 1$ a.s.
Define the last time this process hits or crosses $0$ as $n_h = \min\limits_{n \in \mathbb{N}}\{n: X_N > 0, \forall N \ge n \}$.
Then $n_h$ is almost surely finite. But does it have finite expectation?
I tend to believe not. But any ideas of a counterexample?
 A: The expectation can indeed be infinite.
The best counterexample is probably a simple random walk on $\mathbb Z$ stopped at its first visit to $1$ (call it $X_n$); however, this doesn't quite work, because with probability $1$ this process has $X_n = 1$ identically for sufficiently large $n$; hence, $\lim n (X_n - 1) = 0$. Without that restriction, the counterexample would work, as follows: with probability $1/2$ the walk would take its first step to the left. Conditioning on that event, the time of the first return to $0$ has infinite expectation, and the time of last visit to $0$ is stochastically larger.
So, we want to extract the good parts of that example while satisfying the convergence condition. We'll do so as follows:
let $X_n$ be a random walk on the states $\{0, -1, -2, \dots\} \cup \{1 - 1/n \colon n \in \mathbb Z_{>1}\}$. We define transition probabilities by:


*

*For $x < 0$, $p(x, x-1) = p(x, x+1) = 1/2$.

*$p(0, -1) = p(0, 1/2) = 1/2$.

*For $x > 1$, $p(1 - \frac 1 x, 1 - \frac{1}{x+1}) = 1$.


This behaves like a simple random walk on $\mathbb Z$ until the first time the walk moves to the right of $0$; at that point, it moves to $x = 1/2$ and begins a slow drift toward $0$, deterministically moving along the set $\{\frac 1 2, \frac 2 3, \frac 3 4, \dots\}$. The expectation of the time of the last visit to $0$ is still infinite (for the same reasons as the other example); however, this one has the desired property that $\lim |n(X_n - 1)| = 1$, since with probability $1$ there is some $N(\omega)$ such that $X_{N + n} = 1 - \frac 1 n$.
Note that I took some liberties applying absolute values to the convergence rate, since $X_n - 1$ is negative; if you want a counterexample without those, change the states to $\{1 + 1/n\}$, have $p(0, 3/2) = 1/2$, and have the walk drift down to $1$ from above.
