Let $(X_n)$ be a sequence of independent Bernoulli random variables of parameter $1/2.$ Let $Y_n=\sum_{k=1}^n\frac{X_k}{2^k}.$
We have $Y_n\overset{n\to\infty}\to\sum_{k=1}^{+\infty}\frac{X_k}{2^k},$
I would like to compute the distribution and to prove that $\vert F_n(x)-x\vert\le 1/2^n$ for all $x\in [0,1].$
We have $P_{Y_n}=\sum_{x\in Y_n(\Omega)}P(Y_n=x)\delta_x.$
If I am not mistaken we have $Y_n(\Omega):=\{\frac{k}{2^n}: k=0,1,\ldots,2^{n-1}\}.$
Now I just have to compute $P(Y_n=\frac{k}{2^n});$ if I write $Y_n=0.X_1X_2\ldots X_n$ I imagine we have $P(Y_n=\frac{k}{2^n})=P(X_1=a_1)P(X_2=a_2)\cdots P(X_n=a_n)=\frac{1}{2^n}.$
Therefore, $$P_{Y_n}=\frac{1}{2^n}\sum_{k=1}^{2^n-1}\delta_{k/2^n}.$$
I have no idea to prove that $\vert F_n(x)-x\vert\le 1/2^n,$ I tried wrting $x=\sum_k a_k/2^k$ but...
Question: How can I prove formally that $$P(Y_n=\frac{k}{2^n})=\frac{1}{2^n}\; \mbox{and}\; \vert F_n(x)-x\vert\le 1/2^n ?$$