Distribution of $\frac{X_1-\bar{X}}{S}$ when $X_1,\ldots,X_n$ are i.i.d $N(\mu,\sigma^2)$ Suppose $X_1, X_2, \dots, X_n$ are i.i.d normal variables with mean $\mu$ and variance $\sigma^2$.
Let $Z_1 = \dfrac{X_1-\bar{X}}{S}$, where $\bar{X} = \frac{1}{n}\sum X_i$ and $S^2 = \frac{1}{n-1}\sum (X_i-\bar{X})$
I need to find distribution of $Z_1$.
What is easy to see is $Z_1$ is independent of $(\bar{X}, S^2)$ and $\bar{X}$ is independent of $S^2$.
I tried to find MGF of $Z_1$. But nothing is coming to far.
I don't know what to do next. Please help.
 A: If $A$ is a real unitary matrix, then $AA^T=I$, you can rewrite
\begin{align*}
X_1-\bar X&= \frac{1}{n}\left( n-1, -1,\dots,-1 \right)A\cdot A^T(X_1-\mu,\dots,X_n-\mu)^T\\
&= \frac{1}{n}\left( n-1, -1,\dots,-1 \right)A\cdot Y\\
S&= \frac{1}{n-1}(X_1-\bar X,\dots,X_n-\bar X)A\cdot A^T(X_1-\bar X,\dots,X_n-\bar X)^T\\
&= \frac{1}{n-1} (Y-\bar Y)^T(Y-\bar Y)
\end{align*}
with $Y = A^T(X_1-\mu,\dots,X_n-\mu)^T$ being a vector of i.i.d. normals with mean $0$ and variance $\sigma^2$.
If you pick $A$ to be such that $\frac{1}{n}\left( n-1, -1,\dots,-1 \right)A$ is proportional to $\frac{1}{n}(1,\dots,1)$, say with scaling coefficient $a$, then $Z_1=a\frac{\bar Y}{\frac{1}{n-1}(Y-\bar Y)^T(Y-\bar Y)}$ which is $a$ times a $t$-Student's distribution with $n-1$ degrees of freedom. The only remaining part is to find $a$, now observe that since $\frac{1}{n}\left( n-1, -1,\dots,-1 \right)A=\frac{a}{n}(1,\dots,1)$, then
\begin{align*}
a^2 &= n\left\lVert \frac{a}{n}(1,\dots,1)^T \right\rVert^2\\
&= n\left\lVert \frac{1}{n}A^T\left( n-1, -1,\dots,-1 \right)^T \right\rVert^2\\
&= \frac{1}{n} \left( n-1, -1,\dots,-1 \right)AA^T\left( n-1, -1,\dots,-1 \right)^T\\
&= \frac{1}{n}\left( n-1, -1,\dots,-1 \right)\left( n-1, -1,\dots,-1 \right)^T\\
&= \frac{(n-1)^2+1\cdot(n-1)}{n}\\
&= n-1
\end{align*}
So in the end $Z_1=\sqrt{n-1} T$ where $T$ is a $t$-Student's distribution with $n-1$ degrees of freedom.
