For two independent statistical samples from exponential distributions with positive means and , write , and . The unconstrained maximum-likelihood estimators are and ; under equality of the means the common fitted mean is . Dividing the constrained maximum likelihood function by its unrestricted maximum gives the displayed likelihood ratio. Its maximum is one at , so the likelihood-ratio test rejects for sufficiently small values, in either tail of .
Under the null hypothesis, the sums have independent gamma distributions with a common rate, so by beta sampling by gamma ratios. This permits exact calibration. For large samples with , the Wilks theorem gives . Its upper-tail probability is the asymptotic p-value. The one statistical degree of freedom is the difference between the unrestricted and constrained parameter dimensions.
Past exam of the mathematics course of the University of Cambridge 2008 iii Paper 47 3 b iii Solution Created 2026-10-03 Updated 2026-10-14
For Beta sampling by gamma ratios, use either preceding chi-squared distribution algorithm to generate independent and , and returnWrite , so and . The Jacobian determinant is . The joint probability density function after this change of variables factors asIntegrating 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 densitywhich is the Beta distribution density. The integrality of the shape parameters is what makes this order-statistic construction possible.