Let $X$ and $Y$ random variables:$\phantom{3}X \sim N(\mu_1, \sigma_1)$, $Y \sim N(\mu_2, \sigma_2)$
Given 2 simple random sampling of size $n$ and $m$ from $X$ and $Y,$ I'm trying to obtain the distribution of the statistic:
$$T = \frac{\frac{S_{n-1}^2}{\sigma_{1}^2}}{\frac{S_{m-1}^2}{\sigma_{2}^2}}$$
I know that $S_{n-1}^2$ and $S_{m-1}^2$ denote the sample quasi-variance of the samples taken from the population $X$ and $Y$ respectively but I'm not quite sure how I could find its distribution. Any hints or suggestions?
This is not homework, I'm studying by my own.
Set $T=\frac{S_{n-1}^2/\sigma_1^2}{S_{m-1}^2/\sigma_2^2}$ $A=\frac{(n-1)S_{n-1}^2}{\sigma_1^2}$, and $B=\frac{(m-1)S_{m-1}^2}{\sigma_2^2}$. It is well known that $A\sim \chi^2_{n-1},B\sim \chi^2_{m-1}$. Assuming we obtained these simple random samples independently from each other, we can say $A,B$ are independent random variables, so the joint density of $(A,B)$ factors i.e. $$f_{AB}(a,b)=f_A(a)f_B(b)$$ Note $(A,B)$ is supported on $[0,\infty)^2$ so for $t\geq 0$ fixed we get $$F_{T}(t)=P(T\leq t)=P\Bigg(A\leq \frac{(n-1)tB}{m-1}\Bigg)=\int_0^{\infty} \int_0^{\frac{(n-1)tb}{m-1}}f_{AB}(a,b)\mathrm{d}a\mathrm{d}b$$ Now differentiate with respect to $t$: $$f_T(t)=\frac{n-1}{m-1}\int_{0}^{\infty}bf_{AB}\Big(\frac{(n-1)tb}{m-1},b\Big)\mathrm{d}b$$ Using the fact that the pdf of a $\chi^2$ distribution with $k$ degrees of freedom equals $$x \longrightarrow \frac{1}{2^{k/2}\Gamma(k/2)}x^{\frac{k}{2}-1}e^{-x/2} \text{ for } x\geq 0$$ we get that $$bf_{AB}\Big(\frac{(n-1)tb}{m-1},b\Big)=\frac{\alpha^{\frac{n-3}{2}}}{2^{\frac{m+n-2}{2}}\Gamma\big(\frac{n-1}{2}\big)\Gamma\big(\frac{m-1}{2}\big)}b^{\frac{m+n-4}{2}}e^{-b\big(\frac{\alpha+1}{2}\big)}$$ where $\alpha=\frac{(n-1)t}{m-1}$. This means $$f_T(t)=\frac{n-1}{m-1}\times \frac{\alpha^{\frac{n-3}{2}}}{2^{\frac{m+n-2}{2}}\Gamma\big(\frac{n-1}{2}\big)\Gamma\big(\frac{m-1}{2}\big)}\times \int_0^{\infty}b^{\frac{m+n-4}{2}}e^{-b\big(\frac{\alpha+1}{2}\big)}\mathrm{d}b$$ To integrate the last integral on the right hand side, take $u=b\big(\frac{\alpha+1}{2}\big)$ to get $$\int_0^{\infty}b^{\frac{m+n-4}{2}}e^{-b\big(\frac{\alpha+1}{2}\big)}\mathrm{d}b=\Big(\frac{2}{\alpha+1}\Big)^{\frac{m+n-2}{2}}\int_0^{\infty}u^{\frac{m+n-4}{2}}e^{-u}\mathrm{d}u=\Big(\frac{2}{\alpha+1}\Big)^{\frac{m+n-2}{2}}\Gamma\Big(\frac{m+n-2}{2}\Big)$$ Putting this monster together and simplifying we get $$f_T(t)=At^{\frac{n-3}{2}}\Big(\frac{2(m-1)}{(n-1)t+m-1}\Big)^{\frac{m+n-2}{2}} \text{ for } t\geq 0$$ where $$A=\frac{\big(\frac{n-1}{m-1}\big)^{\frac{n-1}{2}}\Gamma\big(\frac{m+n-2}{2}\big)}{2^{\frac{m+n-2}{2}}\Gamma\Big(\frac{n-1}{2}\Big)\Gamma\Big(\frac{m-1}{2}\Big)}$$
Note: You could also use the fact that the ratio $\frac{S_{n-1}^2}{S_{m-1}^2}$ possesses an $F$ distribution with $(n-1),(m-1)$ degrees of freedom, but I assumed this is the statement the exercise was trying to have you derive.