Course contentsShow
← Computer Science
Lesson 113 of 2,8723. Probability for Computer ScienceFree lesson

Addition Rule for Probabilities

Apply the addition rule to find probabilities of unions, including the inclusion-exclusion principle.

Addition Rule for Probabilities

What you'll learn: How to calculate the probability that at least one of several events occurs using the addition rule and inclusion-exclusion principle.

The Core Idea

When you want to find the probability that either event A or event B happens (or both), you can't simply add their individual probabilities together—you'd be double-counting cases where both occur simultaneously.

The Addition Rule gives us the correct formula:

P(A ∪ B) = P(A) + P(B) - P(A ∩ B)

Think of it like counting students: if 20 students take math and 15 take computer science, you can't say 35 students total are enrolled because some take both subjects. You must subtract the overlap to avoid counting those students twice.

Why We Subtract the Intersection

  • P(A) counts all outcomes where A happens
  • P(B) counts all outcomes where B happens
  • When we add these, outcomes in both A and B get counted twice
  • Subtracting P(A ∩ B) removes that double-count

Special Case: Mutually Exclusive Events

If A and B cannot happen simultaneously (like rolling a 2 or a 5 on one die), then P(A ∩ B) = 0, and the formula simplifies to:

P(A ∪ B) = P(A) + P(B)

The Inclusion-Exclusion Principle

For three events, the pattern extends:

P(A ∪ B ∪ C) = P(A) + P(B) + P(C) - P(A ∩ B) - P(A ∩ C) - P(B ∩ C) + P(A ∩ B ∩ C)

You add individual probabilities, subtract pairwise overlaps, then add back the triple overlap (which was subtracted too many times).

Key Takeaway: The addition rule corrects for overlapping events when computing union probabilities—always subtract intersections to avoid double-counting outcomes.