[Numpy-discussion] Valid algorithm for generating a 3D Wiener Process?

Robert Kern robert.kern at gmail.com
Fri Sep 27 04:27:47 EDT 2013

On Fri, Sep 27, 2013 at 9:00 AM, Daπid <davidmenhur at gmail.com> wrote:
> On 26 September 2013 10:02, Daπid <davidmenhur at 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

  exp(-(x**2 + y**2 + z**2)) = exp(-x**2) * exp(-y**2) * exp(-z**2)

Robert Kern
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20130927/3449a8d9/attachment.html>

More information about the NumPy-Discussion mailing list