Combination - Probability of at least 5 of 9 independent variables

efoc

New member
Joined
Dec 17, 2020
Messages
7
Hi all,

Hoping you can help me with a problem, or point me in the right direction. I am trying to calculate the probability of at least 5 of 9 independent variables occurring. The twist here is that each variable has a different probability. My specific probabilities are as follows:

1608217562764.png

However, I'm also hoping to gain a more general understanding of this. I'm aware of combinations, but not sure how to apply that to discrete events with different probabilities. Thanks so much for your help!
 
Your probabilities sum to greater than 1.
I only count 7 probabilities there, you mention 9 independent variables.
 
Your probabilities sum to greater than 1.
I only count 7 probabilities there, you mention 9 independent variables.

Right, sorry see below for an updated data set, but no need to solve for this exact instance.

These are each independent Bernoulli variables with outcome either 0 or 1. So A has Pa probability of being 0 and (1-Pa) probability of being 1, for example.


1608227862764.png
 
I do not see a problem with the sum being greater than 1. If you have two biased coins with p(1 coin = H) = .8 and p( 2nd coin = H) = .7 where is the problem with the sum >1
 
Right, sorry see below for an updated data set, but no need to solve for this exact instance.

These are each independent Bernoulli variables with outcome either 0 or 1. So A has Pa probability of being 0 and (1-Pa) probability of being 1, for example.


View attachment 23830
What is T1?
 
Pick any 5 out of the 9. Can you tell me that probability?

right, yes :

nCr = n! / r!(n-r)!

where n is 9 and r is 5.

If Pa = Pb = Pc = ... = Pi then the answer would be Pa^5 * (1-Pa)^4 * nCr.

My issue is in applying this combination formula where Pa =/= Pb
 
Last edited:
Ok. Given the varying individual probabilities you don't really have any choice but brute force.

You have to take each possible combo of 5, take the product of the elements probability of occurrence, and then sum this
over all the combinations.

Do you have some decent math software? This is a few lines of code in Mathematica.
 
Thanks Romsek - I ended up using an excel formula:

=MOD(QUOTIENT(ROW()-1,2^(COLUMN()-1)),2)

I dragged this across 9 columns and 512 (or 2^9) rows. I filtered for more than 5 or more "ones", and will sum the probability of each possible event.

I did some research and the best solution is through a Poisson Binomial Distribution. However, since excel doesn't have any formulas for this, and since my coding knowledge is weak, I went for the brute force approach.

Thanks for your help.
 
So I'm no expert on Mathematica (I've never used it). But I just ran this and despite some syntax issues I'm picking up that this is not calculating at least 5 out 9, and is only calculating for 5 out of 9 precisely. Am I wrong here?

I double checked my Matrix, and I don't have any duplicate scenarios, they all have at least 5 "True" and i have the appropriate 256 scenarios mapped.
 
right, yes :

nCr = n! / r!(n-r)!

where n is 9 and r is 5.

If Pa = Pb = Pc = ... = Pi then the answer would be Pa^5 * (1-Pa)^4 * nCr.

My issue is in applying this combination formula where Pa =/= Pb
As you know, Pa = Pb = Pc = ... = Pi is not true. Literally pick 5 out of the 9, say a, c, d, g and h. What is the probability that you pick does exact 5? You need to do this with each way of picking 5 and in the end add up these results.
 
So I'm no expert on Mathematica (I've never used it). But I just ran this and despite some syntax issues I'm picking up that this is not calculating at least 5 out 9, and is only calculating for 5 out of 9 precisely. Am I wrong here?

I double checked my Matrix, and I don't have any duplicate scenarios, they all have at least 5 "True" and i have the appropriate 256 scenarios mapped.

sigh... at least... bloody ****... righto let me fix it. Yep we get the same answer.

Clipboard01.jpg
 
Last edited:
Ouch you want at least 5. Possibly, based on Romsek's earlier post, he may have assumed exactly 5, not at least 5.
 
sigh... at least... bloody ****... righto let me fix it
No problem - I'm pretty confident in my answer here. This matrix isn't adaptable but I'm aiming to vary the variables through other inputs that I've modelled and determine the impact on the final outcome. Since I'm not changing the number of variables or the threshold of 5, this should work for me.
 
No problem - I'm pretty confident in my answer here. This matrix isn't adaptable but I'm aiming to vary the variables through other inputs that I've modelled and determine the impact on the final outcome. Since I'm not changing the number of variables or the threshold of 5, this should work for me.

I updated my sheet and our answers agree.
 
Top