Example of a general random variable with finite mean but infinite variance Given a probability triple $(\Omega, \mathcal{F}, \mu)$ of Lebesgue measure $[0,1]$, find a random variable $X : \Omega \to \mathbb{R}$ such that the expected value $E(X)$ converges to a finite, positive value, but $E(X^2)$ diverges.

One answer is Pareto distribution with parameters $\alpha , x_0$ which are both positive. The distribution is given by:
$$f_X(x)= \begin{cases} \alpha\,\frac{x_0^\alpha}{x^{\alpha+1}} & x \ge x_0, \\ 0 & x < x_0. \end{cases}$$
Note that $E[X] = \infty$ for $\alpha \leq 1$ and is finite elsewhere.
The variance is not finite for $\alpha \in [1,2) $ 
Hence it satisfies your question for $(1,2)$
In general,$E[X^n]= \infty \ \ ;n\geq \alpha$.
EDIT: Clarified the answer as suggested.
