Expected value of $\sin(X)$, where $X$ is a Cantor random variable

1.3k Views Asked by At

Let $X$ be a random variable with Cantor distribution. Find $\mathbb{E} \sin(X)$.

I thought about representing

$$X = \sum \frac{X_i}{3^i}$$

where $X_{i} \in \{0, 2\}$, but I guess it's not easy to compute the sine of a sum of random variables.

Maybe it's better to compute via the definition? Any hints?

3

There are 3 best solutions below

0
On BEST ANSWER

You are most probably asked for an exact formula and, as mentioned in a comment on main, the procedure to find it is indeed standard and based on characteristic functions as follows.

First, by definition, $X=\sum\limits_{n\geqslant1}X_n/3^n$ where $(X_n)$ is i.i.d. uniform on $\{0,2\}$, hence, for every real number $t$, $$E(e^{itX})=\prod\limits_{n\geqslant1}E(e^{itX_n/3^n})=\prod\limits_{n\geqslant1}\frac{1+e^{2it/3^n}}2=\prod\limits_{n\geqslant1}\left(e^{it/3^n}\cos(t/3^n)\right)$$ that is, $$E(e^{itX})=e^{it/2}\prod\limits_{n\geqslant1}\cos(t/3^n)$$ In particular, for $t=1$, $$E(\sin X)=\Im\left( E(e^{iX})\right)=\sin(1/2)\prod\limits_{n\geqslant1}\cos(1/3^n)$$ As regards numerical approximations, keeping only $N$ terms in the product of cosines yields a value overestimating the complete product by about $1/(16\cdot9^N)$, thus one can suggest the approximations $E(\sin X)\approx e_N$ with $$e_N=\left(1-\frac1{16\cdot9^N}\right)\cdot\sin(1/2)\prod\limits_{n=1}^N\cos(1/3^n)$$ One gets $$e_1=0.449890406\qquad e_2=0.449895438$$ $$e_3=0.449895499\qquad e_4=0.449895500$$ and $$E(\sin X)=0.449895500$$

0
On

I would suggest the following (approximating) formula for $E\sin(X)$, if $X$ has the Cantor distribution with parameter $1/3$ (the Cantor distribution described in the Wikipedia has parameter $1/3$. In general its parameter can be any value in $(0,1)$. See the paper DOI 10.1016/0167-7152(92)90039-8):

$$ E\sin(X) \approx {1 \over 2} \prod_{m=1}^\infty \cos \left ( {1 \over 3^m - {2.7934 \over 4} }\right ). $$ This expression yields the result with the 6-digit accuracy: $0.449895$. By altering the value of $2.7934$ you can make the aproximation better and better. It is also forth noticing that this infinite product converges very fast.

Of course, you can calculate $E\sin(X)$ numerically by expanding $\sin(X)$ in the Maclaurin series and then use the expression for the moments $EX^m$ of the Cantor distribution as given by (5) in the paper DOI 10.1016/0167-7152(92)90039-8. Note that in (5) there is a misprint: $^NC_i$ means, in fact, the binomial coefficient $N\choose i$.

update 1: just to make the answer complete $$ E\sin(X)= \sum_{m=0}^\infty {(-1)^m \over (2m+1)!} E(X^{2m+1}), $$ where $EX^n$ are computed recursively by $$ EX^0=1, \ EX^1=0.5, \ EX^n= { \sum_{m=0}^{n-1} {n! \over m!(n-m)!} 2^{n-m} EX^m \over 2 (3^n-1) }, \ n \ge 2. $$

update 2: due to the answer of @Did, the constant in the approximation is equal to $a=0.698345328367$ i.e. $$ E\sin(X) \approx {1 \over 2} \prod_{m=1}^\infty \cos \left ( {1 \over 3^m - a }\right ). $$

3
On

If your Cantor random variable $X$ had a PDF (probability distribution function) $f_X$ we would compute the integral $$E\bigl(\sin(X)\bigr)=\int_0^1\sin x \>f_X(x)\>dx\ .\tag{1}$$ Now $X$ does not have such a PDF, but a continuous CDF (cumulative distribution function) $F_X$, which is the so-called Cantor function $F_{\rm Cantor}:[0,1]\to[0,1]$, implemented in Mathematica as ${\tt CantorStaircase[x]}$. In order to introduce this function into $(1)$ we use partial integration and obtain $$\eqalign{E\bigl(\sin(X)\bigr)&=\int_0^1\sin x\>dF_X(x)=\bigl(\sin x\>F_X(x)\bigr)\biggr|_{x=0}^{x=1}-\int_0^1\cos x\> F_X(x)\>dx\cr &=\sin 1-\int_0^1\cos x\>F_{\rm Cantor}(x)\>dx\ .\cr}$$ Doing the last integral numerically Mathematica obtained $$E\bigl(\sin(X)\bigr)\doteq0.449158\ .$$