Re: random numbers according to user defined distribution ??



On Aug 6, 8:26 pm, Steven D'Aprano <st...@REMOVE-THIS-
cybersource.com.au> wrote:
On Wed, 06 Aug 2008 15:02:37 -0700, Alex wrote:
Hi everybody,

I wonder if it is possible in python to produce random numbers according
to a user defined distribution? Unfortunately the random module does not
contain the distribution I need :-(

This is a strange question. Of course you can -- just write a function to
do so! Here's some easy ones to get you started:

...

There's no general way to create a random function for an arbitrary
distribution. I don't think there's a general way to *describe* an
arbitrary random distribution.

What about the quantile function?
.



Relevant Pages