t分布の定義より,互いに独立な確率変数 \(Z \sim N(0, 1), X\sim\operatorname{\chi^2}(\nu)\) とすると
\[
T = \frac{Z}{\sqrt{X/\nu}}
\]
このとき,
\[
\begin{align*}
T &= \frac{Z}{\sqrt{X/\nu}}\\
W &= X
\end{align*}
\]
と変数変換を考える.このときJacobianは
\[
\begin{align*}
Z &= T \sqrt{\frac{W}{\nu}}\\
X &= W
\end{align*}
\]
と表せることから
\[
\label{eq:XY-TW-jac}
\begin{split}
J &= \left[ \begin{matrix}
\frac{\mathrm{d}X}{\mathrm{d}T} & \frac{\mathrm{d}X}{\mathrm{d}W} \\
\frac{\mathrm{d}Y}{\mathrm{d}T} & \frac{\mathrm{d}Y}{\mathrm{d}W}
\end{matrix} \right]
= \left[ \begin{matrix}
\sqrt{\frac{W}{\nu}} & \frac{T}{2 \nu \sqrt{W/\nu}} \\
0 & 1
\end{matrix} \right] \\
\lvert J \rvert &= \sqrt{\frac{W}{\nu}} \; .
\end{split}
\]
したがって,\(T, W\) についての同時確率密度関数は
\[
\begin{align*}
f_{T,W}(t,w)
&= f_{Z,X}(z,x) \cdot \lvert J \rvert \\[5pt]
&= f_Z(z)f_X(x) \cdot \lvert J \rvert \\[5pt]
&= \frac{1}{\sqrt{2\pi}}\exp\left(-\frac{t^2w/\nu}{2}\right) \frac{1}{\Gamma(\nu/2)2^{v/2}}w^{\nu/2-1}\exp(-w/2) \sqrt{w/\nu}\\[5pt]
&= \frac{1}{\sqrt{2\pi\nu}\Gamma(\nu/2)2^{\nu/2}}w^{\frac{\nu+1}{2}-1}\exp\left(-\frac{w}{2}(t^2/\nu + 1)\right)
\end{align*}
\]
これを用いて周辺密度関数を計算すれば良いので
\[
\begin{align*}
f_T(t) &= \int_{0}^{\infty} f_{T,W}(t,w) \, \mathrm{d}w \\
&= \frac{1}{\sqrt{2 \pi \nu} \cdot \Gamma\left( \frac{\nu}{2} \right) \cdot 2^{\nu/2}} \cdot \int_{0}^{\infty} w^{\frac{\nu+1}{2}-1} \cdot \mathrm{exp}\left[ -\frac{1}{2}\left( \frac{t^2}{\nu}+1 \right) w \right] \, \mathrm{d}w \\
&= \frac{1}{\sqrt{2 \pi \nu} \cdot \Gamma\left( \frac{\nu}{2} \right) \cdot 2^{\nu/2}} \cdot \frac{\Gamma\left( \frac{\nu+1}{2} \right)}{\left[ \frac{1}{2}\left( \frac{t^2}{\nu}+1 \right) \right]^{(\nu+1)/2}}
\cdot \int_{0}^{\infty} \frac{\left[ \frac{1}{2}\left( \frac{t^2}{\nu}+1 \right) \right]^{(\nu+1)/2}}{\Gamma\left( \frac{\nu+1}{2} \right)} \cdot w^{\frac{\nu+1}{2}-1} \cdot \mathrm{exp}\left[ -\frac{1}{2}\left( \frac{t^2}{\nu}+1 \right) w \right] \, \mathrm{d}w
\end{align*}
\]
このとき,
\[
\int_{0}^{\infty} \frac{\left[ \frac{1}{2}\left( \frac{t^2}{\nu}+1 \right) \right]^{(\nu+1)/2}}{\Gamma\left( \frac{\nu+1}{2} \right)} \cdot w^{\frac{\nu+1}{2}-1} \cdot \mathrm{exp}\left[ -\frac{1}{2}\left( \frac{t^2}{\nu}+1 \right) w \right] \, \mathrm{d}w = 1
\]
はガンマ分布の密度関数と考えることができるので
\[
\begin{align*}
f_T(t)
&= \frac{1}{\sqrt{2 \pi \nu} \cdot \Gamma\left( \frac{\nu}{2} \right) \cdot 2^{\nu/2}} \cdot \frac{\Gamma\left( \frac{\nu+1}{2} \right)}{\left[ \frac{1}{2}\left( \frac{t^2}{\nu}+1 \right) \right]^{(\nu+1)/2}} \\
&= \frac{\Gamma\left( \frac{\nu+1}{2} \right)}{\Gamma\left( \frac{\nu}{2} \right) \cdot \sqrt{\nu \pi}} \cdot \left( \frac{t^2}{\nu}+1 \right)^{-\frac{\nu+1}{2}}
\end{align*}
\]