It is widely used in statistical sampling, and is an easy to run, elegant way to come up with a standard normal model. In fact, since it can be used to generate normally distributed random numbers, it was originally developed as a better and computationally efficient alternative to inverse sampling.
Running the Box Muller Transformation
Let’s say U1 and U2 are our original independent random variables; they are uniformly distributed in the interval (0,1). The Box-Muller transformation creates new Z0 and Z1; independent, random variables that have a standard normal distribution:
The derivation here is based on the way we can represent any point in the X,Y Cartesian plane through polar coordinates, with a radius and an angle.
The Polar Form of the Box Muller Transform
Although the same points are being mapped to as with the ‘basic form’ of the Box-Muller transform, given above, this alternate form is sometimes preferred because it replaces sine and cosine with simple divisions and so is often more computationally efficient.
Goodman, Jonathan. Lecture Notes on Monte Carlo Methods. Chapter 2: Simple Sampling of Gaussians Retrieved from https://www.math.nyu.edu/faculty/goodman/teaching/MonteCarlo2005/notes/GaussianSampling.pdf on March 16, 2018
Vafa, Keyon. The Box Muller Transform.
Retrieved from http://keyonvafa.com/box-muller-transform/ on March 16, 2018
If you prefer an online interactive environment to learn R and statistics, this free R Tutorial by Datacamp is a great way to get started. If you're are somewhat comfortable with R and are interested in going deeper into Statistics, try this Statistics with R track.Comments? Need to post a correction? Please post on our Facebook page.