<div dir="ltr"><span style="font-family:arial;font-size:small">On Fri, Sep 27, 2013 at 9:00 AM, Daπid <<a href="mailto:davidmenhur@gmail.com">davidmenhur@gmail.com</a>> wrote:</span><br>><br>><br>> On 26 September 2013 10:02, Daπid <<a href="mailto:davidmenhur@gmail.com">davidmenhur@gmail.com</a>> wrote:<br>
>><br>>> The simplest way is to do it in cartesian coordinates: take x, y, and z independently from N(0,1). If you want to generate only one normal number per step, consider the jacobian in the angles.<br>><br>
> Actually, this is wrong, as it would allow displacements (at 1 sigma) of 1 along the axis, but up to sqrt(3) along diagonals. What you actually want is a multivariate normal distribution with covariance proportional to the identity (uncorrelation between axis and isotropy).<br>
<br>No, you were right the first time. Sampling 3 independent N(0,1) variates is equivalent to an isotropic 3D multivariate normal. This is a special property of the normal distribution because of the behavior of exp(-x**2). The multivariate normal PDF can be decomposed into a product of univariate normals.<div>
<br></div><div> exp(-(x**2 + y**2 + z**2)) = exp(-x**2) * exp(-y**2) * exp(-z**2)<br><br>--<br>Robert Kern<br></div></div>