Probability that a random number belongs to $[a,b]\subseteq[0,1]$ 
Let $(a_k)$ be an infinite sequence of $0$s and $1$s chosen at random so that the probability that any $a_k=0$ is $1/2$. Show that the probability that the random number $\sum_{k=1}^\infty a_k/2^k$ belongs to $[a,b]\subseteq[0,1]$ is $b-a$. Hint: Consider dyadic intervals (i.e. intervals of the form $\left[j/2^k,(j+1)/2^k\right]$) first.

Now this is in the context of a measure theory course. The only thing we have said about probabilities is that a probability is a measure $\mu$ on a space $(X,\mathcal A)$ that satisfies $\mu(X)=1$. Nothing else.
Initially, I thought that the Lebesgue measure on $[0,1]$ is a probability measure and so we must have $\mu([a,b])=b-a$. So the probability that $x\in[a,b]$ is $b-a$ for any $x$. Clearly something is wrong with this.
So, I tried to use the hint. Well, I know that $[0,1]=\bigcup_{j=0}^{2^k-1}\big[j/2^k,(j+1)/2^k\big)$ for any $k$ and so the probability that any random $x$ is in one of the dyadic intervals is $1/2^k$. I wish to find a similar decomposition for $[a,b]$ but I can't think of any; and even if I could, I don't see how this is useful for the problem. 
As you see I am very confused here. Any explanation will be appreciated. 
 A: HINT You have not mentioned one important piece of the definition of a measure:  The measure of the union of disjoint sets is the sum of the measures of the members of the union.
You will also need the fact that a countable set of points has measure zero, in order to break up the interval $[a,b]$ into a countable union of disjoint open intervals unioned with a countable set of points
A: Denote $\sum_{k = 0}^\infty a_k/2^k$ by $X$, and let $F(x) = P(X \leq x)$ be the distribution function of $X$, we shall show that $F(x) = x$ for every $x \in [0, 1]$ so that the result follows. 
First we show that $F$ is everywhere continuous, For an arbitrary sequence $u_1, u_2, \ldots$ of $0$'s and $1$'s,
$$P[a_n = u_n, n = 1,2,...] = \lim_n \left(\frac{1}{2}\right)^n = 0,$$ 
and since $x$ can have at most two dyadic expansions $x = \sum_n u_n 2^{-n}$, $P(X = x) = 0$, thus $F$ is everywhere continuous. Also clearly, $F(0) = 0$ and $F(1) = 1$.
Now fix $x \in (0, 1]$, for every $n \geq 1$, there exists $k = k_n \in \{0, 1, \ldots, 2^n - 1\}$ such that $x \in (k2^{-n}, (k + 1)2^{-n}]$. For each $i \in \{0, 1, \ldots, k\}$, assume $i2^{-n}$ has the dyadic expansion $\sum_{j = 1}^n u_j2^{-n}$ for some $n$-tuple $(u_1, \ldots, u_n)$ of $0$'s and $1$'s. It then follows by continuity that
\begin{align}
F\left(\frac{i + 1}{2^n}\right) - F\left(\frac{i}{2^n}\right) = P(i2^{-n} <  X < (i + 1)2^{-n}) = P(a_j = u_j, j \leq n) = \frac{1}{2^n}.
\end{align}
Therefore, 
$$F\left(\frac{k}{2^n}\right) = \sum_{i = 0}^{k - 1} \left[F\left(\frac{i + 1}{2^n}\right) - F\left(\frac{i}{2^n}\right)\right] = k \times \frac{1}{2^n} = \frac{k}{2^n}.$$
Thus letting $n$ go to $\infty$ in
$$x - \frac{1}{2^n} < \frac{k}{2^n} = F\left(\frac{k}{2^n}\right) < F(x) \leq F\left(\frac{k + 1}{2^n}\right) = \frac{k}{2^n} + \frac{1}{2^n} < x + \frac{1}{2^n}$$
gives that $F(x) = x$.
