# Almost sure convergence of a sequence of random variables

Once again I've encountered a problem, which might not be difficult:

I'm given a sequence of random variables $(X_n)$, each with density function $g_n(x) = nx^{n-1} \textbf{1}_{(0,1]}$.

I am to prove that this sequence converges almost surely. So to begin with, I think I am able to find the limit and prove convergence by probability.

We have:

$\mathbb{E} X_n = \int\limits_{0}^1 nx^n dx = \frac{n}{n+1}$

Applying Chebyshev inequality:

$\lim\limits_{n \rightarrow \infty}\mathbb{P}(1-X_n < \epsilon) = \lim\limits_{n \rightarrow \infty} (1 - \mathbb{P}(1- X_n \geq \epsilon)) \geq \lim\limits_{n \rightarrow \infty}(1- \frac{\mathbb{E}(1-X_n)}{\epsilon}) = \lim\limits_{n \rightarrow \infty} (1- \frac{1}{\epsilon}(1-\frac{n}{n+1})) = 1$

Thus, $X_n \rightarrow 1$ by probability.

And there goes my question: how do I prove almost sure convergence? I've been trying to use the definition, but it doesn't seem to help.

$Pr(|X_n - 1| \geq \epsilon \mbox{ infintely often}) = \sum_n \int _{0}^{1 - \epsilon} nx^{n-1} dx = \sum _n (1 - \epsilon)^n < \infty$ for any $\epsilon > 0$.
Hence, by Borel Cantelli Lemma it converges to $1$ almost surely.
Notice that for each integer $n$ and each $a_n>0$, $\mu\{1-X_n\gt a_n\}=(1-a_n)^n$.
Then choose $a_n$ such that $\sum_n (1-a_n)^n<\infty$ and $a_n\to 0$ and conclude by the Borel-Cantelli lemma.
given $\varepsilon \in (0,1)$. Note that $P(|X_{n} -1|\geq \varepsilon) = (1-\varepsilon)^n$. $\sum_{n=1}^{\infty}(1-\varepsilon)^n < \infty$ thus $P(|X_{n} -1| \geq \varepsilon \ i.o.)=0$ by the Borel-Cantelli lemma. That is $P(|X_{n} -1| < \varepsilon \ evt.) = 1$. Hence $X_{n} \to 1$ almost surely.