Distribution of $\frac{\sum_{i=1}^n X_iY_i}{\sum_{i=1}^n X_i^2}$ where $X_i,Y_i$s are i.i.d Normal variables 
Suppose $X_1,\ldots,X_n,Y_1,\ldots,Y_n$ are i.i.d $\mathcal N(0,1)$ random variables.
I am interested in the distribution of $$U=\frac{\sum_{i=1}^n X_iY_i}{\sum_{i=1}^n X_i^2}$$

I define $$Z=\frac{\sum_{i=1}^n X_iY_i}{\sqrt{\sum_{i=1}^n X_i^2}}$$
Then, $$Z\mid (X_1=x_1,\ldots,X_n=x_n)=\frac{\sum_{i=1}^n x_iY_i}{\sqrt{\sum_{i=1}^n x_i^2}}\sim \mathcal N(0,1)$$
As this conditional distribution is independent of $X_1,\ldots,X_n$, the unconditional distribution should also be the same. That is, I can say that $$Z\sim \mathcal N(0,1)$$
Relating $U$ and $Z$, I have $$U=\frac{Z}{\sqrt{\sum_{i=1}^n X_i^2}}$$
Now since I saw that $Z\mid (X_1,\ldots,X_n)\stackrel{d}{=}Z$, I can say that $Z$ is independent of $X_1,\ldots,X_n$.
So I have
$$U=\frac{1}{\sqrt n}\frac{Z}{\sqrt{\frac{\sum_{i=1}^n X_i^2}{n}}}=\frac{T}{\sqrt n}$$, where $T$ is distributed as a $t$ distribution with $n$ degrees of freedom.

I think conditioning is the easiest way to see the result here. But is this a perfectly rigorous argument and is there any direct/alternative way of finding distributions of such functions of linear combinations of i.i.d Normal variables?

 A: Although this is a conditional argument as well, using the characteristic function is faster:
\begin{align*}
\mathbb E\left[\exp\left\{ \iota t\sum_i Y_i X_i\Big/{\sum_j X_j^2}\right\}\right] &=
\mathbb E\left[\left.\mathbb E\left[\exp\left\{\iota t Y_i X_i\Big/{\sum_j X_j^2}\right\}\right]\,\right|\,\mathbf X \right]\\
&=\mathbb E\left[\left.\mathbb E\left[\prod_i \exp\left\{\iota t Y_i X_i\Big/{\sum_j X_j^2}\right\}\right]\,\right|\,\mathbf X \right]\\
&=\mathbb E\left[\prod_i\left.\mathbb E\left[ \exp\left\{ t Y_i X_i\Big/{\sum_j X_j^2}\right\}\right]\,\right|\,\mathbf X\iota \right]\\
&=\mathbb E\left[\prod_i \exp\left\{- t^2 X_i^2 \Big/2\left\{\sum_j X_j^2\right\}^2\right\}\right]\\
&=\mathbb E\left[ \exp\left\{- t^2 \Big/2{\sum_j X_j^2}\right\}\right]\\
\end{align*}
Invoking Wolfram's integrator, this expectation is equal to
$$\int_0^∞ \zeta^{n/2 - 1} \frac{\exp(-\zeta - t^2/\zeta)}{Γ(n/2)}\ \text{d}\,\zeta = \frac{2 t^{n/2} K_{-n/2}(2 t)}{Γ(n/2)}$$
where $K_n$ is the modified Bessel function of the second kind. Hence, except for $n=1$ this is not the characteristic function of the Cauchy distribution. This looks instead like the characteristic function of the Student's $t$ distribution.
