I want to approximate a probability via Monte Carlo simulation.
This probability depends upon some randomness that happens in a system. To be more specific the system can have two states. One with 20% probability and one with 80%.
What I am currently doing is the following simulation:
- Generate a random state of the system (20% to be state 1, 80% to be state 2).
- Check if the event happens.
- Update the frequency and estimated probability accordingly.
This seems to be working fine. For example I get good results for N=1000 trials.
Now let's assume that for some reason I don't have access to the above method. Instead I want to do either of the following:
- Run 500 tests for state 2 of the system and get a probability estimate P2. Run 500 tests for state 1 and get another probability estimate P1. Get an estimator of the whole system's probability as: P = 0.2*P1 + 0.8*P2.
- Alternatively, run 800 tests for state 2 and get a P2. Then run 200 tests for state 1 and get a P1. Then calculate the whole system's probability as: P = 0.5*P1 + 0.5*P2.
My question is which of the two methods is a better or worse alternative to the main method (which if I am not mistaken is the proper Monte Carlo estimation). I try to keep the number of runs the same (1000 in total) so as to not increase the computational load.