TITLE: Why does $\frac{X}{X + Y} \sim\mathrm{ Beta}(\frac{n}{2}, \frac{m}{2})$?
QUESTION [5 upvotes]: 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?

REPLY [4 votes]: David. The equality in law that you mention is a special case of the following

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)$