[SciPy-user] Generating random variables in a joint normal distribution?
Parvel Gu
parvel.gu at gmail.com
Thu Nov 1 02:08:38 EDT 2007
Hi,
Thanks so much for the reply. I could go furthur in this problem.
And here is the following issue:
In my understanding, the continues calls to random.multivariate_normal
would get a serials of random vairables which are all following the
joint normal distribution. Then what about how to reset the random
generating in each iteration?
Assuming that I have to simulate something for 50 iterations then to
get the average value. In each iteration I need a serial of random
pairs which follows the joint normal distrubition. The interations are
expected to be independent to each other.
Thus:
In iteration 1:
serial = []
in sub loop
serial.append(random.multivariate_normal(m, cov))
...
And in iteration 2, I want a fresh serial which should not be affected
by the previous one s. Is there any problem to empty the serial
then still call random.multivariate_normal(m, cov) ?
In my understanding if there is no refresh or something performed to
the internal random generator, the random.multivariate_normal would
continue to generate variables in the context of the previous ones.
Br,
Parvel
More information about the SciPy-User
mailing list