# $x$-coordinate distribution on the $n$-sphere

Can we express the distribution of a coordinate of the $$n$$-sphere in any known distribution?

In formal terms, consider $$S^n = \{x\in\mathbb{R}^{n + 1}: \|x\|=1\}$$ (i.e. the usual $$n$$-sphere). If we sample $$x$$ uniformly from $$S^n$$ what is the distribution of $$x_1$$?

By "sampling uniformly" I mean that any point in $$S^n$$ has the same value for the density probability function. And $$x_1$$ means the first coordinate of vector $$x$$.

## $$n=1$$

(the circle)

$$x_1$$ follows the arcsine distribution.

## $$n=2$$

(the sphere)

Thanks to Archimedes we know that $$x_1$$ follows the Uniform distribution.

## $$n>2$$

Do we know?

...

I know that this is equivalent to ask the distribution of the dot product of two random points on the $$n$$-sphere. But I also do not know that!

• I'd say it is the normal distribution $N(0,1/m)$, and this guess is correct up to within Kolmogorov distance of $\mathcal O(1/m^c)$. Jun 1 '20 at 14:48

$$\def\d{\mathrm{d}}$$This is a direct application of the formula for the surface area of the hyperspherical cap. Denoting by $$I(x; a, b)$$ the regularized beta function, the surface area of an $$(n + 1)$$-dimensional hyperspherical cap with height $$x \leqslant 1$$ and radius $$1$$ is$$A_n(x) = \frac{1}{2} A_n(2) I\left( x(2 - x); \frac{n}{2}, \frac{1}{2} \right),$$ thus for $$-1 \leqslant x \leqslant 0$$,$$P(X_1 \leqslant x) = \frac{A_n(x + 1)}{A_n(2)} = \frac{1}{2} I\left( 1 - x^2; \frac{n}{2}, \frac{1}{2} \right).$$

Since $$\dfrac{∂I}{∂x}(x; a, b) = \dfrac{1}{B(a, b)} x^{a - 1} (1 - x)^{b - 1}$$, then for $$-1 < x < 0$$,$$f_{X_1}(x) = \frac{\d}{\d x} P(X_1 \leqslant x) = \frac{(1 - x^2)^{\frac{n}{2} - 1}}{B\left( \dfrac{n}{2}, \dfrac{1}{2} \right)}.$$ By symmetry,$$f_{X_1}(x) = \frac{(1 - x^2)^{\frac{n}{2} - 1}}{B\left( \dfrac{n}{2}, \dfrac{1}{2} \right)}. \quad \forall -1 < x < 1$$ Indeed, for $$n = 2$$ this is a uniform distribution.

I came across this answer previously. The original question was about the marginals of a point on the unit sphere in $$\mathbb{R}^3$$, but the poster added the case for the sphere in $$\mathbb{R}^d$$ (see Added section).

His method is summarized as follows (I have replaced $$d$$ in his answer with $$n+1$$):

1) Let $$Z$$ be a multivariate Gaussian r.v. with $$(n+1)$$ components, then $$\frac{Z}{\lVert Z \rVert}$$ is uniformly distributed on the unit sphere $$S^n$$. Thus, we set $$X= \frac{Z}{\lVert Z \rVert}$$.

2) Rewrite the CDF of $$X_1 = \frac{Z_1}{\lVert Z \rVert}$$ in terms of $$\frac{Z_1^2}{Z_2^2 + \dots Z_n^2}$$.

3) The ratio $$\frac{n\cdot Z_1^2}{Z_2^2 + \dots Z_n^2}$$ follows an $$F_{1,n}$$ distribution. Thus the CDF of $$X_1 = \frac{Z_1}{\lVert Z \rVert}$$ can be determined from (2). Differentiating gives $$f_{X_1}(x) = \frac{1}{B \bigl( \frac{n}{2}, \frac{1}{2} \bigr)}(1-x^2)^{(n/2-1)}, \quad x\in[-1,1].$$

Edit:
Therefore, for $$n=1$$, $$f_{X_1}(x) \propto (1-x^2)^{-1/2} = \frac{1}{\sqrt{1+x}\sqrt{1-x}},$$ which is the arcsine distribution with support $$x\in[-1,1]$$.

For $$n=2$$, $$f_{X_1}(x) \propto 1 ,$$ which is the uniform distribution.

For a general $$n$$, $$f_{X_1}(x) \propto (1+x)^{(n/2-1)} (1-x)^{(n/2-1)},$$

which resembles a $$\text{Beta}\left(\tfrac{n}{2},\tfrac{n}{2}\right)$$ distribution, but rescaled so that its support is in $$[-1,1]$$.
That is,

$$\frac{X_1 + 1}{2} \sim \text{Beta}\left(\frac{n}{2}, \frac{n}{2}\right).$$