vendredi 23 décembre 2016

Weighted random numbers in Python from a list of values

I am trying to create a list of 10,000 random numbers between 1 and 1000. But I want 80-85% of the numbers to be the same category( I mean some 100 numbers out of these should appear 80% of the times in the list of random numbers) and the rest appear around 15-20% of the times. Any idea if this can be done in Python/NumPy/SciPy. Thanks.




Aucun commentaire:

Enregistrer un commentaire