# 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

## 1 Answer

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

• maybe a stupid question: why having each component of two vectors being a gaussian is the same as saying that the vectors are choosen uniformly on the unit sphere? (the unit part is ok, is the uniform part that doesn't seems obvious to me) – jojo87 Aug 17 '13 at 14:39
• Of course, the Gaussian is not uniformly distributed itself. When you normalize it, however, the normalized vector is uniformly distributed on the unit hypersphere. You can deduce this by looking at the standard Gaussian probability density function: The exponential term only depends on the Euclidean norm of the Gaussian variable, and everything else is constant. – S.B. Aug 17 '13 at 15:19