On Fri, Sep 27, 2013 at 9:00 AM, Daπid <davidmenhur@gmail.com> wrote:
>
>
> On 26 September 2013 10:02, Daπid <davidmenhur@gmail.com> wrote:
>>
>> 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.
>
> 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).
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.
exp(-(x**2 + y**2 + z**2)) = exp(-x**2) * exp(-y**2) * exp(-z**2)
--
Robert Kern