Suppose we have an urn containing c yellow balls and d green balls. We draw k balls, without replacement, from the urn. Find the expected number of yellow balls drawn. Hint: Write the number of yellow balls drawn as the sum of c random variables.

I initially thought the solution is the sum of a hypergeometric distribution:

$$E(X) = \sum_{x = 0}^{k}x\frac{\binom{c}{x}\binom{d}{k-x}}{\binom{c+d}{k}}$$

The issue is that this doesn't work for any value of $k$ (for example, what if $k > c$ or $k-x > d$), it also doesn't fit with the hint given in the question. Is there a way to generate a more general solution for $1<k<c+d$?

  • 1
    $\begingroup$ Your formula looks right to me. When $x>c$, we have ${c\choose x}=0$ for example. It's only if $c+d>k$ so that the denominator is $0$ that we have a problem. $\endgroup$
    – saulspatz
    May 17 '19 at 5:16

All you need to do is replace $k$ with $min(k,c)$. So the expression would become :

$E(X) = \sum_{x = 0}^{min(k,c)}x\frac{\binom{c}{x}\binom{d}{k-x}}{\binom{c+d}{k}}$


The comment of saulspatz answers your question, and what I write here is actually not an answer.

I would like to attend you on a simpler way to find $\mathbb EX $ (too large for a comment ).

Give the yellow balls numbers $1,2,\dots,c $ and let rv $X_i$ take value $1$ if ball $i $ is chosen and value $0$ otherwise.

Then $X=X_1+\cdots +X_c $.

Now apply linearity of expectation being aware of the fact that the $X_i $ have identical distribution with mean $\frac {k}{c+d} $.

So you will end up with: $$\mathbb EX=\frac {kc}{c+d} $$

I do not exclude that you already found this yourself on base of the hint.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.