# Thread: Probability Simulation Software Recommendation

1. ## Probability Simulation Software Recommendation

I am looking for software recommendations that will allow me to define a known multi-level game for the purposes of running simulations to determine the probability of certain outcomes. Because of the complexity of the game, I believe this is the only practical way of determining such. Would some kind of Monte Carlo analysis software be able to do this? I am on a Mac but have access to Windows via WMware Fusion. Thanks in advance, Brian.

2. what type of simulation it is? like is it static or dynamic?
if you wanted complex level dynamic simulation then use Arena .
if it is more of programming then you can use R, Matlab or C/C++.

3. Hey, vinux, thanks for the response. The game or system that I am trying to model and simulate for probability calculations is 100% static. There are just too many possible permutations for me to calculate by hand, which is why I am wanting to do this by computer program. I have R but have never used it before, so will need to figure out how to program this in R first. But it is helpful to know that this is possible with that software program. Any link to examples on the web that might be similar to what I am describing here would be helpful. Thanks, Brian.

4. Can you explain what it is you want to simulate? That might help us a little more.

5. Dason, sure thing. I will try to make this as clear and simple as possible. This is a six-level static game with nine possible outcomes per level:

// Explanation of Terms
A = Advance to Referenced Level
R = Replay Referenced Level
D = Drop to Referenced Level
C = Special Credit (Game Ends)
E = Elimination (Game Ends)
W = Win Game
# = Level Reference

// Game Structure
LEVEL 1 = A2,A2,R1,C1,E,E,E,E,E
LEVEL 2 = A3,A3,R2,R2,D1,E,E,E,E
LEVEL 3 = A4,A4,R3,R3,R3,E,E,E,E
LEVEL 4 = A5,A5,R4,D3,D3,D2,E,E,E
LEVEL 5 = A6,A6,R5,R5,D4,D4,E,E,E
LEVEL 6 = W,C6,C6,E,E,E,E,E,E

I am trying to determine the probability of advancing from one level to the next or winning the game at Level 6, on a level by level basis. For Levels 1, 3, and 6, I am able to do these calculations quickly and easily because the total number of permutations is small. However, the number of possible outcomes increases dramatically at Levels 2, 4, and 5, because of the chances of dropping one or two levels as part of the game sequence.

Where replays are concerned in these calculations, I am wanting to go at least 10 degrees deep. So, for instance, take Level 3 for example, the calculation of probability to advance to Level 4 would look like this:

(A4)+(R3^1*A4)+(R3^2*A4)+(R3^3*A4)+(R3^4*A4)+(R3^5*A4)+(R3^6*A4)+(R3^7*A4)+(R3^8*A4)+(R3^9*A4)+(R3^10*A4)

So, I am wanting to calculate (mathematically or through simulation) the probability of advancing from:

LEVEL 2 TO LEVEL 3
LEVEL 4 TO LEVEL 5
LEVEL 5 TO LEVEL 6

Because the system described above is static, the parameters to advance from one level to the next are definable. I have those definitions, but do not know what software program is best for this or necessarily how to program into such. I am not completely ignorant when it comes to programming and believe that I could probably pick it up without a lot of difficulty, but a little guidance or links to similar references to what I am trying to do would be extremely helpful.

7. Most programming statistical software (e.g. SAS, R, etc) should be able to do what you want, as long as you have the knowledge to program the rules in.

Coincidentally, my co-worker and I just programmed a relatively elegant program for the probability of drawing x red balls from a bag of y balls (having two colors). Gets kind of fun when you get into it.

Coincidentally, my co-worker and I just programmed a relatively elegant program for the probability of drawing x red balls from a bag of y balls (having two colors). Gets kind of fun when you get into it.
Isn't that just a hypergeometric distribution? Or do you not know how many of each type there are in the bag?

9. Link, would you be willing to share the code you have written with me so that I can use it as a reference when learning to code R?

10. Originally Posted by Dason
Isn't that just a hypergeometric distribution? Or do you not know how many of each type there are in the bag?
Good point! We set it up so that we wouldn't know how many of each type. Though thinking back, it would have been much easier if I had used that distribution. We derived the equations ourselves in the program.

Good point! We set it up so that we wouldn't know how many of each type. Though thinking back, it would have been much easier if I had used that distribution. We derived the equations ourselves in the program.
Did you find anything interesting? Like if you keep k and n the same is the pdf for x a discrete uniform? I should look into it theoretically but my quick simulation is suggesting that.

12. It sounds like you could simulate this game with Markov matrices. In fact, this sounds like a textbook example of a finite state Markov chain.

13. Do each of the 9 outcomes for each level have equal probability?

14. Mathematica would do this also.

15. Originally Posted by squareandrare
Do each of the 9 outcomes for each level have equal probability?
Yes, each of the 9 outcomes at each level are equally probably of happening. I have access to Mathematica, MATLAB, and R, but do not know how to program in any of them. I guess I am going to have to learn.