next up previous index
Next: EM algorithm Up: Specialized Methods Previous: Specialized Methods   Index

Polar methods for the Normal

Box - Muller
Fact:
If $X$ and $Y$ are independent normals then their polar coordiantes $R=\sqrt{X^2+Y^2}, \Theta=arctan(Y/X)$ are independent, $R^2 \sim expon(2)$, $ \Theta \sim U(0,2\pi)$.

Modified to short-cut cosines and sines:
Generate a point uniformly in the disk(1): $(V_1,V_2)$.
Call $S=V_1^2+V_2^2$,

Return $X=\sqrt{\frac{-2log S}{S}}V_1$, $Y=\sqrt{\frac{-2log S}{S}}V_2$

Exercice for next time (Tuesday April 22nd):
With matlab, do the flop count for both methods:

  1. Which is faster?
  2. What is the ratio (by how much is it faster)?


Susan Holmes 2002-01-12