Monte Carlo Simulation with Two Random Variables

Hi,
I want to program a Monte Carlo Simulation in a Markov Model, where the probability of one state can take two different values. Specifically:


I have 7 Markov States with probabilities, all summing to 1. Now I want to know what happens when the probability of State 1 is replaced with either a Value X or Value Y. Consequently by picking Value X (or Value Y) for State 1, the probabilities for the States 2-7 would sum to be (1-Value X or Y)). I estimated these values ind Excel for State 2-7 for both Value X and Y based on the original distribution, so that the probabilities would sum to 1 again.


I already created a table distribution in TreeAge containing Value X and Y for the Monte Carlo Simulation.


I would now like the model to do the following in the Simulation:
1) Randomly pick either Value X or Value Y as probability for State 1
2) Distribute the "left over probability" (1-Value X or Y) across State 2-7 based on the original probability distribution factor, so that all probabilities sum up to 1 again.


Any ideas on how to do this? Would be grateful for some help!
Thank you!

0

Comments

3 comments
  • Official comment

    I think I have a pretty good solution for you, but it's a little tricky. Click here to download an example model. Note that this model does nothing except perform the 2-factor normalization and show results related to the resulting normalized probabilities. A picture of the model is shown below.

    The model has 4 states, each of which has a baseline initial probability (0.1, 0.2, 0.3 and 0.4). The first two (a and b) also allow for variation through beta distributions, where the mean of those distributions uses the base value. If you simply run the model with no sampling, the baseline probabilities are used, and you can see that in payoff sets 2-5 in the Rankings Report.

    Probabilities a & b use formulas based on the factor. When factor = 1, the model uses samples from the a distribution and the base b probability. When factor = 2, the model uses samples from the b distribution and the base a probability.

    Because samples will push the total probability sum away from 100%, the Markov node is set for Probability Normalization, which adjusts all probabilities proportionally up or down to normalize the probability sum to 100%.

    Run PSA on the model (with factor = 1), then look at the resulting All Data Report to check the results.

    Since factor=1, the a_dist value is used, while the b_dist value is ignored. Note that in iteration 1, the sampled value a_dist is 0.08136, less than the base value of 0.1. Therfore, the total sum of probabilities prior to normalization will be less then 100%. Normalization then proportionally increases all the values (including the distribution sample). In iteration 2, the sampled value is significantly less than the baseline value, so all the probabilities are adjusted even more. In iteration 4, the sampled value is above the baseline, so all the probabilities are adjusted downward by normalization.

    If you set factor=2, then the same normalization will take place based on the b sample, using the a baseline prior to normalization.

    I hope this is helpful.

    Comment actions Permalink
  • Thank you so much! Worked like a charm!

    0
    Comment actions Permalink
  • Happy to help. Glad you were able to follow the above. It is a bit tricky.

    0
    Comment actions Permalink

Please sign in to leave a comment.

Didn't find what you were looking for?

New post