I am having an issue related to probability set theory with intersection/union terms.
When calculating the union of terms or in other words, the probability that at least one terms "fails", it can be written as the following for three terms:
P(A+B+C) = P(A)+P(B)+P(C)-P(AB)-P(AC)-P(BC)+P(ABC).
My question is how to assess a problem similar to this when we are looking at the probability at least x terms out of n terms fail. For example, at least 2 out of 4. Or at least 7 out of 10. I thought I came up with the correct answer when looking at a system of only 4 terms. For example:
P(at least 2 out of 4) = P(AB)+P(AC)+P(AD)+P(BC)+P(BD)+P(CD) -2*(P(ABC)+P(ABD)+P(ACD)+P(BCD)) +3*(P(ABCD))
P(at least 3 out of 4) = P(ABC)+P(ABD)+P(ACD)+P(BCD) -3*(P(ABCD))
This works here. In fact, it works for P(at least 2 out of n) and P(at least (n-1) out of n) for all cases of n. However it does not work for the situations in between.
I am looking for an analog formula that can evaluate any case for the probability of at least x out of n failure. Any help with be appreciate. Thanks!