# Probability of get the same word

I have this statement:

There are $$23$$ people where each person will take out of a box with $$365$$ papers written with different words. In addition each person will return the paper to the box. What is the probability that exactly $$2$$ people get the same word?

My attempt was:

Get the total amount of possible results of choose $$23$$ words of total of $$365$$: $$\binom{365}{23}_{repitition} = \frac{387!}{364! \cdot 23!}$$

Get the case in where exactly $$2$$ people get the same word. Lets suppose a person $$p_i$$ and a person $$p_j$$ get the same word $$w_1$$, Then we have to choose $$21$$ letters out of a total of $$364$$, since it must be repeated exactly $$2$$ times, that is $$\binom{364}{21} = \frac{364!}{343! \cdot 21!}$$

Once these $$21$$ letters have been chosen and with the two words that are repeated, the cases would remain as: $$w_i -w_i-w_j-w_k-....-w_n$$ and each of these words correspond to 23 people:

$$w_i \to p_1$$

$$w_i \to p_2$$

$$w_n \to p_{23}$$

However,person 1 with person 2 will not necessarily be repeated, so we must multiply by $$\frac{23!}{2!}$$

Then, the prob is $$\frac{\binom{364}{21}\cdot \frac{23!}{2!}}{\binom{365}{23}_{repetition}}$$.

However, according to the guide, my answer is incorrect and I don't know why. Thanks in advance.

• The total number of possible selections is $365^{23}$. – lulu Dec 20 '19 at 21:55
• @lulu True. thus, that is my unique error? – Eduardo S. Dec 20 '19 at 21:56
• I didn't read beyond that. But: to make that the correct count, we need to consider ordered sets of choices (indexed, say, by an enumeration of the people). Having done that, everything that follows should also reference ordered collections. – lulu Dec 20 '19 at 21:59
• You also forgot that there are $365$ ways to choose the repeated word. – saulspatz Dec 20 '19 at 22:25

Call the people A-W. Each person can have one of 365 words, so the total number of possibilities is $$365^{23}$$. Doing $$\binom{365}{23}$$ already assumes that the 23 values are distinct.
To find the number of ways to choose 23 people, we first decide which pair have the same words. There are $$\binom{23}{2}$$ ways to do this. After this, we have 22 distinct values for 365 words. The number of ways to do this is $$\binom{365}{22}\cdot 22!$$, where the $$\binom{365}{22}$$ gives the number of ways to choose the 22 distinct values and the $$22!$$ permutes them.