vendredi 10 mars 2017

How to generate random number from specific distribution?

I have two PDF such as:

y1=trapz.pdf(x2,1.0,1.0, loc=-376170.59599952179, scale=628464.74488707643)
y2=a1*stats.norm.pdf(x,mu1,sigma1)+(1-a1)*stats.norm.pdf(x,mu2,sigma2)

How to generate random number from those PDF?

Aucun commentaire:

Enregistrer un commentaire