1

The match problem stated in Example 5m of Chapter 2 (of A First Course in Pr, 8th Ed, Ross) showed that the probability of no matches when $N$ people randomly select from among their own $N$ hats $= P[N]= \sum_{0 \le i \le N}(-1)^i/i!$
What is the probability that exactly $k$ of the $N$ people have matches?

Solution: Let us fix our attention on a particular set of $k$ people and determine the probability that these $k$ individuals have matches and no one else does. Letting $E$ denote the event that everyone in this set has a match, and letting $G$ be the event that none of the other $N − k$ people have a match, we have $P(E \cap G) = P(E)P(G|E)$ (Rest of solution pretermitted)

$P(E) = \dfrac{\text{ 1 choice for C1 } \times ... \times \text{ 1 choice for C(k - 1) } \times \text{ 1 choice for C(k) } \times N - k \text{ choices for C(N - k) }\times \ N - k - 1 \text{ choices for C(N - k - 1)} \times ...}{N!}$
, where $C(k) =$ chap $k$, chaps 1 through k each has one choice due to their success in finding their hat, and the $P(E \cap G) = P(E)\binom{N}{k}P[N - k]$.

I see that $P(E) \neq P(E \cap G)$, but I don't apprehend the method and still deem $G$ redundant.
Since $E$ is the event that exactly these $k$ people, for some $k$, have a match,
how and why isn't the required probability just $P(E)$? Since there are only $N$ people, thus the occurrence of $E$ (coincidently, directly, and straightaway) equals the occurrence of $G$?

  • To help future readers understand where the overcount occurs, the above $N-k\text{ choices ...},N-k-1\text{ choices ...}$ are overcounting by one. Please point out errors if any. Thanks beforehand. – An5Drama Dec 30 '23 at 03:32

3 Answers3

2

Okay. Let us think about it step by step.

Step 1: What do we want? We want that EXACTLY $k$ specific people should have matches. The rest, i.e the remaining $N-k$ people should NOT have matches. So let $A$ = the event that at least $k$ specific people have matches (Notice: 1. here is not "exactly $k$" because otherwise $A=B\Rightarrow P(B\vert A)P(A)=1\cdot P(A)$ although the original answer in the history_1 mistakenly use the wrong description and his internal idea is right where $P_k= \frac{1\times 1\times 1.......\times1}{N\times N-1 \times N-2.....\times N-k}$ implies "at least $k$ people" instead of "exactly". BTW, $P_{k} = \frac{1\times 1\times 1.......\times1}{N\times N-1 \times N-2.....1}$ seems to be wrong there. 2. In history_1, since at the end we will divide by $N!$ where it assumes the people order is fixed, i.e. the $i$th has $N-i+1$ choices. So $P_{k}^{n},n=N$ (Here we use the "k-permutations of n" notation) in the edit of history_1 is wrong because it re-chooses the order the $k$ people chosen. It should be $\binom{N}{k}$ and then the order is decided by that the $m$th of the $k$ people is $i_{m}$th person where $1\le k\le N$. It is same as QA_1.) and $B$ = the event that exactly $N-k$ people have no matches. Based on this assumption, we want to know $P(A\bigcap B)$.

Now, notice that from the Bayes formula, we can calculate this probability by either $P(A|B)P(B)$ or $P(B|A)P(A)$. Note also that the first is much harder to calculate because $B$ will have more influences to $A$ than $A$ to $B$ (if $B$, then $A$ becomes exactly $k$ people while if $A$, $B$ is same as the original). Here we calculate the probability that $N-k$ don't have matches given that $k$ people have matches.

So let's do that! The probability that $P(B|A)P(A)$. Note that we know $P(B|A)$ like you mentioned from doing the earlier problem, because this is just the probability that $N-k$ people don't have a match which should just be $P(B|A)=\sum_{m=k}^{N}P(B\vert A_m)=P_{N-k}+\overbrace{0+\cdots +0}^{N-k \text{ times}} = \sum_{i=0}^{N-k}(-1)^{i}/i!$ (Here we use the law of total probability and $A_m$ is the event that exactly $m$ people have matches. Notice for cases where $k+1\sim N$ people have matches the probability is $0$).

And all you need to calculate is the probability of at least $k$ specific people getting a match. Based on QA_1, if $C$ = the event that at least $k$ people have matches, then $P(C)= \frac{1}{k!}$. Then since

Let us fix our attention on a particular set of $k$ people

we need to divide by $\binom{N}{k}$, so we got $P(A)=\frac{P(C)}{\binom{N}{k}}=\frac{1}{P_{k}^N}$

Then the result is $\frac{P_{N-k}}{P_{k}^N}$ which is elegant. Hope this helps!


This problem is duplicate of answer_1 (then the result is $\frac{\binom{n}{k} D_{n - k}}{N!}=\frac{\frac{N!}{k!(N-k)!}P_{N-k}\cdot (N-k)!}{N!}=\frac{P_{N-k}}{k!}$ where $D_{n - k}$ is the number of derangements) and answer_2 which is based on the inclusion-exclusion for $N-k$ people where both care about "at least $k$ people" instead of "at least $k$ specific people".

One specific case when $n=1$ can be found in answer_3 which is similar to answer_1.

An5Drama
  • 166
2

The questions talks about exactly $k$ matches. If $E$ occurs, then the number of matches is $\geq k$, and you need it to be exactly $k$.

Mark
  • 1,433
1

Since $E$ is the event that exactly these $k$ people, for some $k$, have a match, how and why isn't the required probability?

Because

  1. You are asked for the probability that exactly $k$ people (no more and less) match their hats. The event that the (say) first $k$ match is not necessarily a "success", because there can be more matches in the remaining people.

  2. Furthermore, the event $E$ is the probability that a particular set of $k$ people matches

leonbloy
  • 63,430