Let the random variable *X* be in the interval [0, 1/3] if "heads" eventuates on the first coin-toss 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 coin-toss. Then: