# probability of the dot product between gaussian unit vectors

Let $a,b \in \mathbb{R}^n$ be two vectors where each component $a_i,b_i$ is drawn from a standard gaussian distribution.

Let also $a,b$ be normalized as to have norm equal to 1.

I know that such vectors tend to be nearly-orthonormal, but I would like to find a more precise statement. Is there a way (numerically or analitically) to compute $\mathrm{P}(|\langle a,b\rangle| \geq \varepsilon)$ ?

• LorenzoFerrone, are the two vectors independent? Aug 17, 2013 at 10:44
• yes, all components of the vectors are indipendent standard gaussian. Aug 17, 2013 at 10:53
Basically you are drawing $a$ and $b$ independently and uniformly at random from the unit hypersphere. $$P(\vert \langle a,b\rangle\vert\geq \varepsilon)=\mathbb{E}_a\left[P(\vert \langle a,b\rangle\vert\geq \varepsilon\mid a)\right]=2S_{\varepsilon}/S_n$$ where $S_n$ is the area of the unit hypersphere and $S_\varepsilon$ is the area of an hyperspherical cap with height $1-\varepsilon$. Using the formula given here, the desired probability is $I_{1-\varepsilon^2}(\frac{n-1}{2},\frac{1}{2})$ where $I_x(a,b)$ denotes the regularized incomplete beta function