The distribution of $X$ is the distribution of the ratio $$\frac{\sum_{i=1}^n\lambda_iZ_i^2}{\sum_{i=1}^nZ_i^2} $$ of two quadratic forms in iid standard normal random variables $Z_1,\dots,Z_n$. The distribution of this ratio was studied by Gurland; also see e.g. Watson.
Iosif Pinelis
- 127.7k
- 8
- 107
- 229