[Tutor] Generating random numbers

Venkatesh Babu venkatbabukr at yahoo.com
Thu Dec 4 13:12:24 EST 2003


Hi,

I have a question related to generation of random
numbers based on some probability distribution

In my simulation program I have to generate random
numbers based on same kind of distribution, say normal
distribution, but for different independent purposes:
like determining number of agents in a place,
determination ages of each agent. So, there are more
than one normal distributions, each having its own
mean and variance. In such a situation I guess we
should create "Random" objects corresponding to each
purpose and call normalvariate function of these
objects with the corresponding mean and variance.

Is the above method proper or can we do away by just
calling the normalvariate function given in the random
module instead of creating "Random" objects.

Thank you,
Venkatesh


__________________________________
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/



More information about the Tutor mailing list