To generate a chi-squared variable with one degree of freedom by the Marsaglia polar method, repeatedly draw independent uniformly on until . Return
The accepted point is uniform on the unit disk; its squared radius is uniform on and independent of angle. The radial rescaling gives a standard normal coordinate , hence . The same accepted pair also supplies another independent standard normal coordinate, if needed. The proof stages below follow the four printed sampler labels.