# How to calculate one probability out of several Bernoulli probabilities?

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?

-
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
@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