More on the ratio of Gamma distributed variables

Keeping the notation $\rho_z$ for the ratio of the generic Gamma distributed variables $Z_1$ and $Z_2$, the pdf of Eq. ([*]) can be further simplified reminding that the beta special function (or Euler integral of the first kind [33]), defined as
B$\displaystyle (r,s)$ $\displaystyle =$ $\displaystyle \int_0^1 t^{\,r-1} \cdot (1-t)^{s-1}\,$d$\displaystyle t\,,$ (70)

can be written as
B$\displaystyle (r,s)$ $\displaystyle =$ $\displaystyle \frac{\Gamma(r)\cdot \Gamma(s)}{\Gamma(r+s)}\,.$ (71)

We can then rewrite the combination of three gamma functions appearing in Eq. ([*]) as $1/$B$(\alpha_1,\alpha_2)$, thus getting
$\displaystyle f(\rho_z\,\vert\,\alpha_1,\beta_1,\alpha_2,\beta_2)\!\!$ $\displaystyle =$ $\displaystyle \frac{1}{\mbox{B}(\alpha_1,\alpha_2)}
\cdot \beta_1^{\,\alpha_1}\...
...lpha_1-1}\!\cdot\!
(\beta_2+\rho_z\!\cdot\beta_1)^{\,-(\alpha_1+\,\alpha_2)}\,.$ (72)

As far as mode, expected value and variance are concerned, they can be obtained, without direct calculations, just transforming those of $\rho=r_1/r_2$, seen above, remembering that, starting from a flat prior, $r_i \sim$   Gamma$(\alpha_i=x_i+1, \beta_i=T_i)$. We get then
mode$\displaystyle (\rho_z)$ $\displaystyle =$ $\displaystyle \frac{\beta_2}{\beta_1} \cdot
\frac{\alpha_1-1}{\alpha_2+1}$ (73)
       
E$\displaystyle (\rho_z)$ $\displaystyle =$ $\displaystyle \frac{\beta_2}{\beta_1} \cdot \frac{\alpha_1}{\alpha_2-1}
\hspace{5.3cm}(\mathbf{\alpha_2>1})$ (74)
       
Var$\displaystyle (\rho_z)$ $\displaystyle =$ $\displaystyle \frac{\beta_2^2}{\beta_1^2}\cdot
\left[ \frac{\alpha_1}{\alpha_2-...
...\frac{\alpha_1}{\alpha_2-1}\right)\right]
\hspace{0.85cm}(\mathbf{\alpha_2>2}).$ (75)

Moreover, just for completeness, let us mention the special case $\beta_1=\beta_2=1$, that written for the generic variable $X$, becomes
$\displaystyle f(x\,\vert\,\alpha_1,\alpha_2) \!\!$ $\displaystyle =$ $\displaystyle \frac{1}{\mbox{B}(\alpha_1,\alpha_2)}
\cdot \rho_z^{\,\alpha_1-1}\!\cdot\!
(1+\rho_z)^{\,-(\alpha_1+\,\alpha_2)},$ (76)

`known' (certainly not to me before I was attempting to write these subsection) as Beta prime distribution [34], with parameters $\alpha$ and $\beta$:
$\displaystyle f(x\,\vert\,\alpha,\beta) \!\!$ $\displaystyle =$ $\displaystyle \frac{1}{\mbox{B}(\alpha,\beta)}
\cdot x^{\,\alpha-1}\!\cdot\!
(1+x)^{\,-(\alpha+\,\beta)}\,.$ (77)

The name of the distribution is clearly due to the special function resulting from normalization. It is `prime' in order to distinguish it from the more famous (and more important as far as practical applications are concerned) Beta distribution which arises quite `naturally' when inferring the parameter $p$ of the Bernoulli trials, in the light of $x$ successes in $n$ trials (essentially the original problem tackled by Bayes [19] and Laplace [20]), and then used as conjugate prior of the binomial distribution (see e.g. Ref. [30] as well as Ref. [1] for practical applications). The Beta prime distribution is actually what has been independently derived in Sec. [*] to describe $\rho_\lambda$, although the beta special function was not used there, nor in Sec. [*].