# Distribution of the ratio of a squared Gamma variable to another Gamma random variable

I'm trying to figure out a distribution of (average) velocities v in capillary network where I know the diameters d as well as the capillary lengths l are gamma distributed and the average velocity in a capillary is related via v~d²/l (I assume constant pressure differences). I know the ratio of two gamma distributions ends up in a beta prime distribution. However I'm not sure what to do about the square.

In concise form: Let

$$Y = \frac{X^2}{Z} \quad \text{ where} \quad X \sim \text{Gamma}(a,b) \quad \text{ and } \quad Z \sim \text{Gamma}(\alpha,\beta)$$ What's the distribution of $Y$?

• If this is self-study please add the self-study and tell us what you have tried so far and where you got stuck. – mdewey Aug 16 '17 at 13:51
• More research than self study, it's not a question from a textbook or anything. Im trying to figure out a distribution of (average) velocities in capillary network where I know the diameters as well as the capillary lengths are gamma distributed and the average velocity in a capillary is related via v~d²/l. I know the ratio of two gamma distributions ends up in a beta prime distribution, however I'm not sure what to do about the square. – Moritz Aug 16 '17 at 14:13
• I think I would edit your comment background information into the question as it may help someone (not me sadly) to answer. – mdewey Aug 16 '17 at 14:15
• Thank you for continuing to work on your question. The background you have provided raises a potentially important issue: how likely is it that $X$ (capillary diameter) and $Z$ (capillary length) are independent? Independence doesn't seem plausible for many kinds of capillaries. Lack of independence can have a profound effect on the distribution of $Y$. Have you considered analyzing the individual values of $d^2/l$ in your data directly to learn about their distribution? – whuber Aug 16 '17 at 16:54

If $X$ and $Z$ are independent, write the question as:

$$Y = \frac{X^2}{Z} = W V \quad \text{ where } W = X^2 \quad \text{ and } \quad V = \frac{1}{Z}$$

Then, $W$ has pdf $f(w)$: and $V \sim \text{InverseGamma}(\alpha, \beta)$ with pdf $g(v)$: Then, the pdf of the product $Y = W V$ can be obtained as $h(y)$: where I am using the TransformProduct function from mathStatica/Mathematica to do the nitty-gritties, and HypergeometricU[a,b,z] denotes the confluent hypergeometric function $\frac{1}{\Gamma(a) }\int _0^{\infty } t^{a-1} (1+t)^{b-a-1} e^{-tz} d t$, which is relatively compact compared to other approaches. If this is a homework problem, I would avoid signing up for that course :)

.

Quick Monte Carlo check - against theoretical solution derived above when $a =4$, $b = 3$, $\alpha = 1.1$, and $\beta = 7$ Looks fine :)

• The work, as usual, is nice, but I would like to suggest you have left out the most critical part: your assumption of independence. I am hoping the OP will indicate whether that is appropriate here. – whuber Aug 16 '17 at 17:52
• Minds crossed! ~ added the independence assumption while you were writing that comment. So the issue for the OP is: is the diameter of capillaries related to their length?? – wolfies Aug 16 '17 at 18:00
• Thank you very much. The assumption of independence is fair. Also, this is not for homework, but more for a masochistic side project of mine :) – Moritz Aug 17 '17 at 8:51