For a multi-agent problem I want to calculate the probability that a certain event happens for any agent (1 or more). There are n agents, and $P(X_i=1)=p_i$ for each agent. I want to calculate the probability that the event is true for any agent: $p_c = P(X_1=1 \vee X_2=1 \vee ... \vee X_n=1)$.

For $n=2$:

$p_c = p_1 + p_2 - p_1 p_2$

And for $n=3$:

$p_c = p_1 + p_2 + p_3 - p_1 p_2 - p_1 p_3 - p_2 p_3 + p_1 p_2 p_3$

Is there an easier way to calculate this probability?

  • 1
    $\begingroup$ try $1-P(X_1=0 \& X_2=0 \& \dots \& X_n=0) ) = (1- (1-p_1)(1-p_2)\dots (1-p_n))$ ? $\endgroup$
    – user83346
    Feb 10, 2016 at 16:45
  • 2
    $\begingroup$ @fcop's solution is way easier (and should be posted as an answer), but just as a note, the general form of what you're doing is called the inclusion-exclusion principle. $\endgroup$
    – Danica
    Feb 10, 2016 at 16:47

1 Answer 1


I would have left this as a comment but @Dougal says in his comment that I should post is as an answer:

The result can be found as \begin{align} p_c &= 1 - P(X_1=0 \,\&\, X_2=0 \,\&\, \dots \,\&\, X_n=0) \\&= 1 - (1-p_1)(1-p_2)\cdots (1-p_n) \\&= 1 - \prod_{i=1}^n (1-p_i) \end{align}


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.