How to fix a proof of $g\left( X_{n} \right) \rightarrow g\left(X\right)$ in probability? If $g$ is a continuous function and $X_{n}\rightarrow X$ in probability, where $X_{n}$ is a sequence of random variable, then $g\left( X_{n} \right) \rightarrow g\left(X\right)$ in probability.
For a special case $X=c$ for a constant $c$, I know how to prove it.
Since $f$ is continuous at $c$, given any $\epsilon>0$, there exists $\delta>0$ s.t. $|f(X_n)-f(c)|\le \epsilon$ whenever $|X_n-c|\le \delta$. Thus,
$$P(|X_n-c|\le \delta)\le P(|f(X_n)-f(c)|\le \epsilon)
$$
which implies
$$P(|f(X_n)-f(c)|\ge \epsilon)\le P(|X_n-c|\le \delta)\to 0.
$$
But how about a general case $X$? Can we fix this proof?
 A: Hint
Let $\varepsilon >0$.

*

*Take $N>0$ s.t. $\mathbb P\{|X|>N\}<\frac{\varepsilon }{3}$.


*Take $M\in\mathbb N$ s.t. $$\mathbb P\{|X_n-X|>N\}<\frac{\varepsilon }{3},$$
for all $n\geq M$. Now, $$\mathbb P\{|X_n|>2N\}\leq \mathbb P\{|X_n-X|>N\}+\mathbb P\{|X|>N\}<\frac{2\varepsilon }{3} ,$$
for all $n\geq M$.

*

*Since $g$ is continuous on $[-2N,2N]$, it's also uniformly continuous on $[-2N,2N]$.

Edit

To complete the proof : Let $\eta>0$. Since $g$ is uniformly continuous on $[-2N,2N]$, there is $\delta >0$ s.t. $$|g(x)-g(y)|>\eta\implies |x-y|>\delta.$$
Finally, if $n\geq M$
\begin{align*}
\mathbb P\{|g(X_n)-g(X)|>\eta\}&\leq \mathbb P\{|X|>N\}+\mathbb P\{|X_n|>2N\} +\mathbb P\{|g(X_n)-g(X)|>\eta,|X|\leq N,|X_n|\leq 2N\}\\
&\leq \varepsilon +\mathbb P\{|X_n-X|>\delta \}\underset{n\to \infty }{\longrightarrow }0,
\end{align*}
and thus, for all $\varepsilon >0$,
$$\limsup_{n\to \infty }\mathbb P\{|g(X_n)-g(X)|>\eta\}\leq \varepsilon.$$
Therefore, for all $\eta>0$,
$$\lim_{n\to \infty }\mathbb P\{|g(X_n)-g(X)|>\eta\}=0,$$
anf thus, $g(X_n)\underset{n\to \infty }{\longrightarrow }g(X)$ in probability.
