# Distribution of quotient of random variables

If $X$ and $Y$ are independent random variables such that $X\sim \Gamma(a,b)$ and $Y\sim\Gamma(a,c)$. What is the distribution of random variable $\frac{Y}{X+Y}$? Any help with this ?

• Are they independent? – Henry Nov 17 '15 at 23:52
• Yes, they are. Forgot to mention it, sorry. – brick Nov 18 '15 at 9:08
• It could be easier if $X\sim \Gamma(a,b)$ and $Y\sim\Gamma(c,b)$ in which case you could have something like $\frac{Y}{X+Y}\sim \text{Beta}(c,a)$ – Henry Nov 18 '15 at 11:05
• If you forgot to mention something important, it's best to edit that information into the question statement. That way, new readers don't have to go through the entire comment thread to find the relevant information. – Greg Martin Nov 20 '15 at 0:25
• It's done now, @GregMartin. Thanks for the reminder! – brick Nov 20 '15 at 17:14

To find the p.d.f of the ratio $\frac{Y}{X+Y}$, let us first write its c.d.f. Since $X$ and $Y$ are always positive, their ratio is also positive and, therefore, for $0\leq t\lt1$ we can write:

$P\left(\frac{Y}{X+Y}\leq t\right)=P\left(Y\leq \frac{t}{1-t}X\right)=\int_{0}^{\infty }\left(\int_{0}^{\frac{t}{1-t}x}f_{X}(x)f_{Y}(y)dy\right)dx$

as $f_{X}(x)f_{Y}(y)$ is the joint p.d.f. of $X$ and $Y$ (the variables are indipendent) and $y$ goes from $0$ to $\frac{t}{1-t}x$ when $x$ goes from $0$ to $\infty$.

The p.d.f. is the derivative of the c.d.f. so we can write:

$\frac{d}{dt}P\left(\frac{Y}{X+Y}\leq t\right)=\frac{d}{dt}\int_{0}^{\infty }\left(\int_{0}^{\frac{t}{1-t}x}f_{X}(x)f_{Y}(y)dy\right)dx=\int_{0}^{\infty }\frac{d}{dt}\left(\int_{0}^{\frac{t}{1-t}x}f_{Y}(y)dy\right)f_{X}(x)dx$

let $F_{Y}(y)$ be a primitive for $f_{Y}(y)$

$\frac{d}{dt}\left(\int_{0}^{\frac{t}{1-t}x}f_{Y}(y)dy\right)=\frac{d}{dt}F_{Y}(\frac{t}{1-t}x)=\frac{1}{(1-t)^{2}}xf_{Y}(\frac{t}{1-t}x)$

so

$\frac{d}{dt}P\left(\frac{Y}{X+Y}\leq t\right)=\frac{1}{(1-t)^{2}}\int_{0}^{\infty }xf_{Y}(\frac{t}{1-t}x)f_{X}(x)dx$

The last integral is easy to compute but quite long, you just need to substitute the equations for the p.d.f.s, group the exponentials, make a variable change (I have $z=\left(b+\frac{ct}{1-t}\right)x$) and you'll have your p.d.f.

$\frac{\Gamma(2a)}{\Gamma^{2}(a)}c^{a}b^{a}\frac{t^{a-1}(1-t)^{a-1}}{(b+(c-b)t)^{2a}}$

If you want I can help with all the steps needed, but now I have little time to control if the results are correct.

EDIT: I changed the final result (I was wrong while grouping a factor). Now the function correctly become a $Beta(a,a)$ when $c=b$.