5

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?

smci
  • 364
  • 2
    Are you sure about the answer in the book? I got $\frac{936}{1,000}$. – José Carlos Santos Sep 04 '18 at 09:32
  • 2
    But 63/125 + 72/100 is more than 1... – TonyK Sep 04 '18 at 09:37
  • @JoséCarlosSantos yes re-checked it. Could you please explain how did you get 936/1000 as I'm not even getting close to such a high probability. – user585380 Sep 04 '18 at 09:38
  • @TonyK Sorry, made an edit. It is 72/1000 – user585380 Sep 04 '18 at 09:38
  • 2
    In how many cases we get $4$ distinct integers? Answer: $10\times9\times8\times7$. In how many ways are the first $2$ integers equal but after that you get $2$ new (distinct) integers? Answer: $10\times 9\times 8$. But this is also the answer to the question: in how many ways are the first and the third ingeres equal and the other $2$ are distinct from each other and the $2$ others? Actually, there are $6$ questions of this sort. Therefore, the answer should be$$\frac{10\times9\times8\times7+6\times10\times9\times8}{10,000}=\frac{936}{1,000}.$$ – José Carlos Santos Sep 04 '18 at 09:44
  • @JoséCarlosSantos how did you get a 6? Any way to calculate? – user585380 Sep 04 '18 at 09:46
  • 2
    @user585380 Sure: $\binom42=6$. – José Carlos Santos Sep 04 '18 at 09:48
  • Things are clearer if you leave $\frac{9×8×7}{1000} = \frac{504}{1000}$ , don't simplify to $\frac{63}{125}$ – smci Sep 04 '18 at 20:47

3 Answers3

9

You're missing a factor of $6$ in the second case, since you can choose two slots for the two equal numbers in $\binom42$ ways. Then you get $\frac{936}{1000}$, as José wrote. Since the book says $\frac{963}{1000}$, apparently they're also counting the case of two pairs, and "more than $2$ are the same" means that there's at least a triple. That adds another $\frac{\binom42\binom{10}2}{10^4}=\frac{27}{1000}$, so the total is then $\frac{963}{1000}$.

joriki
  • 238,052
5

You can solve it by subtraction: the complementary of the event in your problem consists in having a quartet of equal numbers or a triplet and a different number.

The probability of getting four equal numbers is $\frac{10}{10000},$ because there are ten numbers available to be all equal.

The probability of having a triplet is $\frac{4\times10\times 9}{10000}$ because there are four positions where to place the "single one", 10 numbers that the triplet can assume and nine that the single can have.

Summing these two probabilities, you obtain $\frac{370}{10000}$ which is exactly $1-\frac{963}{1000}.$

joriki
  • 238,052
5

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} $$

  • Thanks! But could you point out my mistake in doing the normal way without complementary? – user585380 Sep 04 '18 at 09:56
  • @user585380: Your first number is right. The second is wrong. But you did not show your reasoning how you got your second number. You may split the second case (2 equal digits) into two subcases: (1) - exactly one pair; (2) - exactly 2 different (!) pairs. – trancelocation Sep 04 '18 at 10:35
  • We can't have 2 different pairs, right? I got the second number by: 9/101/108/10 (to get two similar numbers). – user585380 Sep 04 '18 at 14:28
  • @user585380: Your number $\frac{9}{10}\cdot \frac{1}{10}\cdot \frac{8}{10}$ corresponds to $\frac{1}{10}$ for the double digit and $\frac{9}{10}$ and $\frac{8}{10}$ for the two remaining digits. But your calculation does not distinguish, for example, between $1123$, $1213$, $1231$, .... Besides this your calculation excludes cases with two pairs like $1122$. I hope this helps you understand what you overlooked in your calculation. – trancelocation Sep 05 '18 at 03:41