For a random vector $\mathbf{X} \in \mathbb{R}^n$ uniformly distributed on the surface of a sphere of radius $r$, the PDF is the inverse of the surface $$f_\mathbf{X}(\mathbf{x}) = 2\pi^{-n/2}\Gamma(n/2)r^{1-n} \tag{1}$$
To derive the marginal distribution, I use the law of total probability. For $\mathbf{X_i} = [X_1 ... X_{n-i}]$, $$f_\mathbf{X_1}(\mathbf{x_1}) = \int_{-r}^{r} f_\mathbf{X}(\mathbf{x}) dx_n = 2\pi^{-n/2}\Gamma(n/2)r^{1-n} \times 2r$$ $$f_\mathbf{X_2}(\mathbf{x_2}) = \int_{-r}^{r} f_\mathbf{X_1}(\mathbf{x_1}) dx_{n-1} = 2\pi^{-n/2}\Gamma(n/2)r^{1-n} \times (2r)^2$$ and go on $$f_{X_1}(x_1) = 2\pi^{-n/2}\Gamma(n/2)r^{1-n} \times (2r)^{n-1} = 2^{n-2}\pi^{-n/2}\Gamma(n/2) \tag{2}$$
Equation (2) shows that the marginal PDF is uniform and does not depend on $r$. This is incorrect.
Could anyone show me where I am wrong?
Then $$f_{X_1,...,X_{n-1}}(x_1,...,x_{n-1}) = \int_{-1}^1 f_\mathbf{X}(\mathbf{x}) dx_n \= 2\pi^{-n/2}\Gamma(n/2) \int_{-1}^1 \delta(x_n^2 = 1 - x_1^2-...-x_{n-1}^2) dx_n = 2\pi^{-n/2}\Gamma(n/2) \times 2$$ because there is 2 points $x_n^2 = \pm\sqrt{1 - x_1^2-...-x_{n-1}^2}$.
– Cath Maillon May 24 '18 at 13:54