Box-muller Transform

A Box-Muller transform is a method of generating pairs of independent normally distributed random numbers, given a source of uniformly distributed random numbers. There are two kinds: (1) Given r and φ independently uniformly distributed in (0,1], compute:
z_0 = \cos(2 \pi \varphi) \cdot \sqrt{-2 \ln r}
and
z_1 = \sin(2 \pi \varphi) \cdot \sqrt{-2 \ln r}.
(2) Given x and y independently uniformly distributed in [−1,1], set R = x2 + y2. If R = 0 or R > 1, throw them away and try another pair (x, y). Then, for these filtered points, compute:
z_0 = x \cdot \sqrt{\frac{-2 \ln R}{R}}
and
z_1 = y \cdot \sqrt{\frac{-2 \ln R}{R}}.
The second method is typically faster because it uses only one transcendental function instead of at least two, even though it throws away 1 − π/4 ≈ 21.46% of the total input uniformly distributed random number pairs generated, i.e. throws away 4/π − 1 ≈ 0.2732 uniformly distributed random number pairs per Gaussian random number pair generated, requiring 4/π ≈ 1.2732 input random numbers per output random number.

External links

 

<< PreviousWord BrowserNext >>
215 bc
216 bc
217 bc
kyniska
cyclopentadiene
1 e 26 kg
simputer
mebibyte
list of patriotic songs
lucy maud montgomery
anachronism
benjamin o. davis jr.
hetman
bond
piast dynasty
poitou
judith of swabia
gem
cubic zirconia
steven king
chutes and ladders
wladislaus i herman of poland
boleslaus iii of poland
222 bc
rj 45
casimir i of poland
pashtunistan
reginald bretnor
genius of the species
pseudosphere
gemology
curvature
xa
list of woods
limonite
craig barrett (intel president)
amphitrite
alluvial deposit
glacial till
amphitryon
boulder
amphion and zethus
romulus and remus
amphion