# Random variable $X$ with $E[X]\in\mathbb{R}, E[X^{2}] \not\in \mathbb{R}$

Does anyone know a example of a random variable $$X:\Omega \to \mathbb{R}$$ which $$E[X] \in \mathbb{R}$$ but $$E[X^{2}] \not\in \mathbb{R}\:?$$

• Take $P(X=n)=\frac{1}{\zeta(3)n^3}$ for each $n \geq 1$. – Mindlack Dec 30 '20 at 18:41
• Does this answer your question: math.stackexchange.com/questions/236181/…? – Physical Mathematics Dec 30 '20 at 18:44
• $c/(1+|x|^3)$ where $c$ is a normalizing factor. – Chrystomath Dec 30 '20 at 18:44
• $X(\omega) = {1 \over \sqrt{\omega}}$ on $(0,\infty)$. – copper.hat Dec 30 '20 at 19:10
• Sorry, that should be $(0,1)$ with uniform distribution. – copper.hat Dec 30 '20 at 19:17