Let's assume we have a deck of four different cards. If I select randomly a card and the put it back into the deck then what is the probability that I will see all of the four different cards in 5 draws?
This is a simplified version of a problem I have to solve.
Here is my unsuccessful attempt at solving this simplified problem:
number of ways to get 4 different cards in 5 draws: $\binom{5}{4}*4!*4$
because we choose 4 out of the 5 cards which are going to be the ones that will contain all of the different cards, $4!$ ways to choose the 4 different cards and 4 cards left for the fifth card
number of possible draws: $4^5$
If we divide these two numbers we get: $\frac{\binom{5}{4}*4!*4}{4^5} = 0.46875$
However a simple C++ script that I ran gave the answer: $23.4516$% which is approximately one half of the answer I got. Could someone help me? It would be really nice if someone specified the corresponding answer for the case where we draw more than 5 cards.
Close.
The denominator of $~4^5~$ is good.
For the numerator, once you apply the $~\displaystyle \binom{4}{1}~$ factor to determine which card will be drawn twice, you then have to determine which $~2~$ of the $~5~$ positions for which that card will occur. Then, you need the $~3!~$ factor to dispense with the three remaining cards.
So, the numerator should be
$$\binom{4}{1} \times \binom{5}{2} \times 3!.$$
Note that my computation above results in a probability of
$$\frac{240}{1024} = 23.4375\%.$$