I recently asked myself a question but didn't have the slightest inkling on how to solve it.
Question
If we convert $\pi$ to a binary digit. We know the first $n$ digits the average number of $0$'s are the same as the average number of $1$'s. My question is what is the variance as a function of the first $n$ digits?

Wikipedia gives us that the variance of a set of values is $\frac 1{n^2}\sum_i\sum_{j\gt i}(x_i-x_j)^2$. If there are $k$ terms that are $1$ and $n-k$ terms that are $0$, this gives $\frac {k(n-k)}{n^2}$ If about half the digits are $1$ this gives $\frac 14$.