# Why does $\frac{X}{X + Y} \sim\mathrm{ Beta}(\frac{n}{2}, \frac{m}{2})$?

If random variables $X \sim \mathrm{Gamma}(\frac{n}{2}, \frac{1}{2})$ and $Y \sim \mathrm{Gamma}(\frac{m}{2}, \frac{1}{2})$, where $m$ and $n$ are constants, why does $\frac{X}{X + Y} \sim \mathrm{Beta}(\frac{n}{2}, \frac{m}{2})$?

In general, can we just combine Gamma-distributed variables like this into Beta-distributed ones?

-
You might want to proof-read your question a little: it is $Y$, (not $X$) that has $\Gamma(\frac{m}{2},\frac{1}{2})$ distribution. Also, you need to know the joint distribution of $X$ and $Y$ in order to say much about $\frac{X}{X+Y}$, and the result that you want to understand is derived on the assumption that $X$ and $Y$ are independent. In other words, you cannot "just combine..." unless the Gamma random variables are known (or assumed) to be independent, and have the same scale (or rate) parameter (cf. Julien B.'s answer). – Dilip Sarwate Dec 4 '12 at 23:04
Sorry, you are right. I must proofread in the future. – David Faux Dec 5 '12 at 6:35

Lemma. If $X \sim \Gamma(\alpha,\lambda)$ and $Y \sim \Gamma(\beta,\lambda)$ are independent, then $Z = \frac{X}{X+Y}\sim B(\alpha,\beta)$ and is independent of $X+Y \sim \Gamma(\alpha+\beta,\lambda)$.
This can be shown by computing the law of the couple $(Z,X+Y)$ using a change of variables.
A nice application : if $X \sim B(\alpha,\beta)$ and $Y \sim \Gamma(\alpha+\beta,\lambda)$ are independent, then $XY \sim \Gamma(\alpha,\lambda)$
Thank you! Why does $XY \sim \Gamma(a, \lambda)$? – David Faux Dec 5 '12 at 6:35
According to the lemma $(X,Y) \overset{d}{=} (\frac{Z_\alpha}{Z_\alpha+Z_\beta},Z_\alpha+Z_\beta)$ as a couple, where $Z_\alpha \sim \Gamma(\alpha,\lambda)$ and $Z_\beta \sim \Gamma(\beta,\lambda)$ are independent. Taking the product, we get $XY \overset{d}{=} \frac{Z_\alpha(Z_\alpha+Z_\beta)}{Z_\alpha + Z_\beta}=Z_\alpha$. – Ju'x Dec 5 '12 at 8:45