Q:

Distribution random variable $W=\sum_{k=1}^{\infty}X_k/2^k$

$X_1$ $X_2$,... are independent random variables with: $$P(X_k = 0) = P(X_k = 1) = 1/2$$ for each $k=1,2,3,...$ What is the distribution random variable: 
$$W = \sum_{k=1}^{\infty}\frac{X_k}{2^k}.$$
I started with: 
$$P(W \in (0,1))=?,\quad P(W \in (1/2,1))=?,\quad \ldots\quad  P(W\in (1/2^k ,1))=?$$
And then I need to compute: $$P(W \le 1)=?, \quad P(W \le 1/2)=?,\quad \ldots \quad P(W \le 1/2^k)=?$$
How I compute this probabilities?
Thank you very much!

A:

First of all note that: $$\sum_{k=1}^{\infty}\frac{1}{2^k}=1$$
So:$$W=\sum_{k=1}^{\infty}\frac{X_k}{2^k}\leq1$$
and then:
$$ P(0\leq W\leq1)=1$$
Now take $X_1$ out of the sum:
$$W=\frac{X_1}{2}+\sum_{k=2}^{\infty}\frac{X_k}{2^k}$$ 
The sum is now $\leq1/2$ so:
$$ P(0\leq W\leq1/2)=P(X_1=0)=1/2$$
$$ P(1/2\leq W\leq1)=P(X_1=1)=1/2$$
Proceeding in this way you can show that:
$$ P(k/2^n\leq W\leq(k+1)/2^n)=1/2^n$$
for every $0\leq k\leq2^n$.
If you recall the uniform distribution $U(0,1)$ has the property that:
$$P(a\leq U\leq(a+b))=b$$
You have that for every interval this holds also for $W$ so $$W\sim U(0,1)$$

