information:highlighting
In probability

In probability, for events A,..., A in a probability space (Ω, F, P) {\displaystyle (\Omega,{\mathcal {F}},\mathbb {P})}, the inclusion–exclusion principle becomes for n = 2

for n = 3

and in general

which can be written in closed form as

where the last sum runs over all subsets I of the indices 1,..., n which contain exactly k elements, and

denotes the intersection of all those A with index in I.

According to the Bonferroni inequalities, the sum of the first terms in the formula is alternately an upper bound and a lower bound for the LHS. This can be used in cases where the full formula is too cumbersome.

For a general measure space (S,Σ, μ) and measurable subsets A,..., A of finite measure, the above identities also hold when the probability measure P {\displaystyle \mathbb {P} } is replaced by the measure μ.