Expected value of a binary decimal generated by coin flips

expected valueprobabilityprobability theory

A coin is flipped infinitely many times. Heads is $1$, tails is $0$. The string created by the heads and tails is turned into its respective string of ones and zeros.

If I write $1.$ before the binary string it creates a decimal in base 2.
I've been trying to figure out the expected value of the aforementioned decimal in base 10. So far, I have that the number generated, $N$, can be represented by $$N=1+\sum_{n=1}^{\infty}\left(\frac{X(\omega)}{2^n}\right)$$ where $X(\omega)$ is a random variable such that $$X(\omega)=
\begin{cases}
1, \text{if $\omega = heads$} \\
0, \text{if $\omega = tails$} \\
\end{cases}$$

but I have no idea where to go from here. Am I going down the wrong path, or is this line of reasoning correct? How can I find the expected value that N will be?

Best Answer

  1. By linearity of expectation, we know that $\mathbb E[X + Y] = \mathbb E [X] + \mathbb E[Y]$.
  2. We know that $\mathbb E [c] = c$ where c is a constant.
  3. By linearity of expectation, we know that $\mathbb E[\alpha X] = \alpha \mathbb E[X]$ where $\alpha$ is a constant and $X$ is a random variable.

Using these, we can compute the expectation of your sum as:

\begin{align*} &\mathbb E[N] = \\ &\mathbb E\left[1 + \sum_{n=1}^\infty X(\omega)/2^n\right] = \\ &\mathbb E\left[1 \right] + \sum_{n=1}^\infty \mathbb E \left[ X(\omega)/2^n\right] =\\ &1 + \sum_{n=1}^\infty \frac{1}{2^n} \ \mathbb E \left[ X(\omega) \right] =\\ &1 + \sum_{n=1}^\infty \frac{1}{2^n} \cdot \frac{1}{2} = \\ &1 + \frac{1}{2}\sum_{n=1}^\infty \frac{1}{2^n} = \\ &1 + \frac{1}{2} \left(\frac{\frac{1}{2}}{1 - \frac{1}{2}} \right) = \\ &1 + \frac{1}{2} \cdot 1 = \frac{3}{2} \\ \end{align*}