Let $(\Omega,\Sigma,\mathbb{P})$ be a probability space and $\{U_n\}_{n\in\mathbb{N}}$ a collection of random variables such that $U_n\sim \text{Unif}(0,n)$ (uniform distribution) for all $n\in\mathbb{N}$. Prove that if $g:\mathbb{R}\to \mathbb{R}$ is a Borel measurable function satisfying $\lim_{x\to \infty}|g(x)|=0$, then $g(U_n)$ converges in probability to $0$.
This is an exercise that can be found in the page 47 of this PDF.
I know that $\mathbb{P}(|g(U_n)|>\varepsilon )=n^{-1}\int _\mathbb{R} \mathbf{1}_{\{|g|>\varepsilon \}}(x)\mathbf{1}_{[0,n]}(x)dx$ for any $\varepsilon >0$ and $n\in\mathbb{N}$, however I don't know how to continue.
Thank you for your attention!
Since $\vert g(x) \vert \to 0$ as $x \to \infty,$ then (with the eventual exception of a null set that does not matter when integration is concerned), there exists $n_\varepsilon \in \mathbb{N}$ such that $\vert g(x) \vert < \varepsilon$ whenever $x \geq n_\varepsilon.$ Then $$\mathbb{P}(|g(U_n)|>\varepsilon )=n^{-1}\int_\mathbb{R} \chi_{\{|g|>\varepsilon \}}(x)\chi_{[0,n]}(x)dx \leq \\ n^{-1} \int\chi_{[0, n_\varepsilon] \cap [0, n]}(x) dx \leq \frac{n_{\varepsilon}}{n}$$ for large enough $n \in \mathbb{N}.$ As $\varepsilon$ is fixed, the latter quantity converges to $0$ as $n \to \infty,$ so $g(U_n)$ converges in probability to $0.$ I hope this helps. :)