You're sending hard copies of job applications to 5 firms: Millenium, Renaissance, Citadel, Two Sigma, Jane Street.
You have 5 envelopes on the table with names and addresses
of these 5 firms. You also have 5 cover letters personalized
to each firm. You were drunk that night and stuffed
each cover letter into random envelopes.
Question: What is the probability that all 5 cover letters are mailed to the wrong firms?
Solution
We want the scenario where every letter is in the wrong envelope, This is known as a "derangement" in mathematics
Instead of directly calculating the probability of all wrong matches, it's easier to:
Find the probability of at least one correct match
Subtract this from 1 to get our answer
1. Setting Up the Problem
Let Eᵢ be the event that letter i is in its correct envelope.
We want P(no correct matches) = 1 - P(at least one correct match) = 1 - P(E₁ ∪ E₂ ∪ E₃ ∪ E₄ ∪ E₅)
This is a classic application of the inclusion-exclusion principle (IEP)