# 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? – Jonathan Y. Aug 17 '13 at 10:44
• yes, all components of the vectors are indipendent standard gaussian. – jojo87 Aug 17 '13 at 10:53
• You did not answer the question @JonathanY. asked. – Did Aug 17 '13 at 12:54
• I don't know how else to answer it to be honest. I generate two random vectors by choosing their components to be standard gaussian (all independent), is there something that I am missing? – jojo87 Aug 17 '13 at 13:34

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