jeudi 20 juin 2019

Two segment probability distribution

I need to generate random numbers in MATLAB for a parameter X that follows two-segment lognormal distribution as follows:

X(<= 20), median = 61, standard deviation = 1.33
X(> 20), median = 33.3, standard deviation = 0.605

Right now, I am alternately drawing one sample from each distribution. Then, I either accept or reject this sample, depending if it is less than equal to or greater than 20. Am I doing it correctly? If not, any suggestions will be helpful.




Aucun commentaire:

Enregistrer un commentaire