# Probability that random vectors have a certain dot product

Given two random unit vectors in $\mathbb R^n$, one can consider the probability that the absolute value of their dot product is $x$, and thus form a probability density function. Supposing that the random vectors were drawn from a uniform distribution with respect to the surface of the sphere that they live in, what is the probability that two vectors will have dot product less than $T$?

My intuition is that this should be proportional to the surface area of the "cap" of the cone containing all angles less than $\arccos(T)$. But how to compute this?

Extra question: if we choose the vectors by drawing each component of each vector from a mean zero, unit variance Gaussian distribution, does the answer change?

-
You talk about these vectors living on a sphere. Are these random unit vectors? – Adam Saltz Apr 27 '13 at 2:17
Yes, random unit vectors. Let me edit. – user21725 Apr 27 '13 at 2:19

Pick two unit vectors. Rotate your coordinate system so that one of them points at $(1,0,\ldots,0)$. You want the probability that $x \cdot (1,0,\ldots, 0) < T$. It will suffice to find the proportion of the surface area of the $n$-sphere not within an angle of $\cos^{-1}(T)$ from the North pole.

There are some nice formulas for the area of spherical caps in this paper by S. Li. In particular, the area of a cap with angle $\phi \leq \pi/2$ is $$A_n^{cap} = \frac{2\pi^{\frac{n-1}{2}}}{\Gamma(\frac{n-1}{2})} \int_0^\phi \sin^{n-2}(\theta)d\theta.$$

On the other hand, the surface area of the $n$-sphere is known to be $$\frac{2\pi^{\frac{n+1}{2}}}{\Gamma(\frac{n+1}{2})}$$

Taking the quotient of these two, you'll get the proportion of there sphere within an angle of $\phi$ from the north pole. Now subtract that from $1$ for your answer.

-
The upper index of your integral should be $\pi/2$, I think. – user21725 Apr 27 '13 at 4:01
@EricGregor So that the angle $\phi$ does not appear in the formula? – Adam Saltz Apr 27 '13 at 4:09
er, what i mean is that you are integrating with respect to the variable in the upper index. you need to make one of those variables different. – user21725 Apr 27 '13 at 4:39
Thank you. I've changed the variable off integration. – Adam Saltz Apr 27 '13 at 13:45