Formula for sampling of two type population

15 Views Asked by At

Suppose there are n apples, where l of them are good and N-l are bad. From the n apples, I am sampling r apples (uniformally, without replacement). What's the probability that after the sampling, at least k out of the r apples are good?

So I got the following formula: $\sum_{i\geq k}\frac{\binom{r}{i}\binom{n-i}{l-i}}{\binom{n}{r}}$.

Explanation: The first step I took is deriving the probability for getting only i good apples out of r. There a $\binom{n}{r}$ different possibilities to sample of r apples. From that if there are i good apples, there are $\binom{r}{i}$ ways to select them and $\binom{n-i}{l-i}$ way to (not) select the rest of the (l-i) good apples. And so to get "at least k", I simply summed over all i greater than k.

Is my intuition correct?

1

There are 1 best solutions below

1
On BEST ANSWER

This is the quick answer:

Let's set

$k \leq r \leq l \leq N$

The probability you are lookin for is the following:

$$\sum_{i=k}^r\frac{\binom{l}{i}\binom{N-l}{r-i}}{\binom{N}{r}}$$

for the future, please show you attempts to solve the problem.