How can I construct a PDF that has infinite variance?

213 Views Asked by At

I want to construct a PDF that has infinite variance.

So I started with the definition of variance $$ \operatorname{var}(X) = E[X^2] - E[X]^2 $$

I'll constraint the problem to a symmetric distribution about $x = 0$ to (hopefully) make this easier, so $E[X] = 0$. So I just need to worry about making $E[X^2] = \infty$.

$$ E[X^2] = \int_{-\infty}^{+\infty}x^2 f_X(x) dx $$

Is there an easy way to come up with a $f_X(x)$ so that $E[X^2]$ is infinity?

I am aware of distributions like Cauchy that have infinite variance, but here I want to come up with a custom one.

3

There are 3 best solutions below

0
On

Restricted to $[0,\infty)$, you want $f(x)$ to be a function such that $\int_0^\infty f(x)\,dx$ converges but $\int_0^\infty x^2 f(x)\,dx$ diverges. (Really, you want $\int_0^\infty f(x)\,dx = \frac12$, but that can be fixed later by scaling.)

The Cauchy distribution is the go-to here because of the way power law integrals work: $\int_1^\infty x^p \,dx$ converges for $x<-1$ and diverges for $x \ge -1$. Of course, this behavior is flipped around for an integral near $0$, which is why the Cauchy distribution has $\frac1{x^2+1}$ in in it and not just $\frac1{x^2}$.

Another way to get the same effect is to take $f(x)$ proportional to $(|x|+1)^p$ for $p < -1$ (so that the integral of the PDF converges) but $p \ge -3$ (so that the integral of $x^2 f(x)$ diverges).

If you want variety, multiply by any function that grows sufficiently slowly: something involving logarithms, for instance. But remember that you'll need something you can integrate later, in order to scale the function so that $\int_{-\infty}^\infty f(x)\,dx =1$.

0
On

Let us construct one using $\frac 1 {x^3}$. To make this a pdf, $\int_a^\infty\frac 1{x^3}dx=1$ so that $\frac{x^{-2}}{-2}\big|_a^{\infty}=\frac 1{2a^2}=1$, or $a=\frac{1}{\sqrt 2}$. (We cannot pick the negative one because the pdf must be nonnegative.) Thus the pdf is $\frac 1{x^3}$ for $x>\frac 1 {\sqrt 2}$. This has a finite first moment $E(X)=\sqrt 2$, but infinite variance/ second moment: $E(X^2)=\infty$.

0
On

Take any continuous random variable $X$ with density $f_X$ where $f_X(0)>0$. Then, if $Z=1/X$ we have $\mathsf E Z^2=\infty$.