choosing random numbers with weights/probability?
kevinsl at yahoo.com
Mon Jun 21 19:47:45 CEST 1999
I've been using the whrandom.choice routine and it's very
useful. But is there any way to add weights or
probabilities of being chosen to the items in the list?
Is there any way to say that 'one' and 'two' have a 25%
chance of being chosen, and 'three' has a 50% chance?
I'm hoping there's already a module to do this... or else
I'll be writing my own..
**** Posted from RemarQ - http://www.remarq.com - Discussions Start Here (tm) ****
More information about the Python-list