What is the angle between two random 0-1 vectors in high dimension Here is my approach, which I believe is not rigorous enough. $$cos(a) = \frac{v_1 \cdot v_2}{||v_1||\cdot||v_2||}$$
$||v_1|| = \sqrt{\sum_{i=0}^nx_i^2}$ because each $v_i$ is either 0/1, expected number of of 1 and 0 is n/2, so $||v_1|| = \sqrt{n/2}$. The value of $||v_2||$ is the same, so the expected value of denominator is $n/2$
The expected value of the numerator is $v_1 \cdot v_2 = \sum_{i=0}^nx_i \cdot y_i$. Expected number of times 1/1 combination will appear is $n/4$. So the expected number of the numerator is $n/4$.
So the cos(a) = 1/2 and the expected angle is $\pi/3$.

I believe this is a correct answer, but I am not sure whether my solution is mathematically sound. How can I make it more rigorous?

The question is from this book on page 42, Exercise 2.2
 A: Let $x_i,y_i$ be independent Bernoulli random variable of parameter $\frac 12$ for $1\leq i\leq n$. Consider vectors $v_1=(x_1,\dots,x_n)\in\mathbb R^n$ and $v_2=(y_1,\dots,y_n)\in\mathbb R^n$. The goal is to find $\mathbb E(\frac{v_1.v_2}{\|v_1\|\|v_2\|})$. Using independence assumption:
$$
\mathbb E(\frac{v_1.v_2}{\|v_1\|\|v_2\|})=\sum_{i}\mathbb E(\frac{x_iy_i}{\|v_1\|\|v_2\|})\\
=\sum_i\mathbb E(\frac{x_i}{\|v_1\|})\mathbb E(\frac{y_i}{\|v_2\|})\\
=\sum_i\mathbb E(\frac{x_i}{\|v_1\|})^2=n\mathbb E(\frac{x_1}{\|v_1\|})^2.
$$
So it is enough to find $\mathbb E(\frac{x_1}{\|v_1\|})$. First see that:
$$
\mathbb E(\frac{x_1}{\|v_1\|})=\frac 12\mathbb E\left[\frac{1}{(1+x_2^2+\dots+x_n^2)^{1/2}}\right].
$$
And also:
$$
\mathbb E\left[\frac{1}{(1+x_2^2+\dots+x_n^2)^{1/2}}\right]=\sum_{k=0}^{n-1}\frac{1}{\sqrt{k+1}}\frac{1}{2^{n-1}} \binom{n-1}{k}.
$$
You can put together previous results to get:
$$
\mathbb E(\frac{v_1.v_2}{\|v_1\|\|v_2\|})=n\left(\sum_{k=0}^{n-1}\frac{1}{\sqrt{k+1}}\frac{1}{2^{n}} \binom{n-1}{k}\right)^2.
$$
