The Cantor distribution is the probability distribution whose cumulative distribution function is the Cantor function. This distribution is not absolutely continuous with respect to Lebesgue measure, so it has no probability density function; neither is it discrete, since it has no pointmasses; nor is it even a mixture of a discrete probability distribution with one that has a density function. It may be characterized by an infinite sequence of cointosses in the following way: Let the random variable X be in the interval [0, 1/3] if "heads" eventuates on the first cointoss and in the interval [2/3, 1] if "tails. Let X be in the lowest third of the aforementioned interval if "heads" on the next toss and in the highest third if "tails". Let X be in the lowest third of the aforementioned interval if "heads" on the next toss and in the highest third if "tails". Let X be in the lowest third of the aforementioned interval if "heads" on the next toss and in the highest third if "tails". et cetera, ad infinitum! Then the probability distribution of X is the Cantor distribution. It is easy to see by symmetry that the expected value of X is E(X) = 1/2. The law of total variance can be used to find the variance var(X), as follows. Let Y = 1 or 0 according as "heads" or "tails" appears on the first cointoss. Then: 
From this we get:
