TITLE: Integrating $f(x)=x$ for $x \in C$, the Cantor set, with respect to a certain measure
QUESTION [5 upvotes]: From general measure theory, I think it's possible to create a measure space $(C, \mathcal{M_\phi}, m_\phi)$ where $C$ is the middle third Cantor set. Now the measure $m_\phi$ is defined as $m(\phi^{-1}(E))$ for which $\phi$ is the bijection from infinite binary sequences (on the closed unit interval?) to $C$, $m$ is the usual Lebesgue measure, and $E \subseteq C$. Also, $\mathcal{M_\phi}$ is a $\sigma$-algebra as follows: $\{E \subset C: \phi^{-1}(E) \in \mathcal{M}\}$ where $\mathcal{M}$ is the $\sigma$-algebra of Lebesgue measurable sets. 
My question is how would you compute an integral in the following form: $\int_C x\;dm_\phi$? I already know that $m_\phi(C)=1$, but how could I go about computing the integral? Would approximation by simple functions work, and if so, what kind of functions should I work with? How would this generalize for $\int_C x^n\;dm_\phi$? Any input would be highly appreciated!

REPLY [6 votes]: Definitely the probabilistic way! To wit:
The measure $m_\phi$ is the distribution of the random variable $X=\sum\limits_{n=1}^{+\infty}3^{-n}\xi_n$ where $(\xi_n)$ is i.i.d. and $\xi_n=0$ or $2$ with equal probability. Thus the fact that $E(\xi_n)=1$ implies that 
$$
\int x\text{d}m_\phi(x)=\sum\limits_{n=1}^{+\infty}3^{-n}E(\xi_n)=\sum\limits_{n=1}^{+\infty}3^{-n}=\frac12.
$$
The same formula without infinite series: a defining property of the distribution of $X$ is the relation
$$
3X=\xi+X',
$$
where $\xi=0$ or $2$ with equal probability, $X'$ is distributed like $X$, and $\xi$ and $X'$ are independent. In particular, $3E(X)=E(\xi)+E(X)$ and you are done.
Higher moments can be approached similarly. For every $n\ge1$,
$$
3^nE(X^n)=E((\xi+X')^n)=\sum\limits_{k=0}^n{n\choose k}E(\xi^k)E(X^{n-k}).
$$
Furthermore, $E(\xi^k)=2^{k-1}$ hence
$$
(3^n-1)E(X^n)=\sum\limits_{k=1}^{n}{n\choose k}2^{k-1}E(X^{n-k}),
$$
which yields the moments of $X$ recursively. 
Or, one can center everything at the onset, using
$$
3\bar X=\bar \xi+\bar X',
$$
with $\bar X=X-E(X)=X-\frac12$ and $\bar\xi=\xi-E(\xi)=\xi-1$. Some computations become quite simple because $\bar\xi$ is symmetric hence $\bar X$ is symmetric as well and all its odd moments are zero. Furthermore, $\bar\xi=\pm1$ almost surely hence $E(\bar\xi^{2k})=1$ and $E(\bar\xi^{2k+1})=0$. For example, the recursion for the moments of $X$ yields as a recursion for the moments of $\bar X$ the equations
$$
(3^n-1)E(\bar X^n)=\sum\limits_{k\ge1}{n\choose 2k}E(\bar X^{n-2k})\,[2k\le n].
$$
For the first even values of $n$, one gets that  $(3^2-1)E(\bar X^2)=1$, $(3^4-1)E(\bar X^4)=6E(\bar X^2)+1$ and $(3^6-1)E(\bar X^6)=15E(\bar X^4)+15E(\bar X^2)+1$, hence 
$$
E(\bar X^2)=1/8,\quad
E(\bar X^4)=7/320,\quad
E(\bar X^6)=205/46592.
$$

REPLY [3 votes]: And finally, I find a published paper on this very question:
http://www.sciencedirect.com/science/article/pii/0167715292900398