Independence means for all Borel sets . For variables with a joint density this is equivalent to factorization of that density into the two marginal densities almost everywhere.
The inverse transformation is , , on , . Its absolute Jacobian determinant is . Multiplying the independent gamma densities by it gives
The density is zero outside that support. Integrating in with the gamma integral gives
It is a beta density. Its normalization also proves the beta integral . The joint density consequently factors as this normalized beta density times
Thus is gamma with shape and rate , and are independent.
Finally . All relevant first moments are finite, and independence gives , while . Hence
This identity follows from the particular beta-gamma independence here; a general ratio of random variables would not permit moving expectation through division.
The same beta integral with one additional power of gives
Subtracting the square of the mean yields
At and , therefore,
Their equality also follows by reflecting every uniform observation via .
For nonnegative integers , repeated integration by parts gives the beta integral . Multiplying the stated density by and using this formula yields
Cancellation gives