Derivation of F-distribution from inverse Chi-square? I am trying to derive F-distribution from Chi-square and inverse Chi-square. Somewhere in process I make a mistake and result slightly differs from the canonical form of Fisher-Snedecor F distribution. Please, help find it.
In order to derive p.d.f. of F-distribution, let us substitute the p.d.f. of chi-square and inverse chi-square distributions into F-distribution probability density function and integrate it over all possible values of $\chi^2_n=t$, such that $\frac{\chi_n^2}{\chi_m^2} = x$:
$f_{\frac{\chi_n^2}{\chi_m^2}}(x) = \int \limits_{t=0}^{\infty} f_{\chi^2_n}(t) f_{\frac{1}{\chi^2_m}}(\frac{x}{t})dt = \int \limits_{t=0}^{\infty} \frac{t^{n/2-1}e^{-t/2}}{2^{n/2}\Gamma(n/2)} \frac{{\frac{t}{x}}^{m/2+1}e^{-\frac{t}{2x}}}{2^{m/2}\Gamma(m/2)}dt = $
$ = \frac{1}{\Gamma(n/2)\Gamma(m/2) 2^{\frac{m+n}{2}} x^{m/2+1}} \int \limits_{t=0}^{\infty}t^{\frac{n+m}{2}}e^{-(t+\frac{t}{x})/2}dt = \frac{1}{\Gamma(n/2)\Gamma(m/2) 2^{\frac{m+n}{2}} x^{m/2+1}} \int \limits_{t=0}^{\infty}t^{\frac{n+m}{2}}e^{-\frac{t}{2}(1+\frac{1}{x})}dt$.
We aim to convert our integral into a gamma-function $\Gamma(n) = \int \limits_{0}^{\infty} z^{n-1}e^{-z}dz$.
In order to do that we shall perform a variable substitution $z = \frac{x+1}{x}\frac{t}{2}$, hence, $t = \frac{2x}{x+1}z$. Our integral then will take form of a gamma-function:
$\int \limits_{t=0}^{\infty}t^{\frac{n+m}{2}}e^{-\frac{t}{2}(1+\frac{1}{x})}dt = \int \limits_{z=0}^{\infty} (\frac{2zx}{x+1})^{\frac{n+m}{2}} e^{-z} \frac{2x}{x+1} dz = (\frac{x}{x+1})^{\frac{n+m}{2}+1} \cdot 2^{\frac{n+m}{2}+1} \cdot \int \limits_{z=0}^{\infty} z^{\frac{n+m}{2}}e^{-z}dz = \frac{x}{x+1}^{\frac{n+m}{2}+1} 2^{\frac{n+m}{2}+1} \Gamma(\frac{n+m}{2}+1)$
Substituting it into the expression for p.d.f., we get:
$f_{\frac{\chi^2_n}{\chi^2_m}}(x) = \frac{\Gamma(\frac{n+m}{2}+1)}{\Gamma(n/2)\Gamma(m/2)} \frac{2^{\frac{n+m}{2}+1}}{2^{\frac{m+n}{2}}} (\frac{x}{x+1})^{\frac{n+m}{2}+1} \frac{1}{x^{\frac{m}{2}+1}} = \frac{2\Gamma(\frac{n+m}{2}+1)}{\Gamma(n/2)\Gamma(m/2)} \frac{x^{\frac{n}{2}}}{(x+1)^{\frac{n+m}{2}+1}} = \frac{\Gamma(\frac{m+n}{2})}{\Gamma(\frac{m}{2}) \Gamma(\frac{n}{2})} \frac{x^{\frac{n}{2}-1}}{(x+1)^{\frac{n+m}{2}}} \frac{2x}{\frac{n+m}{2}(x+1)}$.
As you can see the result differs from the canonical p.d.f. of F distribution $\frac{\Gamma(\frac{m+n}{2})}{\Gamma(\frac{m}{2}) \Gamma(\frac{n}{2})} \frac{x^{\frac{n}{2}-1}}{(x+1)^{\frac{n+m}{2}}}$ by the multiplier $\frac{2x}{\frac{n+m}{2}(x+1)}$. Can you point to a mistake in this derivation?

In
$$f_{\frac{\chi_n^2}{\chi_m^2}}(x) = \int \limits_{t=0}^{\infty} f_{\chi^2_n}(t) f_{\frac{1}{\chi^2_m}}(\frac{x}{t})dt$$
the Jacobian term is missing.
Indeed, if $Z\sim\chi^2_n$ and $Y\sim\chi^{-2}_m$, and if $X=ZY$, the joint density of $(Z,X)$ is
$$f_{\chi^2_n}(z) f_{\chi^{-2}_m}(\frac{x}{z})\left|\frac{\text dy}{\text dx}\right|=f_{\chi^2_n}(z) f_{\chi^{-2}_m}(\frac{x}{z})\frac{1}{z}$$
and
\begin{align*}f_X(x) &= \int_0^\infty f_{\chi^2_n}(z) f_{\chi^{-2}_m}(\frac{x}{z})\frac{1}{z}\,\text dz\\
&= K_{n,m} \int_0^\infty z^{n/2-1}e^{-z/2}(x/z)^{-m/2-1}e^{-z/2x}\frac{1}{z}~\text dz\\
&= K_{n,m} x^{-m/2-1} \int_0^\infty z^{(m+n)/2-1}e^{-(1+x)z/2x}~\text dz\\
&= K_{n,m} x^{-m/2-1} \{(1+x)/x\}^{-(m+n)/2+1-1}\int_0^\infty \zeta^{(m+n)/2-1}e^{-\zeta/2}~\text d\zeta\\
&= K^\prime_{n,m}\,\dfrac{x^{n/2-1}}{(1+x)^{(m+n)/2}}\\
\end{align*}
