TITLE: Probability - four random integers between 0-9, that not more than two are the same
QUESTION [5 upvotes]: Four integers are chosen at random between 0 and 9, inclusive. Find the probability that (a) not more than 2 are the same.
What I tried: all unique numbers: 63/125, 
                  two same numbers: 72/1000
And then add them both. But the answer in the book is 963/1000. I'm not getting such a high probability. Where have I made the mistake?

REPLY [5 votes]: You may first calculate the complementary probability.

There are $10$ 4-digit groups with 4 identical digits
There are $4 \choose 3$ choices of places to put 1 out of 10 digits into these 3 places and 9 other digits to fill the remaining place: ${4 \choose 3} \cdot 10 \cdot 9$

All together, the probability of getting 3 or 4 equal digits is
$$P(\mbox{3 or 4 equal digits}) =\frac{10 + {4 \choose 3} \cdot 10 \cdot 9}{10^4} = \frac{37}{10^3} \Rightarrow $$
$$P(\mbox{at most 2 equal}) = 1-\frac{37}{10^3} = \frac{963}{1000} $$