How we compute expectation of a singular random variable? 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?
 A: 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
$$
A: It is certainly possible to "work with" such distributions, though sometimes you will need to use different methods than for continuous or discrete distributions.  For example, the mean of the Cantor distribution is clearly $\frac{1}{2}$ by symmetry, and you can find more information (variance, mgf, etc) on its Wikipedia page.
Do they arise in practice?  Yes, though certainly not as often as their continuous and discrete cousins.  As a contrived example, consider the following game.  Flip a fair coin.  If it is heads, you win $\frac{2}{3}$ of a dollar; if it is tails you win nothing.  On the next flip, heads wins you $\frac{2}{9}$ of a dollar and tails wins nothing.  In general, on the $n$th flip, heads wins you $\frac{2}{3^n}$ dollars and tails wins nothing.  Repeat indefinitely.  How much money do you have at the end?  Of course, it's a random variable, so call it $X$.  What is the distribution of $X$?  It's the Cantor distribution.
Written in symbols, if $\{\xi_n\}$ are iid Bernoulli, we have $X = \sum_{n=1}^\infty \frac{2}{3^n} \xi_n$, where the series converges with probability 1 by comparison with the geometric series.
This also makes it easy to compute the variance; since the $\xi_n$ are independent with $\newcommand{\Var}{\operatorname{Var}}\Var(\xi_n) = \frac{1}{4}$, we have
$$\Var(X) = \sum_{n=1}^\infty \Var\left(\frac{2}{3^n} \xi_n\right) = \sum_{n=1}^\infty \left(\frac{2}{3^n}\right) \Var(\xi_n) = \sum_{n=1}^\infty \frac{4}{9^n} \cdot \frac{1}{4} = \sum_{n=1}^\infty \frac{1}{9^n}.$$
Summing the geometric series, we get $\Var(X) = \frac{1}{8}$.
