4.9.2 · D1Probability Theory & Statistics

Foundations — Inclusion-exclusion principle

2,278 words10 min readBack to topic

Before you can trust that recipe, you need to be fluent with a handful of symbols and pictures. This page builds all of them from zero, in the order the topic actually uses them. Nothing here assumes you have seen set notation before.


1. A "set" and how we draw it

The things inside a set are its elements (or members). If the number is an element of set , we write — read " is in ."

Figure — Inclusion-exclusion principle

Read figure s01 now. The outer rectangle is the universe: every item we could possibly talk about. We write the universe as when we are thinking about it as a sample space of outcomes (the letter will return in the probability version, §10), and as when we simply mean a background universal set of things to count — they are the same box, just named for the mood we are in. Inside that box, the orange circle is set and the teal circle is set . The dot labelled "" sits inside circle ; the dots floating in the corners of the box belong to no set. This single picture — circles inside a box — is the stage on which the entire topic plays out. See Set Theory & Venn Diagrams for more of these drawings.


2. Counting a set: the "size" bars


3. Union — "in at least one"

Figure — Inclusion-exclusion principle

In the figure, the teal region is . Notice it includes the middle lens where the circles overlap — union keeps everything.


4. Intersection — "in all of them"

The orange lens in figure s02 is . This lens is the villain of the whole story: adding counts every dot in the lens twice, once from each circle. That is precisely why the two-set formula subtracts .


5. Many-set union and intersection: and

The big and are just the small and repeated, exactly as (coming in §7) is repeated. A -fold intersection shrinks as grows — demanding membership in more circles keeps fewer elements — while a -fold union grows.


6. Disjoint sets and the empty set

Recall Why disjoint is the "easy" case

If nothing is shared, nothing is double-counted, so you can just add: . This is exactly the additivity idea behind the Probability Axioms.


7. Adding disjoint pieces — the rule addition depends on

Why the topic leans on this: the parent note splits into three disjoint pieces — "only ", "only ", and "both" — precisely so it can add them safely. Every inclusion–exclusion proof secretly reduces overlapping counting to disjoint counting. This is the backbone of Counting Principles & Combinatorics.


8. The summation sign

The notation means "add over every pair with smaller than ", so each pair is counted once, never twice.


9. Choose numbers

Here (" factorial") means , and by convention. See Counting Principles & Combinatorics.


10. The alternating sign

Figure — Inclusion-exclusion principle

The bars in the figure show the net contribution of one element that lives in sets: from singles, from pairs, from the triple. They stack to exactly — the promise of the whole principle. This same cancellation is what powers Bonferroni Inequalities when you stop the sum early.


11. Probability — sizes turned into fractions

Here is the very same box from figure s01 — now read as the sample space of all equally likely outcomes. Because dividing by changes nothing structural, every sign and every term carries over unchanged. This is the bridge to Probability Axioms.


How the foundations stack up

Read these bottom-to-top as a ladder: each rung only makes sense once the rung below is solid.

  1. Sets drawn as circles in a box (§1) give us something to count.
  2. Size bars (§2) let us count a circle.
  3. Union and intersection (§3–4) describe combining two circles — the whole blob versus the shared lens.
  4. Big and (§5) repeat those to many circles — the exact objects the general formula sums.
  5. Pairwise-disjoint sets (§6) and the disjoint addition rule (§7) give the safe, no-overlap case that all counting reduces to.
  6. (§8) and (§9) let us write and count all those terms compactly.
  7. The sign switch (§10) makes the add–subtract–add dance precise.
  8. Probability (§11) reinterprets the whole thing as fractions of the box.

Together these pour directly into the Inclusion–Exclusion Principle.


Equipment checklist


Connections

  • Set Theory & Venn Diagrams — where circles, union and intersection come from
  • Counting Principles & Combinatorics — the and disjoint-addition machinery
  • Probability Axioms — additivity is the disjoint special case
  • Derangements & Permutations — a payoff that reuses and factorials
  • Binomial Theorem — the identity that forces the alternating signs
  • Bonferroni Inequalities — what happens if you stop the alternating sum early