# $f_n \to f$ uniformly on compact sets and $(X_n)_{n\in\mathbb{N}}$ i.i.d. $\implies \lim_{n\to\infty} f_n(X_n) - f(X_n) = 0$ with probabilty one?

Let $f_n:\mathbb{R}\to\mathbb{R}$ be a sequence of continuous functions converging uniformly on compact sets to $f:\mathbb{R}\to\mathbb{R}$. Let $(X_n)_{n\in\mathbb{N}}$ be a collection of independent and identical distributed random variables. Suppose these random variables are integrable.

Question: Does $\lim_{n\to\infty} f_n(X_n) - f(X_n) = 0$ with probabilty one?

My thoughts: I know that if $f_n$ converges to $f$ uniformly, then this is true. However, I'm unsure if this also holds when the uniform convergence is on compact sets.

• Convergence with probability one is just point wise convergence almost surely. If $X_n(\omega)$ remains bounded for almost every $\omega$, you obtain $f_n(X_n) - f(X_n)\to 0$ as. Commented Feb 13, 2018 at 0:31
• @user251257 : Just to clarify. Are you saying that if $X_n$ is bounded with probability one, then $f_n(X_n)-f(X_n) \to 0$ a.s.? What if $X_n$ is not bounded with probability one? Commented Feb 13, 2018 at 0:51
• yes, $\sup_n |X_n| < \infty$ a.s. Is sufficient. Commented Feb 13, 2018 at 0:55
• possible duplicate of math.stackexchange.com/questions/2530715/…
– Gono
Commented Feb 13, 2018 at 15:30
• @Gono this is a very different problem. i.i.d sequences do not converge. Commented Feb 14, 2018 at 5:36

False: let $\{X_n\}$ be i.i.d. positive random variables with infinite mean, $f_n(x)=\frac {x^{n}} {n^{n}}, f(x)=0$. Then $f_n \to f$ uniformly on compact sets. Suppose $\frac {X_n^{n}} {n^{n}} \to 0$ with probability 1 (or just in probability). Then $P\{X_n^{n} > n^{n} i.o.\}=0$ [ i.o. stands for 'for infinitely many n']. By independence this implies $\sum P\{X_n^{n} > n^{n}\} <\infty$. [ This is the so-called converse part of Borel -Cantelii Lemma]. Hence $\sum P\{X_1> n\} <\infty$. But this is equivalent to the fact that $EX_1 < \infty$.
• I have edited the question. In my problem, $X_n$ are integrable. My understanding is that if we have infinite mean, then it is not integrable. But thank you anyway, Kavi. Commented Feb 13, 2018 at 14:05
Here is the slight modification required to show that the answer is NO even if expectation is required to be finite. Let $f_n(x)=\frac {x^{n}} {{(\ln n)^{n}}},n\geq 2$. Let $\{X_n\}$ be i.i.d positive random variables such that $P\{X_1 >t\} =\frac 1 {t^{2}}$ for $t \geq1$, $0$ for $t <1$. Then $\sum P\{f_n (X_n) >1\} = \sum P\{X_1 >\ln n\} =\sum \frac 1 {(\ln n)^{2}}=\infty$ whereas $EX_1=1$. By Borel Cantelli Lemma $\sum P\{f_n (X_n) >1\} =\infty$ implies that $f_n (X_n) >1$ for infinitely many n with probability 1 so $f_n (X_n)$ does not converge to 0.
• Thanks. I think you answered the question. Would $f_n(x) = x/(\ln n)$ be simpler? Also, $EX_1 = 2$? Commented Feb 15, 2018 at 14:44
• I have proved the following stronger result: suppose $\{X_n\}$ is i.i.d. and assume that $X_1$ is not a bounded random variable. Then there exist continuous functions $f_n$ converging uniformly to 0 on compact sets such that $P\{f_n(X_n) \to 0\}=0$. Commented Feb 16, 2018 at 9:38
• Oh, yes iwanttolearn, $f_n(x) =\frac x {\ln (n)}$ will do. Commented Feb 16, 2018 at 9:42
Here is a soft argument (no calculations) for why there is a counterexample. Pick any $f$ and any sequence of continuous functions $g_1,g_2,\dots$ converging to $f$ uniformly on compact sets but such that there exists $\epsilon>0$ such that $\forall k\;\|g_k(X_1)-f(X_1)\|_\infty>\epsilon.$ Let $X_n$ be any sequence of i.i.d random variables whose support is $\mathbb R.$ Note that $\forall k\;\mathbb P[|g_k(X_1)-f(X_1)|>\epsilon]>0.$ Define a function $\alpha(n)$ by: $$\alpha(n)=\begin{cases} 1&\text{ if n=1,}\\ \alpha(n-1)&\text{ if n>1 and \sum_{m=1}^{n-1}\mathbb P[|g_{\alpha(m)}(X_1)-f(X_1)|>\epsilon]<\alpha(m),}\\ \alpha(n-1)+1&\text{ otherwise.}\end{cases}$$ This may be a very slowly growing function, but once it reaches a value $A$ it will eventually reach $A+1.$ So the functions $f_n:=g_{\alpha(n)}$ satisfy $\sum_{n=1}^{\infty}\mathbb P[|f_n(X_n)-f(X_n)|>\epsilon]=\infty.$ By the Borel-Cantelli Lemma $P[|f_n(X_n)-f(X_n)|>\epsilon\text{ infinitely often}]=1.$