# Almost surely convergence to $0$ if and only if convergence to $0$ in probability

I am working on this question:

Prove that $$X_{n}\rightarrow 0$$ a.s. if and only if for every $$\epsilon>0$$, there exists $$n$$ such that the following holds: for every random variable $$N:\Omega\rightarrow\{n,n+1,\cdots\}$$, we have $$P\Big(\{\omega:|X_{N(\omega)}(\omega)|>\epsilon\}\Big)<\epsilon.$$

Is this question equivalent to asking me to prove "almost surely convergence to $$0$$ if and only if convergence to $$0$$ almost surely"?

If so, the direction $$(\Rightarrow)$$ can be proved following this: Convergence in measure and almost everywhere

However, isn't the direction $$(\Leftarrow)$$ not generally true? I can surely prove that there exists a subsequence $$X_{k_{n}}$$ of $$X_{n}$$ converges to $$0$$ almost surely...

Could someone tell me what this question is really asking about? I don't really want to spend time proving a wrong thing..

Thank you!

First, $$X_n\to 0$$ a.s. iff for any $$\epsilon>0$$, there exists $$n\ge 1$$ s.t. $$\mathsf{P}(\sup_{m\ge n}|X_m|>\epsilon)<\epsilon$$. In the following we fix $$\epsilon>0$$.
$$(\Rightarrow)$$ Suppose that $$X_n\to 0$$ a.s. Then since for any r.v. $$N$$ on $$\{n,n+1,\ldots\}$$, $$|X_{N}|\le \sup_{m\ge n}|X_m|$$, the result follows from the above statement.
$$(\Leftarrow)$$ Let $$N_n':=\inf\{m\ge n:|X_m|>\epsilon\}$$. Define $$N_n:=N_n'1\{N_n'<\infty\}+n1\{N_n'=\infty\}$$. Then $$\{\sup_{m\ge n}|X_m|>\epsilon\}=\{|X_{N_n}|>\epsilon\}$$. However, there exists $$n\ge 1$$ s.t. $$\mathsf{P}(|X_{N_n}|>\epsilon)<\epsilon$$.