Dear all,
I am trying to make simulations of realisations of a random variable associated with probabilities I found empirically.
To be clear, suppose I have a random variable which can take values {1,2,3,4,5} with probabilities respectively {.2,.3,0,.1,.4}.
What I am trying to do is to randomly select one entry of the vector (1,2,3,4,5) where each entry has probability to be chose (respectively) taken from the vector (.2,.3,0,.1,.4).
How can I do?
Thanks in advance for the help!
Best
Luca Gagliardone
I am trying to make simulations of realisations of a random variable associated with probabilities I found empirically.
To be clear, suppose I have a random variable which can take values {1,2,3,4,5} with probabilities respectively {.2,.3,0,.1,.4}.
What I am trying to do is to randomly select one entry of the vector (1,2,3,4,5) where each entry has probability to be chose (respectively) taken from the vector (.2,.3,0,.1,.4).
How can I do?
Thanks in advance for the help!
Best
Luca Gagliardone
Comment