Matching Problem
There are letters and corresponding envelopes. Insert each letter into an envelope at random. Let be the number of correct matches between the letter and envelope.
Mean
Let be the indicator random variable that equals 1 when the th letter is put into the correct envelope, and equals 0 otherwise. By symmetry, we know that have the same distribution, and . Then we have
Variance
We have
where in the second equality we utilize the symmetry of s; and in the third equality we use and .
PMF
For any , the event is equivalent to that there exists a set of letters () such that each letter is put into the correct envelope (), and the remaining letters are put into the wrong envelopes (). Formally, we have
Note that for different subset are disjoint sets in . Thus,
where the last equality uses symmetry. The probability of is straightforward:
The probability of is the same as if there are only letters and envelopes, and there is no match. By the inclusion-exclusion principle, we have
Together, we get
Note that the above formula is only valid for . When , we have . And is impossible.
- Additionally, the probability converges to as , which corresponds to the Poisson Distribution with . An intuitive justification is that are not independent; on the other hand, as , they are “approximately independent”. Furthermore, the success probability for each match is , giving a similar situation as in Poisson Distribution as Approximation to Binomial Distribution.