TITLE: How we compute expectation of a singular random variable?
QUESTION [6 upvotes]: In probability (or measure) courses, we often see the Cantor distribution that is singular with respect to the Lebesgue measure. Its CDF is increasing but whenever its differentiable, the corresponding PDF is zero. But afterwards, we never use singular distributions. Sorry for my naive question but is it possible to work with them? Compute expectations? Variance? etc... Any book references?

REPLY [6 votes]: In the case of any probability distribution of a non-negative random variable, including the Cantor distribution, we can compute
$$
F(x)=\mathrm{P}(X\gt x)
$$
Then we can compute the expected value using
$$
\mathrm{E}(X)=\int_0^\infty F(x)\,\mathrm{d}x
$$
and the variance using
$$
\mathrm{Var}(X)=\int_0^\infty2xF(x)\,\mathrm{d}x-\left(\int_0^\infty F(x)\,\mathrm{d}x\right)^2
$$