It is well known that given a real-valued random variable $X$ with pdf $f$, the mean of $X$ (if it exists) is found by \begin{equation} \mathbb{E}[X]=\int_{\mathbb{R}}x\,f(x)\,\mathrm{d}x\,. \end{equation}

General question: Now, if one cannot solve the above integral in closed form but wants to simply determine if the mean exists and is finite, is there a way to prove that? Is there (perhaps) some test I can apply to the integrand to determine if certain criteria are met for the mean to exist?

Application specific question: I have the following pdf for which I want to determine if the mean exists: \begin{equation} f(x)=\frac{|\sigma_{2}^{2}\mu_{1}x+\mu_{2}\sigma_{1}^{2}|}{\sigma_{1}^{3}\sigma_{2}^{3}a^{3}(x)}\,\phi\left(\frac{\mu_{2}x-\mu_{1}}{\sigma_{1}\sigma_{2}a(x)}\right)\qquad \text{for}\ x\in\mathbb{R}\,, \end{equation}

where $\mu_{1},\mu_{2}\in\mathbb{R}$, $\sigma_{1},\sigma_{2}>0$, $a(x)=\left(\frac{x^{2}}{\sigma_{1}^{2}}+\frac{1}{\sigma_{2}^{2}}\right)^{1/2}$, and $\phi(g(x))=\frac{1}{\sqrt{2\pi}}\,e^{-g^{2}(x)/2}$.

I have tried to solve for the mean to no avail.

  • 1
    $\begingroup$ in your specific question $f(x)$ is not a proper density function. suppose $\mu_1 =1$, $\mu_2=0$ and $\sigma_j = 1$, $j=1,2$, then $f(x)<0$ for $x<0$. $\endgroup$
    – EliKa
    Jul 7, 2017 at 12:46
  • $\begingroup$ @EliKa Good find. There may be a typo. I will check and correct the question. That said, I am still mostly interested in the "how" part of the question, i.e. how would I got about determining if the mean exists and is finite? $\endgroup$ Jul 7, 2017 at 13:11
  • 2
    $\begingroup$ You could try bounding $\lvert x f(x) \rvert$ above and below by some nonnegative functions $u(x)$ and $b(x)$ such that you can integrate them. If you can integrate $u(x)$, then your distribution has a mean. If $\int b(x)dx = \infty$, then your distribution has no mean. $\endgroup$
    – Ceph
    Jul 7, 2017 at 13:33
  • $\begingroup$ @Ceph That's a good suggestion. Is that technique based on the "squeeze theorem"? $\endgroup$ Jul 7, 2017 at 13:36
  • 1
    $\begingroup$ @AaronHendrickson Similar idea, but (as I understand it) the squeeze theorem is a little different. Using the ST here might look like this: you find $u(x)$ and $b(x)$ that bound $xf(x)$ (rather than bounding $\lvert x f(x) \rvert$ as in my earlier comment) such that you can find $\int u(x) dx = \int b(x) dx= \mu$, where $\mu $ is the mean of your distribution. But that is probably not a plausible strategy, since you would be hard pressed to find such $u$ and $b$. (They could differ from $xf(x)$ only on a set of measure 0 and so would probably not be any easier to integrate than $xf(x)$ is.) $\endgroup$
    – Ceph
    Jul 7, 2017 at 13:42

1 Answer 1


There is no general technique, but there are some simple principles. One is to study the tail behavior of $f$ by comparing it to tractable functions.

By definition, the expectation is the double limit (as $y$ and $z$ vary independently)

$$E_{y,z}[f] = \lim_{y\to-\infty,z\to\infty}\int_y^z x f(x) dx = \lim_{y\to-\infty}\int_y^0 x f(x) dx+ \lim_{z\to\infty}\int_0^z x f(x) dx.$$

The treatment of the two integrals at the right is the same, so let's focus on the positive one. One behavior of $f$ that assures a limiting value is to compare it to the power $x^{-p}$. Suppose $p$ is a number for which $$\liminf_{x\to\infty} x^p f(x)\gt 0.$$ This means there exists an $\epsilon\gt 0$ and an $N\gt 1$ for which $x^p f(x) \ge \epsilon$ whenever $x\in[N,\infty)$. We may exploit this inequality by breaking the integration into the regions where $x\lt N$ and $x \ge N$ and applying it in the second region:

$$\eqalign{ \int_0^z x f(x) dx &=\int_0^{N} x f(x) dx + \int_{N}^z x f(x) dx \\ &=\int_0^{N} x f(x) dx + \int_{N}^z x^{1-p} \left(x^p f(x)\right) dx \\ &\ge \int_0^{N} x f(x) dx + \int_{N}^z x^{1-p} \left(\epsilon\right) dx \\ &= \int_0^{N} x f(x) dx + \frac{\epsilon}{2-p}\left(z^{2-p} - {N}^{2-p}\right). }$$

Provided $p\lt 2$, the right hand side diverges as $z\to\infty$. When $p=2$ the integral evaluates to the logarithm,

$$\int_{N}^z x^{1-2} \left(\epsilon\right) dx = \epsilon \left(\log(z) - \log(N)\right),$$

which also diverges.

Comparable analysis shows that if $|x|^pf(x)\to 0$ for $p\gt 2$, then $E[X]$ exists. Similarly we may test whether any moment of $X$ exists: for $\alpha\gt 0$, the expectation of $|X|^\alpha$ exists when $|x|^{p+\alpha}f(x)\to 0$ for some $p\gt 1$ and does not exist when $\liminf |x|^{p+\alpha}f(x)\gt 0$ for some $p \le 1$. This addresses the "general question."

Let's apply this insight to the question. By inspection it is clear that $a(x)\approx |x|/\sigma_1$ for large $|x|$. In evaluating $f$, we may therefore drop any additive terms that will eventually be swamped by $|x|$. Thus, up to a nonzero constant, for $x\gt 0$

$$f(x) \approx \frac{\mu_1 x}{\sigma_2 x^3}\phi\left(\frac{\mu_2 x}{\sigma_2 x}\right) = x^{-2}\frac{\mu_1}{\sigma_2}\exp\left(\left(-\frac{\mu_2}{2\sigma_2}\right)^2\right).$$

Thus $x^2 f(x)$ approaches a nonzero constant. By the preceding result, the expectation diverges.

Since $2$ is the smallest value of $p$ that works in this argument--$|x|^pf(x)$ will go to zero as $|x|\to\infty$ for any $p\lt 2$--it is clear (and a more detailed analysis of $f$ will confirm) that the rate of divergence is logarithmic. That is, for large $|y|$ and $|z|$, $E_{y,z}[f]$ can be closely approximated by a linear combination of $\log(|y|)$ and $\log(|z|)$.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.