Var$[X]$ exists if and only if $X\in L^2$

72 Views Asked by At

In Baldi's textbook Probability, he writes that a random variable $X$'s variance exists if and only if $X\in L^2(\mu)$.

I went searching through the text and cannot find where he defines what it means for a variable (rather than a function) to be in $L^2(\mu)$. Perhaps I am just missing it, or perhaps we are supposed to assume that this means its probability density is in $L^2(\mu)$.

But if we assume that this means its density is in $L^2(\mu)$, then let $f$ be the density of $X$. Then the variance is

$$ \text{Var}[X]=\int_{\Bbb R} (x-\mu)^2f(x) \ d\mu(x) $$

I suppose it's clear enough to me that it is possible for a function $f$ to be integrable but not $x^2f(x)$. For instance $f(x)=1/x^2$ on $[1,\infty)$ and zero elsewhere.

But if I play the same trick with expectation, I could say that $xf(x)$ is not integrable even though $f$ is, so therefore $f\in L^1(\mu)$ does not guarantee that the expectation exists.

So my question is whether all of the above is correct: $X\in L^2(\mu)$ means its PDF is in $L^2(\mu)$, and this occurs if and only if the variance exists, but the same pattern is not true for expectation?

I found the following discussion and it echoes some of these ideas but doesn't quite answer these questions: Why variance is only defined for square integrable random variables?