Discussion:
[Numpy-discussion] Defining a white noise process using numpy
Daniel Bliss
2015-08-26 22:51:27 UTC
Permalink
Hi all,

Can anyone give me some advice for translating this equation into code
using numpy?

eta(t) = lim(dt -> 0) N(0, 1/sqrt(dt)),

where N(a, b) is a Gaussian random variable of mean a and variance b**2.

This is a heuristic definition of a white noise process.

Thanks,
Dan
Neal Becker
2015-08-27 11:23:25 UTC
Permalink
Post by Daniel Bliss
Hi all,
Can anyone give me some advice for translating this equation into code
using numpy?
eta(t) = lim(dt -> 0) N(0, 1/sqrt(dt)),
where N(a, b) is a Gaussian random variable of mean a and variance b**2.
This is a heuristic definition of a white noise process.
Thanks,
Dan
You want noise with infinite variance? That doesn't make sense.
Anne Archibald
2015-08-27 11:37:54 UTC
Permalink
On Thu, Aug 27, 2015 at 12:51 AM Daniel Bliss <***@gmail.com>
wrote:

Can anyone give me some advice for translating this equation into code
Post by Daniel Bliss
using numpy?
eta(t) = lim(dt -> 0) N(0, 1/sqrt(dt)),
where N(a, b) is a Gaussian random variable of mean a and variance b**2.
This is a heuristic definition of a white noise process.
This is an abstract definition. How to express it in numpy will depend on
what you want to do with it. The easiest and most likely thing you could
want would be a time series, with N time steps dt, in which sample i is the
average value of the white noise process from i*dt to (i+1)*dt. This is
very easy to write in numpy:

1/np.sqrt(dt) * np.random.randn(N)

Anne

Loading...