Aim is to generate numbers following any distribution given maximum and minimum values. In this case, I am trying to make sure 50 numbers generated between 2M and 20M follow the weibull distribution or a gamma distribution.
I have only been able to generate the random numbers so far but unsure how to make them follow a certain distribution.
import random
#generates 50 random numbers between 2M and 20M
r = random.sample(range(2000000, 20000000), 50)
Can I use weibull_min.rvs() to do this? How is it different from weibull_max.rvs()?
Aucun commentaire:
Enregistrer un commentaire