= Solution
For a <probability density function> $f$, the finite <expected value> is
$$
\boxed{\mathbb E[X]=\int_{-\infty}^{\infty}x f(x)\,\mathrm dx,\qquad\int_{-\infty}^{\infty}|x|f(x)\,\mathrm dx<\infty.}
$$
The <absolute integrability> condition makes the signed integral unambiguous. One can also allow an extended <expectation> when exactly one of the positive and negative parts has infinite integral, obtaining $+\infty$ or $-\infty$. If both parts have infinite integral, the <expectation> is undefined; subtracting two infinities is not a definition.
Back to article page