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

2013-09-27 Thread Daπid
On 26 September 2013 10:02, Daπid davidmen...@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

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

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

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

2013-09-26 Thread Daπid
On 25 September 2013 19:41, David Goldsmith d.l.goldsm...@gmail.com wrote: the 'angles' that describe the position undergo a random walk [actually, it would seem that they don't, since they too fail the varying-as-white-noise test], so the particle tends to move in the same direction over

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

2013-09-25 Thread Neal Becker
David Goldsmith wrote: Is this a valid algorithm for generating a 3D Wiener process? (When I graph the results, they certainly look like potential Brownian motion tracks.) def Wiener3D(incr, N): r = incr*(R.randint(3, size=(N,))-1) r[0] = 0 r = r.cumsum() t =

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

2013-09-25 Thread Warren Weckesser
On Wed, Sep 25, 2013 at 9:36 AM, Neal Becker ndbeck...@gmail.com wrote: David Goldsmith wrote: Is this a valid algorithm for generating a 3D Wiener process? (When I graph the results, they certainly look like potential Brownian motion tracks.) def Wiener3D(incr, N): r =

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

2013-09-25 Thread Warren Weckesser
On Wed, Sep 25, 2013 at 12:51 PM, Warren Weckesser warren.weckes...@gmail.com wrote: On Wed, Sep 25, 2013 at 9:36 AM, Neal Becker ndbeck...@gmail.com wrote: David Goldsmith wrote: Is this a valid algorithm for generating a 3D Wiener process? (When I graph the results, they certainly

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

2013-09-25 Thread David Goldsmith
Thanks, guys. Yeah, I realized the problem w/ the uniform-increment-variable-direction approach this morning: physically, it ignores the fact that the particles hitting the particle being tracked are going to have a distribution of momentum, not all the same, just varying in direction. But I

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

2013-09-25 Thread Warren Weckesser
On Wed, Sep 25, 2013 at 1:41 PM, David Goldsmith d.l.goldsm...@gmail.comwrote: Thanks, guys. Yeah, I realized the problem w/ the uniform-increment-variable-direction approach this morning: physically, it ignores the fact that the particles hitting the particle being tracked are going to have