Talk:Box-Muller transform

From Wikipedia, the free encyclopedia

Michael, thanks for catching my mistake regarding phi & varphi. Strange that the html markup & phi should be \varphi in tex. Any ideas on correctly numbering the two methods? --snoyes 22:28 Feb 20, 2003 (UTC)


I wonder wether those two numbers will be linked or independent from each other? May anyone tell? -- Feb 23, 2004

they are linked; they both transform a uniform distribution over the unit circle to a gaussian distribution; the difference is that the first is given in polar coordinates, while the second is in cartesian coordinates
JeffBobFrank 04:29, 4 Mar 2004 (UTC)



The second method is typically faster because it uses only one transcendental function instead of three
I can only see the need for two transcendental functions in the first method, since sin2(x) + cos2(x) = 1. I assume ×π doesn't count. --Henrygb 14:36, 20 Jul 2004 (UTC)


The discussion after the formulas says we get out uniformly distributed values, but I thought we wanted normally distributed ones. Also, I still don't quite understand the characteristics of the two formulas. The first seems to go from polar coordinates to... cartesian? More polar coords? The second seems to go from cart -> cart, but what range can I expect? The discussion suggests output values are in a unit circle, but that's not what I get (fortunately, since with a stddev of 1 it'd cut off the tails). Lunkwill 02:18, 16 Oct 2004 (UTC)

getting the uniformly distributed numbers is one step in both methods. they're then multiplied by the thing in the square root, which gives them a normal distribution. and the first one goes from polar to cart, the second from cart to cart. Frencheigh 02:46, 16 Oct 2004 (UTC)

[edit] Be Careful with the Second Method ("Polar form")

Warning: Be very careful with the second Box-Muller method given here ("Polar form"). It may not be correct as written. It would be correct if the quantities labelled as "r" under the square root signs were replaced by r-squared, because r-squared is uniformly distributed in (0,1], x/r is a cosine, and x/r is a sine. TopKatz 22:48, 9 October 2005 (UTC)

r is defined here as x2 + y2. You were probably expecting r to be the norm of (x,y). Deco 16:53, 26 May 2006 (UTC)

[edit] The Second Paragraph is in Error

The basic method takes points uniformly distributed in the unit square (not circle) and transforms them as given by the formulas listed. The polar method takes points uniformly distributed in the unit circle (note that you throw away all points with a radius or radius squared greater than 1) and transforms them. As noted above, R is the radius-squared, which is uniform (0,1]. The polar coordinates, (r, theta) are not uniformly distributed. Theta is uniformly distributed, but r is not (r-squared is uniform). In my previous sentence, I used the standard notation r for radius, not r for a uniform variable as is done in the article.

It might be helpful the write the polar form in a way that corresponds to the basic form, i.e, x/sqrt (R) is the cosine of a uniform angle ( R is the radius-squared again) and sqrt (-2 ln R) is equivalent to sqrt (-2 ln r), since both R, the radius squared, and r, which has nothing to do with a radius, are uniform (0,1]. The formulas as given should remain; I am suggesting something of the form

z = ( x/ sqrt (b)) * sqrt (c) = a sqrt (b/c)

(I have never edited before and don't feel comfortable editing the article itself)

72.134.75.20 00:49, 21 September 2006 (UTC) Al

[edit] correct myself

z = x/ sqrt (b)) * sqrt (c) = x sqrt (c/b)

72.134.75.20 00:57, 21 September 2006 (UTC) Al