Pin codes consist of 4 digits between 0 and 9. If a pin-code were generated by a random number generator (e.g. by 4 ten-sided dice), what is the probability that it will have at least two digits that repeat?
Tell me more
×
Mathematics Stack Exchange is a question and answer site for
people studying math at any level and professionals in related fields. It's 100% free, no registration required.
|
|
It's easier to compute the probability of the opposite event, namely that you get four different digits. Imagine that you choose the digits one by one by rolling a singe ten-sided die. You win if some digit appears twice. What is the chance of losing? In order to lose, all of the following must be true:
So the probability of losing is $\frac{9}{10}\cdot\frac{8}{10}\cdot\frac{7}{10}=\frac{9\cdot 8\cdot 7}{1000} = 0.504$ The chance of winning is one minus this. |
||||
|
|
|
Hint: There are $10^4$ total codes. To not duplicate, you have $10$ choices for the first number, $9$ for the second, and ??? |
|||
|
|