Let two independent random variables
\(X \sim N(\mu_x, \sigma_x)\) and \(Y \sim N(\mu_y, \sigma_y)\).
If we denote \(\beta = \frac{\mu_x}{\mu_y}\), \(\displaystyle{\rho = \frac{\sigma_y}{\sigma_x}}\)
and \(\displaystyle{\delta_y = \frac{\sigma_y}{\mu_y}}\),
the probability distribution function of the ratio \(\displaystyle{Z = \frac{X}{Y}}\)
is given by:
$$\displaystyle{ f_Z(z; \beta, \rho, \delta_y) = \frac{\rho}{\pi (1 + \rho^2 z^2)} \left[ \exp{\left(-\frac{\rho^2 \beta^2 + 1}{2\delta_y^2}\right)} + \sqrt{\frac{\pi}{2}} \ q \ \text{erf}\left(\frac{q}{\sqrt{2}}\right) \exp\left(-\frac{\rho^2 (z-\beta)^2}{2 \delta_y^2 (1 + \rho^2 z^2)}\right) \right] }$$
with \(\displaystyle{ q = \frac{1 + \beta \rho^2 z}{\delta_y \sqrt{1 + \rho^2 z^2}} }\)
and \(\displaystyle{ \text{erf}\left(\frac{q}{\sqrt{2}}\right) = \frac{2}{\sqrt{\pi}} \int_0^{\frac{q}{\sqrt{2}}}{\exp{(-t^2)}\ dt} }\)
Another expression of this density, used by the estparnormratio() function, is:
$$\displaystyle{
f_Z(z; \beta, \rho, \delta_y) = \frac{\rho}{\pi (1 + \rho^2 z^2)} \ \exp{\left(-\frac{\rho^2 \beta^2 + 1}{2\delta_y^2}\right)} \ {}_1 F_1\left( 1, \frac{1}{2}; \frac{1}{2 \delta_y^2} \frac{(1 + \beta \rho^2 z)^2}{1 + \rho^2 z^2} \right)
}$$
where \(_1 F_1\left(a, b; x\right)\) is the confluent hypergeometric function
(Kummer's function):
$$\displaystyle{
_1 F_1\left(a, b; x\right) = \sum_{n = 0}^{+\infty}{ \frac{ (a)_n }{ (b)_n } \frac{x^n}{n!} }
}$$
If \(X\) and \(Y\) are not independent,
let \(r = Cor(X, Y) = \frac{Cov(X, Y)}{\sigma_X \sigma_Y}\),
the probability distribution of \(Z = \frac{X}{Y}\) is:
$$\displaystyle{
f_Z(z; \beta, \rho, \delta_y, r) = \frac{\rho \sqrt{1 - r^2}}{\pi (\rho^2 z^2 - 2r \rho z +1)} \ \exp{\left(-\frac{\rho^2 \beta^2 - 2r \beta \rho + 1}{2(1 - r^2) \delta_y^2}\right)} \ {}_1 F_1\left( 1, \frac{1}{2}; \frac{1}{2(1 - r^2) \delta_y^2} \frac{(\beta \rho^2 z - r\rho(z + \beta) + 1)^2}{\rho^2 z^2 - 2r \rho z + 1} \right)
}$$