samedi 30 juillet 2016

Random Number following a certain distribution in python

I'm stuck with a problem. I have to implement an algorithm in python which needs a random number X such as Pr[X >= k] = 1/k. I don't know if already exists a distribution which can give me this exact value or if there is a way to implement this random generator using the simple random python library. Is there a way to do this? Thank you in advance for your help!




Aucun commentaire:

Enregistrer un commentaire