Expectation of a random variable with positive density at infinity? Let $X$ be a continuous random variable with pdf $f(x)$. Assume that

*

*$f(x) \geq 0$, for all $x > 0$, so $X$ is a positive random variable,

*$f(\infty) > 0$, i.e. $X$ has a strictly positive density of probability at infinity,

*$\mathbb{E}[X | X < \infty] = k < \infty$.

Then $\mathbb{E}[X]$ is finite or infinite ?
Is it wrong to calculate
\begin{equation}
\begin{aligned}
\mathbb{E}[X] 
&= \mathbb{E}[X | X < \infty ] P(X < \infty) + \mathbb{E}[X |X = \infty] P(X = \infty) \\
&= \lim_{dx \rightarrow 0} k (1-f(\infty) dx) + \infty f(\infty) dx \\
&= \infty
\end{aligned}
\end{equation}
?

This is a case where you are dealing with a non-negative random variable on the extended real numbers.$^\dagger$  In this case the expected value is:
$$\mathbb{E}(X) = \int \limits_0^\infty x f(x) dx + \infty \cdot f(\infty),$$
with the convention that $\infty \cdot 0 = 0$ in the last term.  This can be written without use of any convention for indeterminate forms as:
$$\mathbb{E}(X) = 
\begin{cases}
\int \limits_0^\infty x f(x) dx & & & \text{if } f(\infty) = 0, \\[6pt]
\infty & & & \text{if } f(\infty) > 0. \\[6pt]
\end{cases}$$
As you can see, given your conditions, the expected value of the random variable is infinite.  Your attempted demonstration of this is wrong, in part owing to your incorrect use of differential terms without an integral.

$^\dagger$ The density would typically be taken with respect to the dominating measure composed of Lebesgue measure on the reals, plus counting measure on $\pm \infty$.  We will assume this form of density throughout the analysis.
