# Law of large numbers with random index

Let $\{X_n\}_{n\ge1}$ be a sequence of i.i.d. random variables.

Let $\{I_N\}_{N\ge1}$ be another sequence of random variables, not necessarily independent of the first sequence.

Suppose that $I_N \longrightarrow \infty$ almost surely as $N \longrightarrow \infty$. Is it almost surely true that:

$$\frac{{\sum_{n=1}^{I_N} X_n }}{I_N} \longrightarrow \mathbb{E}[X]$$

If so, is it obvious?

Yes, has to be true. $I_N \rightarrow \infty$ a.s. so $\frac{\sum_{k=1}^{I_N}X_k}{I_N} \rightarrow \lim_{n\rightarrow\infty}\frac{S_n}{n}$ a.s. which equals $E(X)$ a.s. (Provided the $X_n$ are integrable, so that $E(X)$ exists and SLLN holds of course).