# Existence of $E(X^2)$ when $X$ has the pdf $f(x)= \frac{1}{(2+x^2)^{3/2}}$

In a competitive exam, I came across an objective question which says

Let $$X$$ be a continuous random variable with the probability density function $$f(x)= \frac{1}{(2+x^2)^{3/2}}\quad,\,-\infty

Find $$E(X^2)$$. And the options were

(a) $$\quad0 \qquad$$ (b) $$\quad1 \qquad$$ (c) $$\quad2 \qquad$$ (d) $$\quad \text{ does not exist }$$

My question is should I directly find out the $$E(X^2)$$ or should I first check whether it exists or not? Please suggest me something which takes less time as I am preparing for a competitive exam. If you suggest me to do the former please help me with the integration too. I wasn't able to solve it. It took me a lot of time.

My attempt: I first checked whether the $$E(X)$$ exists or not, for that I evaluated $$E(|X|)$$ and found out that it doesn't exist, so $$E(X)$$ doesn't exist and hence $$E(X^2)$$ doesn't exist. Is it the correct way?

• your first paragraph seems to end mid-sentence.. Can you show your working where you decide that $E(|X|)$ doesn't converge? Jan 12, 2019 at 5:56
• Yes I can. But I am very new to this platform. I don't how to write all that. Jan 12, 2019 at 9:09
• Experienced mathematicians just glance at this problem and know the answer. Here's why: it asks you to integrate $x^2f(x)dx$ over the Reals. Because the denominator clearly never is zero, the finiteness of this integral depends on what happens as $x^2$ grows large. In that case $2$ can be neglected, showing the integrand is approximately $x^2/(x^2)^{3/2}=1/|x|.$ The integral of that expression defines the logarithm and everyone knows logarithms grow infinitely large. Thus none of the four answers is correct: $E(X^2)$ does exist but is infinite.
– whuber
Jan 12, 2019 at 19:39
• Thank you. 4th option was correct according to the answer key. Jan 13, 2019 at 17:04
• The answer key very well could reflect a misconception on the part of the person who constructed it. That's usually the case when no correct answer is offered to a multiple choice question.
– whuber
Jan 13, 2019 at 19:21

From the stated form of the density, $$X$$ has a Student's T distribution with two degrees-of-freedom. We will show here that the second raw moment of this distribution does not to exist (i.e., it is infinite). (You can find an answer to a more general question answered here that shows the derivation of all the raw moments of the T-distribution, but we will not need to go into this level of complexity here.)

When you are trying to prove that an integral is infinite, it is often easiest to do this by making liberal use of inequalities --- e.g., show that the integral of interest is larger than another integral, that is larger than another integral, that is infinite. That is the method we will use here. Let $$y = x^2$$ so that $$dy = 2x \ dx$$ and then use a change of variable to get:

\begin{aligned} \mathbb{E}(X^2) &= \int \limits_{-\infty}^\infty \frac{x^2}{(2+x^2)^{3/2}} \ dx \\[6pt] &= 2 \int \limits_0^\infty \frac{x^2}{(2+x^2)^{3/2}} \ dx \\[6pt] &= \int \limits_0^\infty \frac{x}{(2+x^2)^{3/2}} \cdot 2x \ dx \\[6pt] &= \int \limits_0^\infty \frac{\sqrt{y}}{(2+y)^{3/2}} \ dy \\[6pt] &= \int \limits_0^\infty \sqrt{\frac{y}{2+y}} \cdot \frac{1}{2+y} \ dy. \\[6pt] \end{aligned}

Now, choose any value $$0 < y_0 < \infty$$ and you have:

\begin{aligned} \mathbb{E}(X^2) &= \int \limits_0^\infty \sqrt{\frac{y}{2+y}} \cdot \frac{1}{2+y} \ dy \\[6pt] &> \int \limits_{y_0}^\infty \sqrt{\frac{y}{2+y}} \cdot \frac{1}{2+y} \ dy \\[6pt] &> \sqrt{\frac{y_0}{2+y_0}} \int \limits_{y_0}^\infty \frac{1}{2+y} \ dy \\[6pt] &= \sqrt{\frac{y_0}{2+y_0}} \Big[ \ln (2+y) \Big]_{y_0}^\infty \\[6pt] &= \sqrt{\frac{y_0}{2+y_0}} \times \infty = \infty. \\[6pt] \end{aligned}

• But now that since I know it follows t-distribution with 2 degrees of freedom, and V(X) doesn't exist for 2 degrees of freedom and E(X) is zero. Can't I imply from here only that the E(X^2) doesn't exist? Jan 12, 2019 at 9:27
• It depends what the questioner is expecting in terms of demonstration of the result. You can certainly appeal to known results concerning the T-distribution, but remember that someone first had to derive the moments of a T-distribution by some method. If you're just appealing to known results then you can just choose the right answer and say nothing more, but if the questioner is expecting a demonstration of the result, then this is one way to give it.
– Ben
Jan 12, 2019 at 9:32
• It was an objective question. I just had to mark the correct answer. Working doesn't matter. Jan 12, 2019 at 9:34
• Fair enough - I hope this working is still useful in showing a simple method of demonstration of the result.
– Ben
Jan 12, 2019 at 9:35
• @Stubborn Using Riemann integration (for simplicity), the justification for the second step is that although the original integral is implicitly a double limit (as each endpoint diverges), that double limit is indeed a sum of limits, and the change of variable $x \to -x$ shows that both limits are identical. Thus, whether they converge, diverge to $\pm\infty,$ or fail to converge at all, it's okay just to put that factor of $2$ in front of one of them rather than doing all the work twice!
– whuber
Feb 26, 2019 at 17:55

Here's one thing you can do that's quick if you recognize this. The t distribution has pdf $$f(x; \nu) = \frac{\Gamma\left(\frac{\nu + 1}2\right)}{\sqrt{\nu\pi}\Gamma\left(\frac \nu 2\right)} \left[1 + \frac 1\nu x^2\right]^{-\frac{\nu + 1}{2}}$$ which suggests trying $$\nu =2$$. Plugging this in, this reduces to $$\frac{\Gamma(3/2)}{\sqrt{2\pi}\Gamma(1)} \left[1 + 2^{-1}x^2\right]^{-3/2}\\ = \frac{2^{-1}\sqrt\pi}{2^{1/2}\sqrt \pi}2^{3/2}(2 + x^2)^{-3/2} \\ = (2 + x^2)^{-3/2}$$ which is exactly your pdf, so you've just got a t distribution with two degrees of freedom. This immediately tells me that $$E(X^2)$$ is infinite. But the mean does exist here and is $$0$$, which can be immediately known if you know a t distribution with two d.f. has a mean, or obtained directly via $$\text E(X) = \int_{0}^\infty \frac{x}{(2 + x^2)^{3/2}}\,\text dx + \int_{-\infty}^0\frac{x}{(2 + x^2)^{3/2}}\,\text dx \\ = \frac 12 \left(\int_2^\infty u^{-3/2}\,\text du - \int_2^\infty u^{-3/2}\,\text du\right) = 0$$ because both integrals converge (if this was a Cauchy RV it'd be the indeterminate form $$\infty - \infty$$ which isn't equal to zero).

• Thank you for the answer. But I have never read multivariate t-distribution. It's not in my syllabus. I have read the t-distribution though Jan 12, 2019 at 9:06
• @user233797 the multivariate t actually wasn't needed here, i just rewrote the answer to only use the univariate one
– jld
Jan 12, 2019 at 14:19