Derive Student T distribution using transformation theorem

I am trying working on an exercise that asks me to show that

If $ X_1 \in N(0,1) $ and $ X_2 \in \chi^2(n) $ are independent random variables, then $ X_1 / \sqrt{X_2/n} \in t(n) \, $ where $ \,t(n) $ is the student T distribution.

This section of the book deals with functions of random variables and the transformation theorem (multivariate analogue of distribution function method) which is why I want to solve it specifically using that technique.

I started by putting $$ Y_1 = g_1(X_1,X_2)=X_1/\sqrt{X_2/n} $$ $$ Y_2 = g_2(X_1,X_2)=X_2 $$

and making inverses $$ X_1=h_1(Y_1,Y_2)=Y_1\sqrt{Y_2/n} $$ $$ X_2=h_2(Y_1,Y_2)=Y_2. $$

From which I get the Jacobian $$ \begin{vmatrix}\sqrt{Y_2/n} & \frac{Y_1}{2n\sqrt{Y_2/n}}\\0 & 1\end{vmatrix}. $$

From there I want to use independence and calculate my density function as $$ f_{y_1y_2}(y_1,y_2)=f_{x_1}(\frac{Y_1}{\sqrt{Y_2/n}})*f_{x_2}(Y_2)*\sqrt{Y_2/n} $$

I think that this should then equal the $ t(n) $ density.


But the result I'm getting appears to be incorrect. I would appreciate if someone could tell me if my way of thinking about this is just completely wrong or if I'm on the right track and might have made a calculation error or something else.

Thank you.


You are almost there, it's just a matter of calculations. We have $$f_{X_1}(x) = \frac{1}{\sqrt{2\pi}}e^{-\frac{x^2}{2}}$$ and $$f_{X_2}(y)=\frac{1}{2^{\frac{n}{2}}\Gamma(\frac{n}{2})}y^{\frac{n}{2}-1}e^{-\frac{y}{2}}I_{(0,\infty)}(y).$$

Now we compute $f_{Y_1,Y_2}(x,y)$, which you have shown is given by

$$f_{Y_1,Y_2}(x,y)=f_{X_1}\bigg(\frac{x}{\sqrt{y/n}}\bigg)\cdot f_{X_2}(y)\cdot\sqrt{\frac{y}{n}} = $$ $$= \frac{1}{\sqrt{2\pi}}e^{-\frac{yx^2}{2n}}\cdot \frac{1}{2^{\frac{n}{2}}\Gamma(\frac{n}{2})}y^{\frac{n}{2}-1}e^{-\frac{y}{2}}I_{(0,\infty)}(y)\cdot\sqrt{\frac{y}{n}}$$ $$ = \frac{1}{\Gamma(\frac{n}{2})2^{\frac{n+1}{2}}\sqrt{\pi n}}e^{-y(\frac{x^2}{2n}+\frac{1}{2})}y^{\frac{n+1}{2}-1}I_{(0,\infty)}(y).$$

The density we want is the marginal density $f_{Y_1}$ of $f_{Y_1,Y_2}$, which is $$f_{Y_1}(t) = \int_{-\infty}^\infty f_{Y_1,Y_2}(t,y)\ dy = \int_{-\infty}^\infty \frac{1}{\Gamma(\frac{n}{2})2^{\frac{n+1}{2}}\sqrt{\pi n}}e^{-y(\frac{t^2}{2n}+\frac{1}{2})}y^{\frac{n+1}{2}-1}I_{(0,\infty)}(y)\ dy = $$ $$ = \frac{1}{\Gamma(\frac{n}{2})2^{\frac{n+1}{2}}\sqrt{\pi n}} \int_0^\infty e^{-y(\frac{t^2}{2n}+\frac{1}{2})}y^{\frac{n+1}{2}-1}\ dy = $$ $$ = \frac{1}{\Gamma(\frac{n}{2})2^{\frac{n+1}{2}}\sqrt{\pi n}} \bigg(\frac{2n}{t^2+n} \bigg)^{\frac{n+1}{2}}\int_0^\infty e^{-u}u^{\frac{n+1}{2}-1}\ du = $$ $$ = \frac{1}{\Gamma(\frac{n}{2})2^{\frac{n+1}{2}}\sqrt{\pi n}} \bigg(\frac{2n}{t^2+n} \bigg)^{\frac{n+1}{2}}\Gamma\Big(\frac{n+1}{2}\Big) = \frac{\Gamma(\frac{n+1}{2})}{\Gamma(\frac{n}{2})}\frac{1}{\sqrt{\pi n}}\bigg( \frac{n}{t^2+n}\bigg)^{\frac{n+1}{2}}.$$

From this we conclude that $Y_1 = \frac{X_1}{\sqrt{X_2/n}}$ has the student T-distribution with $n$ degrees of freedom.