# Multiple permutations with varying probabilities

• May 5th 2013, 10:54 AM
ptt
Multiple permutations with varying probabilities
Hi all, first time here so I hope I'm in the right place. If not then an indication of where this should go would be great.

The situation is this: I have 11 variables, each with 5 possible states, 0 through to 4. The probability of each variable being in each state is different:
0 is 0.314055
1 is 0.425012
2 is 0.211677
3 is 0.045687
4 is 0.003568
With 11 variables each being 0 to 4 then there are a total of 45 different "total" states, i.e. the sum of the states for each variable can range from 0 (all at state 0) to 44 (all at state 4).

While it is easy enough to work out how many permutations will give us each state, what I am trying to calculate is the probability for each "total" state, e.g. what is the probability of the sum of the states being 22 (or whatever). Any ideas other than the long way of going through each permutation?
• May 5th 2013, 08:07 PM
chiro
Re: Multiple permutations with varying probabilities
Hey ptt.

The first thing to do is to take your probabilities and form a joint distribution.

After you do this, then create a routine to evaluate a condition. For the sum of states, you will need to use a couple of for loops (or do loops) and fix the first value and inside a new loop pick a value for the second variable and so on right until the last variable, and get that specific probability.

Then when it finishes, if you have added up all the probabilities then you will get the final probability.

You will need to implement these functions yourself or use some statistics package that has a querying language and create instructions for that querying language to get the answer.