# Convergence of Random Sequence

I have a two statements. One says:

$$-\frac{1}{T} \sum_{t=1}^T X_t \rightarrow a$$ in probability as $T \rightarrow \infty$.

The other:

$$-\frac{1}{g(T)} \sum_{t=1}^{g(T)} X_t \rightarrow a$$ in probability as $T \rightarrow \infty$ for every function $g: N \rightarrow N$ such that $g(T) \rightarrow \infty$ as $T \rightarrow \infty$.

Could you please tell me why are these two statements equivalent for a random sequence $X_t$?

The question is actually about the equivalence of $Y_n\to 0$ in probability and $Y_{g(n)}\to 0$ in probability for each function $g\colon \mathbb N\to\mathbb N$ going to infinity as $n$ goes to infinity (it has nothing to do with averages).
Of course, the direction $\Leftarrow$ is trivial (take $g(n)=n$ for each $n$). For the converse, fix $g$ such that $g(n)\to \infty$. Fix $\varepsilon$ and $\delta\gt 0$: there is $N$ such that $\mathbb P(|Y_n|>\varepsilon)\lt \delta$ if $n\geqslant N$. Now consider $N'$ such that $g(n)\geqslant N$ if $n\geqslant N'$ (using the fact that $g(n)\to \infty$). We obtain that $\mathbb P(|Y_{g(n)}|>\varepsilon)\lt \delta$ if $n\geqslant N'$.