1
$\begingroup$

If I choose $4$ digits for a code randomly out of the digits $0$ to $9$. What is the probability that at least $2$ of these digits are the same?

By at least I mean that you have to count with the probability that even $3$ or $4$ (all) digits are the same.

I tried to use the Hypergeometric distribution to calculate this problem but that's obviously wrong as it implies that you can not redraw a already picked digit.

How do I do this and is there any of these methods that I can use? Binomial, Hypergeometric approximated?

$\endgroup$
2
  • 4
    $\begingroup$ What is the probability that no digits are the same? $\endgroup$
    – Simeon
    Commented Jan 5, 2016 at 10:09
  • $\begingroup$ $1-\frac{\binom{10}{4}\cdot4!}{10^4}$ $\endgroup$ Commented Jan 5, 2016 at 10:15

2 Answers 2

2
$\begingroup$

Hint: There are $\binom{10}{4}$ ways to choose four distinct digits from $0$-$9$. For each choice of four digits, there are $4!$ ways to arrange those digits into a code. Now divide by the number of $4$ digit codes made from the digits $0$-$9$. This gives the complement of the probability you are looking for.

$\endgroup$
2
$\begingroup$

The easiest way is to calculate the probability of the inverse case where each digit is unique. When picking the first digit all ten digits are unused, nine are unused for the second, eight for the third and seven for the fourth and final. The probability of the inverse case where we have no duplicates is then just $\frac{10}{10} \times \frac{9}{10} \times \frac{8}{10} \times \frac{7}{10} = 0.504$.

To get the case where at least two digits are the same, subtract from one: $1 - 0.504 = 0.496$.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .