1
$\begingroup$

sorry in advance if my description is unclear but maths really isn't my strong suit

My question:

How to determine the probability of picking all distinct numbers when picking, with replacement, n times from a larger set N where the numbers are non unique AND a specific one of them needs to be in the result set.

Example:

My set of numbers and their probability of being picked are as follows
P(1)=1/20
P(2)=1/20
P(3)=2/20
P(4)=2/20
P(5)=2/20
P(6)=4/20
P(7)=4/20
P(8)=4/20

What is the probability of picking exactly 5 distinct numbers which include number 8?

I've read questions which were simpler versions of this and understand that if they weren't weighted and there wasn't an inclusion constraint, it would be a matter of doing 1 * 19/20 * 18/20 ... 5 times.

So with my 2 additional conditions I tried to write out the permutations to get an idea starting with picking the number 8 which looks like

1 * 16/20 * 12/20 * 8/20 * 6/20
1 * 16/20 * 12/20 * 10/20 * 8/20
...

Then I figured I'd try to figure out how to calculate all permutations, but this is where I am stuck because I can't work out how the required number 8 fits in

Thanks for any help

$\endgroup$

1 Answer 1

1
$\begingroup$

One number needs to be $8$. The remaining numbers can have the following probabilities of being picked (in units of $\frac1{20}$) in the following numbers of ways:

\begin{array}{c|l} 4,4,2,2&\binom22\binom32\binom20=3\\ 4,4,2,1&\binom22\binom31\binom21=6\\ 4,4,1,1&\binom22\binom30\binom22=1\\ 4,2,2,2&\binom21\binom33\binom20=2\\ 4,2,2,1&\binom21\binom32\binom21=12\\ 4,2,1,1&\binom21\binom31\binom22=6\\ 2,2,2,1&\binom20\binom33\binom21=2\\ 2,2,1,1&\binom20\binom32\binom22=3\\ \end{array}

Each quintuple of numbers can be picked in $5!$ different orders. Thus the probability for picking $5$ distinct numbers of which one is $8$ is

$$ \frac{5!}{20^5}\cdot4\cdot\left(3\cdot4\cdot4\cdot2\cdot2+6\cdot4\cdot4\cdot2\cdot1+1\cdot4\cdot4\cdot1\cdot1+2\cdot4\cdot2\cdot2\cdot2+12\cdot4\cdot2\cdot2\cdot1\\+6\cdot4\cdot2\cdot1\cdot1+2\cdot2\cdot2\cdot2\cdot1+3\cdot2\cdot2\cdot1\cdot1\right)=\frac{549}{5000}=0.1098\;, $$

where the $4$ in front is for the probability of picking $8$, the first factor in each term is the multiplicity from the table above and the remaining four factors in each term are for the probabilities of picking the remaining four numbers.

$\endgroup$
2
  • $\begingroup$ Hi, thanks for the answer. Still a little confused about the inclusion of the 8 in that final calculation but gonna try to break it down to understand. For example, wouldn't the 76543 quintuple be included in the 4,2,2,2 permutation? $\endgroup$
    – Kbratt
    Commented Dec 16, 2019 at 0:21
  • $\begingroup$ @Kbratt: I'm sorry, I forgot to include the factor of $4$ from the probability of picking $8$ (though I did include the factor of $20$ in the denominator from that probability) – so the probability is actually $4$ times higher. I've fixed the answer accordingly and described the individual factors. Is it clearer now? $\endgroup$
    – joriki
    Commented Dec 16, 2019 at 5:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .