If a random variable $X$ has a density $f$, then the expected value can be simplified: $\mathbb{E}[X]=a+∫_{a}^{b}(1-F(x))dx,$
where $F$ is the cumulative distribution function, $F(x)=\Pr(X≤x)$.
My question is: Does this simplification should work for all probability distributions, even for those that are not absolutely continuous with respect to Lebesgue-measure on $[a,b]$?
If $X$ is any real-valued random variable with support $[a,b]$ and $F(x)=\Pr(x≤X)$, is it always true that $ \mathbb{E}[X]=a+∫_{a}^{b}(1-F(x))dx$
The answer to this question would be simple if one could generally extend integration-by-parts to Lebesgue-Stieltjes integration. However, this is not possible; see Wikipedia.