can somebody please help to prove the formula for general additional rule of three events?
$$P(A \cup B \cup C)=P(A)+P(B)+P(C)-P(A\cap B)-P(A\cap C)-P(B\cap C)+P(A\cap B\cap C)$$
can somebody please help to prove the formula for general additional rule of three events?
$$P(A \cup B \cup C)=P(A)+P(B)+P(C)-P(A\cap B)-P(A\cap C)-P(B\cap C)+P(A\cap B\cap C)$$
$$\begin{align} & \quad \mathsf P(A\cup B\cup C) \\[1ex] & =\mathsf P\big(A\cup (B\cup C)\big) \\[1ex] &=\mathsf P(A)+\mathsf P(B\cup C)-\mathsf P\big(A\cap (B\cup C)\big) \\[1ex] & =\mathsf P(A)+\mathsf P(B)+\mathsf P(C)-\mathsf P(B\cap C)-\mathsf P\big(A\cap (B \cup C)\big) \\[1ex] & =\mathsf P(A)+\mathsf P(B)+\mathsf P(C)-\mathsf P(B\cap C)-\mathsf P\big((A\cap B) \cup (A\cap C)\big) \\[1ex] & =\mathsf P(A)+\mathsf P(B)+\mathsf P(C)-\mathsf P(B\cap C)-\mathsf P(A\cap B)-\mathsf P(A\cap C)+\mathsf P\big((A\cap B)\cap (A\cap C)\big) \\[1ex] &=\mathsf P(A)+\mathsf P(B)+\mathsf P(C)-\mathsf P(B\cap C)-\mathsf P(A\cap B)-\mathsf P(A\cap C)+\mathsf P(A\cap B\cap C) \\ & &\Box \end{align}$$
Suppose there is an element $m$ in one, two or all three sets. Now we need to prove that the formula counts $m$ once.
If $m \in A_1\;(\text{or }A_2\text{ or }A_3)$, then the number of occurrence $= 1$.
If $m \in A_1 \cap A_2\;(\text{or }A_1 \cap A_3\text{ or }A_2 \cap A_3)$, then the number of occurrence $= 1+1-1=1$.
If $m \in A_1 \cap A_2 \cap A_3$, then the number of occurrence $= 1+1+1-1-1-1+1=1$.
Here's a derivation using indicators. Write $I(A)$ for the indicator of event $A$, i.e., $I(A)$ takes value 1 when $A$ occurs, and 0 otherwise. Then $$ \begin{align} I(A\cup B\cup C)&\stackrel{(1)}=1-I[(A\cup B\cup C)^c]\\ &\stackrel{(2)}=1-I(A^c\cap B^c\cap C^c)\\ &\stackrel{(3)}=1-I(A^c)I(B^c)I(C^c)\\ &\stackrel{(4)}=1-[1-I(A)][1-I(B)][1-I(C)]\\ &\stackrel{(5)}=I(A)+I(B)+I(C)-I(A)I(B)-I(B)I(C)-I(A)I(C)+I(A)I(B)I(C)\\ &\stackrel{(6)}=I(A)+I(B)+I(C)-I(A\cap B)-I(B\cap C)-I(A\cap C)+I(A\cap B\cap C) \end{align} $$ Steps (1) and (4) use the fact $I(A)=1-I(A^c)$ for the complement $A^c$ of event $A$; step (2) is set theory; steps (3) and (6) use the fact $I(A\cap B)=I(A)I(B)$; step (5) is algebra. Now take expectations, using the fact that $E[I(A)]=P(A)$.
It is easy to see how to generalize this to the union of any finite collection of events -- giving us the Inclusion-Exclusion formula.