Back to the on-screen lesson ·

Inclusion and exclusion

Counting a union of overlapping events, the four regions of two events, and why the triple overlap goes back on.

Paper packet. Every task here also exists on screen, where it is checked automatically; answers written on paper are not assessed by Nydus. When you are back at a device, enter your answers there.

1. What you will learn

You will count or find the probability of a union of two or three overlapping events by adding the events, subtracting the pairwise overlaps and putting the triple overlap back, and you will read a region described in words — at least one, exactly one, neither — as the expression that counts it. You will also check a region calculation by adding the disjoint pieces back to the whole.

2. What the axioms already gave

Additivity is stated for disjoint events only. Two events that can both happen are not disjoint, so the axiom says nothing about their union directly — and that gap is exactly what this lesson fills.

3. Words for this lesson

The union $A \cup B$ is everything in either event; the intersection $A \cap B$ is everything in both. A region is one of the disjoint pieces the events cut the space into — only $A$, both, only $B$, neither. Inclusion-exclusion is the alternating formula that counts a union from the events and their overlaps.

4. Add, subtract the overlaps, put the triple back

For two events, $P(A \cup B) = P(A) + P(B) - P(A \cap B)$. The proof is one line of the axioms: split $A \cup B$ into the three disjoint pieces only $A$, both, only $B$, add them, and compare with $P(A) + P(B)$, which has the middle piece twice.

For three events the same argument gives

$$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).$$

The last term is the one that surprises people. Someone in all three events is added three times by the first row and removed three times by the second, leaving them counted zero times; adding the triple overlap once puts them back. The pattern continues for any number of events, alternating in sign, and each row repairs the over-correction made by the row above it.

Everything here is a counting statement first. Divide by $|\Omega|$ at the end and it is a statement about probabilities; the arithmetic is identical.

Another way: picture

Two overlapping circles on a page. Paint $A$ red and $B$ blue with one coat each: the lens where they meet has two coats. The union is the painted area, so one coat has to come off the lens — which is the subtraction, drawn rather than remembered.

Another way: steps

  1. Name the regions: only $A$, only $B$, both, neither.
  2. Write down what you are given and mark which region each figure covers.
  3. Start from the overlap and work outwards by subtraction.
  4. Check the regions add up to the whole group — always, and it takes one line.

5. The four regions of two events, once and for all

Everything a two-event question can ask for, in the same notation.

Region in wordsCount
In both$\|A \cap B\|$
In $A$ only$\|A\| - \|A \cap B\|$
In at least one$\|A\| + \|B\| - \|A \cap B\|$
In exactly one$\|A\| + \|B\| - 2\|A \cap B\|$
In neither$N - \|A\| - \|B\| + \|A \cap B\|$

At least one and exactly one differ by one further copy of the overlap, and confusing the two is the commonest reading error in this lesson. Neither is the complement of at least one, which is De Morgan's law in counting form.

6. Where this goes wrong

Adding without subtracting. The result can exceed the size of the group, or a probability can exceed one — which is a signal, not a rounding matter.

*Reading at least one as exactly one.* The first subtracts the overlap once, the second twice.

Leaving out the triple overlap. With three events, omitting the last term drops everyone in all three from the count entirely.

Inventing an overlap that was not given. $P(A \cap B)$ is a separate piece of information. It is not $P(A)P(B)$ unless the events are independent, and assuming that quietly is how a correct-looking calculation comes out wrong.

7. Two events, worked from the overlap outwards

  1. Of $100$ students, $60$ study French, $45$ study German and $20$ study both.

    Mark which region each figure covers.

  2. At least one: $60 + 45 - 20 = 85$. French only: $60 - 20 = 40$. German only: $45 - 20 = 25$.

    Everything from the overlap.

  3. Neither: $100 - 85 = 15$, and $40 + 25 + 20 + 15 = 100$.

    The check costs one line and catches nearly every slip.

8. Why the triple goes back on

  1. Take someone who belongs to all three of $A$, $B$, $C$.

    Follow one person through the formula.

  2. The first three terms count them three times; the three pairwise terms remove them three times. They are now counted zero times.

    The correction over-corrected.

  3. Adding $P(A \cap B \cap C)$ counts them once, which is right.

    And everyone else is unaffected, because they are in no triple.

9. Your turn: $P(A) = 0.5$, $P(B) = 0.4$, $P(A \cap B) = 0.1$; find the probability of exactly one of them

  1. $P(A \cup B) = 0.5 + 0.4 - 0.1 = 0.8$.

    Inclusion-exclusion for the union.

  2. Exactly one is the union with the overlap removed a second time.

    One more copy of $P(A \cap B)$.

  3. Your turn: work this step out. Its working is at the end of the packet.

    So $0.8 - 0.1 = 0.7$.

10. Guided practice

Of $100$ people surveyed, $35$ read the morning paper, $39$ read the evening paper and $20$ read both. Fill in the four counts.

How many people
Read at least one paper
Read the morning paper only
Read the evening paper only
Read neither paper

11. Guided practice

In a group of people, $26$ cycle, $36$ swim and $31$ run; $9$ do both of the first two, $7$ both of the first and third, $5$ both of the second and third, and $2$ do all three. How many do at least one?

Answer:

12. Practice

Someone has written four lines about $100$ people, $36$ of whom subscribe to a paper and $36$ of whom subscribe to a magazine, with $14$ subscribing to both. Mark the two lines that are wrong.

This task has no paper form; do it on a device.

13. Practice

Of $100$ people, $45$ hold a licence to drive, $38$ hold a passport and $17$ hold both. Give the two counts.

Exactly one of the two: p. Neither: q.

14. Somewhere new

How many of the whole numbers from $1$ to $90$ are divisible by $2$, by $3$ or by $5$?

Answer:

15. Lesson test

Lesson test: one question per skill, one attempt each, no hints. Your answers are checked when you submit.

16. Test question

A group of $182$ people, two events $A$ and $B$. Match each region to the expression that counts it.

$|A \cap B|$$|A| - |A \cap B|$$|A| + |B| - 2|A \cap B|$$182 - |A| - |B| + |A \cap B|$
In both $A$ and $B$
In $A$ but not in $B$
In exactly one of $A$ and $B$
In neither $A$ nor $B$

17. What you can do now

You can name the four regions of two overlapping events, count each of them, and extend the argument to three events. Say in your own words why the triple overlap has to be added back on after the three pairwise overlaps have been subtracted.

Working for the steps left to you

9. Your turn: $P(A) = 0.5$, $P(B) = 0.4$, $P(A \cap B) = 0.1$; find the probability of exactly one of them, step 3