For Beta sampling by gamma ratios, use either preceding chi-squared distribution algorithm to generate independent and , and return
Write , so and . The Jacobian determinant is . The joint probability density function after this change of variables factors as
Integrating out proves the Beta distribution for .
A new method is Beta sampling by uniform order statistics. Generate independent uniforms, sort them, and return the th order statistic. There are uniforms below the selected value and above it. Selecting their labels and placing the selected observation in gives density
which is the Beta distribution density. The integrality of the shape parameters is what makes this order-statistic construction possible.