Distribution of $\sum\limits_{i=1}^{N}X_{i}$ conditionally on $\sum\limits_{i=1}^{N}X_{i}^{2}$ for i.i.d. standard normal $X_i$s
Assume that the random variables $X_{i}$ are i.i.d $\mathcal{N}\left(0,1\right)$, then:
$$S_N=\sum_{i=1}^{N}X_{i}\sim\mathcal{N}\left(0,N\right)\qquad\qquad T_N=\sum_{i=1}^{N}X_{i}^{2}\sim\chi^{2}\left(N\right)$$
What can be said about the conditional distribution $P\left(S_N\mid T_N\right)$?
That is, I observe the sum of squared $X$'s and want to do inference on the sum of $X$'s. The fact that $f\left(x\right)=x^{2}$ is not injective makes it complicated.
So basically what I am asking is:
- Can I get an analytical expression for $P\left(S_N\mid T_N\right)$?
- Can I evaluate $P\left(S_N\mid T_N\right)$?
- Do I know something about the moments of $P\left(S_N\mid T_N\right)$? Or anything else?
The vector $\vec X = [X_1,\dots,X_N]^T$ has a rotationally invariant distribution. That is, if $A$ is any orthogonal matrix, then the distribution of $\vec X$ and $A \vec X$ are the same. Hence by letting $A$ be an orthogonal matrix that takes $[1,\dots,1]^T$ to $[\sqrt N,0,\dots,0]^T$, your problem is the same as computing $$ \Pr(\sqrt N X_1 \mid \sum X_i^2 = r^2) .$$
Next, since $\vec X$ is rotationally invariant, your question is equivalent to: what is the probability distribution of $\sqrt N x_1$ if $\vec x$ is chosen randomly on the sphere is radius $r$. So now the problem is reduced to the geometry of spheres in $N$ dimensions.
The total surface area of the sphere is $s_N r^{N-1}$ where $s_N = \frac{N \pi^{N/2}}{\Gamma(\frac N2 + 1)} = \frac{2 \pi^{N/2}}{\Gamma(\frac N2)}$ (see https://en.wikipedia.org/wiki/N-sphere). Take a slice through the sphere of radius $r$ such that the first coordinate $x_1$ is between $x$ and $x + \delta x$, and set $x = r \sin\theta$ where $\theta$ is the angle between the point on the sphere and the equator $x_1 = 0$. Then the surface area of that slice is approximately $$ s_{N-1} (r \cos \theta)^{N-2} \sec \theta \, \delta x = s_{N-1} r^{N-2} (r^2 - x^2)^{(N-3)/2} \delta x .$$ So the probability that $\sqrt Nx_1 $ lies between $x$ and $x + \delta x$ is approximately $$ \frac{s_{N-1}}{r \sqrt N s_N} \left(r^2 - \frac{x^2}N\right)^{(N-3)/2} \delta x .$$
Details might be wrong, but the idea is correct. It is similar to the student $t$-test distribution.