Probability of several people to choose the same random number

981 Views Asked by At

Please help with a simple problem that Mathisfun provides on this page: https://www.mathsisfun.com/data/probability-shared-birthday.html

Name of the problem:

Friends and Random Numbers

Problem statement:

4 friends (Alex, Billy, Chris and Dusty) each choose a random number 
between 1 and 5. 
What is the chance that any of them chose the same number?

*** Question 1 about problem formulation: As I understand any combination of 2 , 3 or all 4 friends choosing the same number will be a solution to the problem, correct?

Next Mathisfun gives the following problem solution:

"First, what is the chance that Alex and Billy have the same number?

Billy compares his number to Alex's number. There is a 1 in 5 chance of a match."

*** Question 2: Why 1/5 chance of a match? Any friend (Alex and Billy in this case) can choose any number with probability 1/5, but for me when two friends choose the same number probability should be 1/5 * 1/5 = 1/25. What am I missing?

Mathisfun continues:

"Now, let's include Chris ...

But there are now two cases to consider (called "Conditional Probability"):

If Alex and Billy did match, then Chris has only one number to compare to.
But if Alex and Billy did not match then Chris has two numbers to compare to."

*** Question 2: Why "if Alex and Billy did match, then Chris has only one number to compare to" and if they do not match Chris has two numbers to compare to?

Update

If Alex and Billy match and Chris match with them as well, so now we have three people choosing the same number, what is probability then? Why this case is not shown in the tree diagram? I agree that for two people to match we don't care what number it is, any one of five numbers will do. Now when we have the third person (Chris) matching with them, it must be the same number as they have chosen. The case 'three friends choose the same number' as well as the case 'all four friends choose the same number' should be accounted in the solution or not?

2

There are 2 best solutions below

4
On BEST ANSWER

For the first case, you are interested in Alex and Billy's numbers being equal to each other, rather than Alex and Billy's numbers being equal to some specified number. It's easy to see if you just chart the possibilities.

In the table below, the first row contains possibilities for Alex's numbers and the first column contains possibilities for Billy's numbers. We see that there are a total of $25$ possibilities.

$$\pmatrix{ &1&2&3&4&5\\ 1&*\\ 2&&*\\ 3&&&*\\ 4&&&&*\\ 5&&&&&* } $$

Their numbers being equal corresponds to the diagonal, and that's $5$ possibilities, so $5/25 = 1/5$.
Another way to think of this is that whatever Alex's number is, there is only $1$ possible Billy number $($out of $5)$ that matches it.


For question $2$, if you assume that Alex and Billy matched their numbers, then once again there is only one possible Chris number $($out of $5)$ that matches their number.

If Alex and Billy did not match their numbers, then there are two possibile Chris numbers $($out of $5)$ that result in a match: the number that equal Alex's and the number that equals Billy's.

4
On

The probability that Alex and Billy both choose the number $1$ is $\frac15\times\frac15 = \frac{1}{25}.$

The probability that they both choose $2$ is also $\frac{1}{25}.$ Likewise the probability they both choose $3$, the probability they both choose $4$, and probability they both choose $5$.

That's five ways for Alex and Billy to choose the same number.

If they both choose $1$ they cannot also choose $2,$ and likewise for any other two numbers, so every one of the possible matching events is disjoint from every other, and to get the probability that at least one of those events occurred (which will also be the probability that exactly one of those events occurred) we can just add up the probabilities:

$$ \frac{1}{25}+\frac{1}{25}+\frac{1}{25}+\frac{1}{25}+\frac{1}{25}=\frac15. $$

But this is a very tedious way to do it and gets even more tedious when we consider three of the friends or all four friends.

So one way to look at it is that Alex chose some number. We don't really care which number it was, but we do care that Alex's choice partitions the set of numbers into two subsets:

\begin{align} A &= \{ \text{the number Alex chose} \}, \\ A^\complement &= \{ \text{the numbers Alex did not choose} \}. \end{align}

We know that Billy also chose a number but we assume that Alex's choice did not influence Billy toward or away from any number. (This seems more realistic if we suppose that nobody says which number they have chosen until after everyone says they have chosen a number. The problem statement does not say explicitly that this is true, but if you were organizing such a guessing game in real life you would probably organize it that way; in any case the author apparently thought this detail was too obvious to mention.)

So, given that any one number has a $\frac15$ chance of being chosen by Billy, there are two possible events:

  • Billy chose the single number in $A.$ Probability $\frac15.$
  • Billy chose one of the four numbers in $A^\complement.$ Probability $4\times\frac15 = \frac45.$

The first possible event encompasses the event that Alex and Billy chose one number, Chris chose a different number, and Dusty chose yet another number; the event that Chris chose the same number as Alex and Billy; the event that Dusty chose the same number as Alex and Billy; the event that all four chose the same number; and the event that Alex and Billy chose one number while Chris and Dusty chose the same number as each other but not the number Alex and Billy chose. As soon as we know Alex and Billy chose the same number we know one of those events occurred and we do not care which one; any of those events says that someone chose the same number as someone else.

For any case you can imagine, think: do Alex and Billy have the same number? If they do, we have already counted that case at this point.

But the event that Billy chose one of the four numbers in $A^\complement$ only says that Alex and Billy do not have the same number; there may still be two friends who chose the same, or there may not. Now we can further subdivide this case by observing that if Billy chose differently than Alex we have two sets of numbers:

\begin{align} B &= \{ \text{the numbers Alex and Billy chose} \}, \\ B^\complement &= \{ \text{the numbers that neither Alex nor Billy chose} \}. \end{align}

So, given that any one number has a $\frac15$ chance of being chosen by Chris, there are two possible events:

  • Chris chose one of the two numbers in $B.$ Probability $2\times\frac15\times P(\text{Alex and Billy chose different numbers}) = 2\times\frac15\times\frac45 = \frac{8}{25}.$
  • Chris chose one of the three numbers in $B^\complement.$ Probability $3\times\frac15\times P(\text{Alex and Billy chose different numbers}) = 3\times\frac15\times\frac45 = \frac{12}{25}.$

We have to multiply by the probability that Alex and Billy have different numbers because both of these cases are cases that occur only when Alex and Billy have different numbers. All the cases concerning what Chris did when Alex and Billy chose the same number have already been accounted for when we worked out the probability that "Billy chose the single number in $A.$"

Next we have to consider what number Dusty chose, but only in the case where Alex, Billy, and Chris chose three different numbers; all the other possible cases have already been accounted for. And once we have done that, we have three possible ways for someone to have chosen the same number as someone else:

  • Alex and Billy chose the same number.
  • Alex and Billy chose two different numbers, but Chris chose one of the numbers Alex and Billy chose.
  • Alex, Billy, and Chris chose three different numbers, but Dusty chose one of the numbers the others chose.

That covers all of the possible ways someone could choose the same number as someone else.

If you really wanted to torture yourself you could identify every way in which the four friends might have chosen "the same number": Billy and Chris choosing one number, Alex and Dusty choosing two other numbers; Alex, Chris, and Dusty choosing one number while Billy chooses a different number; and so forth. And if you really want to do a lot of writing you will distinguish the cases according to which numbers were chosen, that is, cases in which Alex and Billy choose $3$ are separate from cases in which Alex and Billy choose $4.$ There are only $5\times5\times5\times5 = 3125$ possible ways the four friends could choose their numbers, so this is possible (though very tedious) to do with pencil and paper. Just count carefully! Meanwhile, I will continue to lump cases together as much as I can in order to do less work on the calculations. (I will take shortcut at the end of the exercise on the Web page, which means I only need to consider one case.)