Cross Validated is a question and answer site for people interested in statistics, machine learning, data analysis, data mining, and data visualization. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
1  
try $1-P(X_1=0 \& X_2=0 \& \dots \& X_n=0) ) = (1- (1-p_1)(1-p_2)\dots (1-p_n))$ ? – fcop Feb 10 at 16:45
2  
@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. – Dougal Feb 10 at 16:47
up vote 5 down vote accepted

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}

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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