Using the Box-Muller transformation

PHYSICS · Subjective · Fermi University Physics · Mathematical Methods for Physics · Probability, statistics and stochastic methods · Probability, statistics and stochastic methods

Error, Chance and the Machine, Ch Monte Carlo integration and variance reduction

Problem

Using the Box-Muller transformation, z1=−2ln⁡u1 cos⁡(2πu2),z2=−2ln⁡u1 sin⁡(2πu2),z_1 = \sqrt{-2\ln u_1}\,\cos(2\pi u_2), \qquad z_2 = \sqrt{-2\ln u_1}\,\sin(2\pi u_2), compute the pair of standard normal deviates (z1,z2)(z_1, z_2) generated from the uniform pair u1=0.40u_1 = 0.40, u2=0.70u_2 = 0.70 (both drawn from Unif(0,1)\mathrm{Unif}(0,1)). Give both values to three significant figures.

Browse the problem library