Convergence of random subsequence of random variables Let $Y_1, Y_2, \dots$ be independent random variables such that
$$
P(Y_i = 0) = 1-\frac{1}{i}, \ P(Y_i = 1) = \frac{1}{i}.
$$
Show that there is a sequence of random variables $Z_m$ taking positive integer values such that $Z_m \to \infty$ a.s. and
$$
Y_{Z_m} \to 1 \ a.s.
$$
This is easy if we don't have the $Z_m \to \infty$ requirement since we can just let $Z_m \equiv 1$. But how do I approach this if $Z_m \to \infty$? I have no idea where to start. Can anyone provide some hint? Thank you!
 A: This is a proof obtained by the suggested comment.
Since it is easy to see that
$$
P(Y_i=1 \ i.o.) = 1
$$
by Borel-Cantelli lemma, let
$$
A = \{\omega: Y_i(\omega) = 1 \ i.o.\}.
$$
Now pick $\omega \in A$, then we can find a subsequence $i_{m,\omega}$ such that $Y_{i_{m,\omega}}(\omega) = 1$ for all $m$. Then define
$$
Z_m(\omega) = i_{m,\omega}.
$$
It is easy to see that $Z_m \to \infty$ a.s. since $i_{m,\omega} \to\infty$ and $P(A) =1$. Therefore,
$$
P(Y_{Z_m} = 1 \text{ for all }m)=1.
$$
Edit: The above proof has a problem in that randomly choosing a subsequence $i_{m,\omega}$ does not gurantee that $Z_m$ is measurable. Hence, a slight modfication is required:
Let $Z_m(\omega) = \inf\{t \in \mathbb{N}^+: \sum_{i=1}^tY_i(\omega) = m\}$. Then it is still the case that $Z_m \to \infty$ a.s. since for any $\omega\in A$, $Z_m(\omega) \geq m$. Hence, $Z_m \to \infty$ a.s. To show that $Z_m$ is measurable, note that for any positive integer $k$, if $k < m$, then
$$
\{\omega: Z_m(\omega) = k\} = \emptyset \in \mathcal{F}.
$$
If $k\geq m$, then
$$
\{\omega: Z_m(\omega) = k\} = \bigg\{\omega: Y_k(\omega) = 1\bigg\} \cap \bigg\{\omega: \sum_{i=1}^{k-1}Y_i(\omega) = m-1\bigg\},
$$
which is an intersection of measurable sets as the sum of $Y_i$ are measurable. Therefore, $Z_m$ is measurable.
