# Probability of two players choosing at least one common number (with different drawing attempts)

Suppose that in a raffle box there are $$K$$ possible numbers to choose from. There are two players, i.e., A and B.

Player A starts the game by extracting randomly $$N_A$$ numbers out of the $$K$$ possible numbers. The same number cannot be extracted twice, i.e., no repetitions.

After player A has extracted his $$N_A$$ numbers, numbers are re-inserted into the raffle box and player B starts extracting randomly $$N_B$$ numbers out of the $$K$$ possible numbers, again with no repetitions.

Now, what is the probability of player B extracting (in his $$N_B$$ attempts) at least one of the number that was extracted by player A (in his $$N_A$$ attempts)?

Note that $$N_A$$ and $$N_B$$ may or may not be different (in general $$N_B\neq N_A$$).

Example: There are $$K=10$$ numbers. Player A can extract $$N_A=2$$ numbers, say it extract numbers 3 and 4. Player B can now extract $$N_B=4$$ numbers. What is the probability that player B extracts, in his 4 attempts, number 3 or number 4?

• A chooses $N_A$ from K. In order to have NO duplicates, B would then have to choose $N_B$ from $K - N_A$ as opposed to his total choice of choosing from $N_B$ from $K$
– Cato
Commented Jun 3, 2019 at 16:40
• so in order for what you want to be FALSE B has to choose from {1,2,5,6,7,8,9,10} which is 4 from 8 - which is how many ways? compared to 4 from 10? The ratio would give you the complement of what you want, so you would subtract it from 1 to get the value you need.
– Cato
Commented Jun 3, 2019 at 16:44

## 2 Answers

Hint Calculate the probability that the two players have no number in common.

This means that the $$N_B$$ numbers chosen by $$B$$ are among $$K-N_A$$ possible numbers.

• Does it mean calculating $1-\binom{N_B}{K-N_A}$? Shouldn't I be considering also the occurrence of all permutations? Commented Jun 3, 2019 at 16:43
• @mgiordi $1-\binom{N_B}{K-N_A}<0$. Note that $1-\binom{K-N_A}{N_B}$ counts all the good choices, you need to divide by all the possible choices for $B$ to get a probability. Commented Jun 3, 2019 at 16:46

Well if the first person picks $$N_a$$ numbers out of $$K$$ then they chose $$N_a/K$$ percent of numbers. Now let's say that the second person just picks $$1$$ number. The odds that they chose one of the first ones would be $$N_a/K$$. Therefore the odds that he didn't is $$1-N_a/K$$. Now if the second player picks $$2$$ numbers out of the $$K$$. then the odds that he didn't pick any of the same would be the odds that he didn't the first time times the odds that he didn't the second time: $$1-N_a/K$$ times $$1-N_a/(K-1)$$ which is $$(1-N_a/K)(1-N_a/(K-1))$$.

In general it's:

$$(1-N_a/K)*(1-N_a/(K-1))*(1-N_a/(K-2))*...*(1-N_a/(K-N_b+1))$$

Example, $$K=10, N_a=2, N_b=3$$:

probability of picking ALL different numbers = $$(1-2/10)*(1-2/9)*(1-2/8) = 0.466$$ probability of picking at least 1 same = $$1 - 0.466 = 0.533$$

I hope that answers your question.