# Is the following true: A distribution does not have a well defined mean iff its mean comes out as $\pm\infty?$

I often heard that some probability distributions do not have a mean. However, the mean is just the expectation value of the distribution's random variable:

$$\mu = \left\langle xf_{\theta}(x) \right\rangle$$.

Here, $$\theta$$ is the distribution's parameter, and $$x$$ is the random variable.

For any probability density function this is an integral which I can compute. So saying that an integral like the above expression is not well defined is basically equivalent to saying that it diverges.

Is this correct, or are there other ways in which a distribution can not have a well-defined mean?

The Cauchy distribution has an undefined mean, but not because if you tried to compute it, it would come out as $$\pm\infty$$. The necessary integral, $$\displaystyle\int_{-\infty}^{\infty}x f(x)\,dx,$$ to compute is an improper one of the "form" $$\infty-\infty$$, and gets different values depending on how you approach the mode. The Cauchy Principal Value of the mean integral for the standard Cauchy distribution is zero, and if you were to look at a plot of the Cauchy distribution, you would never say that the mean is $$\pm\infty$$.

In summary, there are multiple ways an integral can be ill-defined; going to $$\pm\infty$$ is one way. Having different values depending on how you approach $$0$$, in this case, is another.

There are cases with $$\int_{-\infty}^0 xf_X(x)dx=-\infty$$ and $$\int_0^{\infty}xf_X(x)dx=+\infty$$.

(Where $$f_X$$ denotes the PDF of a random variable $$X$$)

This excludes the existence of a suitable definition of $$\int_{-\infty}^{\infty}xf_X(x)dx$$.

In cases like this you cannot speak of an integral that you "can compute".

Then random variable $$X$$ has no (properly defined) mean.