jeudi 12 avril 2018

How can I generate random numbers given I have probability of varous ranges specified in python

I want to fill in the dummy data of attendance. I want that,for example, 60% students have attendance in the range of 70-100,25% in the range of 40-60 and 15% in the range of 0-40. How can I generate this using random numbers in Python. Is there any inbuilt function for this? I know that numpy.random.choice allows to predefine the probabilities of discrete numbers but is there any way to specify probabilities of bins/ranges?




Aucun commentaire:

Enregistrer un commentaire