Here's a question from my probability textbook:

A bag contains $m$ dollar coins and $n$ nickels. A man is allowed to draw coins one by one until he has drawn at least $p$ dollars. Show that the value of his expectation is ${{np}\over{20(m+1)}} + p$ dollars.

Here's what I did. We space our $m$ dollar coins equally so that they partition our $n$ nickels into $m+1$ parts of ${n\over{m+1}}$ nickels each. And each of those parts will have value of ${n\over{20(m+1)}}$ dollars. So then our desired expectation ${{np}\over{20(m+1)}} + p$ dollars is equal to drawing coins up until the $p$th (evenly spaced) dollar coin.

But these are just my observations, I'm not sure if I have even showed what we wanted to show. Have I just merely asserted what we want to show without explanation? How can I conclude the result? What am I missing? Is the problem statement even correct?

Update: To clarify, I realize the problem statement means at least $p$ dollar coins, hence the solution method I gave and also Yuri Negometyanov's solution below. But I am more interested in the answer when it's at least $p$ dollars in money (and not at least $p$ dollar coins).

  • $\begingroup$ What is a nickle? $\endgroup$ Oct 27, 2021 at 3:44
  • $\begingroup$ @GrahamKemp A nickel is a 5 cent coin. There are 100 cents in every dolllar. $\endgroup$ Oct 27, 2021 at 3:45
  • $\begingroup$ Is the question asking for the expected value until he has drawn p dollar coins, or just p dollars in value? $\endgroup$ Oct 27, 2021 at 4:15
  • 1
    $\begingroup$ The question seems wrong, or I need some clarification. If $n = 0$ then $p$ has to be an integer for the formula to make sense. His expectation is $p$, everything is fine; but this suppose that $p$ is an integer, otherwise it should be $p+1$ and that is not the case. if now $m = 0$ then his expectation is again... $p$ because $p$ is an integer; and clearly it can be divided by nickels. But this is not what the formula gives you... $\endgroup$ Oct 29, 2021 at 11:17
  • 1
    $\begingroup$ I understand this as an expectation in value (i.e. what the man ends up with at the end of the game) and not in the number of times he picks a coin inside the bag. But perhaps I am mistaken ? $\endgroup$ Oct 29, 2021 at 11:19

1 Answer 1


Let $\;P(p,q)\;$ is the possibility to get $\;p\;$ dollars and $\;q\;$ nickels of $\;(p+q)\;$ coins, when the last coin is a dollar.

Also, let $\;Q(p,q)\;$ is the possibility to get $\;p\;$ dollars and $\;q\;$ nickels of $\;(p+q)\;$ coins, when the last coin is a nickel.

Then $$P(p,q)=\dfrac{\dbinom{m}{p-1}\dbinom{n}{q}}{\dbinom{m+n}{p+q-1}}\,\dfrac{m-p+1}{m+n-q-p+1}$$ $$=\dfrac{m-p+1}{m+n-q-p+1}\, \dfrac{m!n!(p+q-1)!(m+n-p-q+1)!}{(p-1)!(m-p+1)!q!(n-q)!(m+n)!}$$ $$=\dfrac{m!n!(p+q-1)!(m+n-p-q)!}{(p-1)!(m-p)!q!(n-q)!(m+n)!} =\dfrac{\dbinom{p-1+q}{p-1}\dbinom{m+n-p-q}{m-p}}{\dbinom{m+n}{n}},\,$$ $$Q(p,q)=\dfrac{\dbinom{m}{p}\dbinom{n}{q-1}}{\dbinom{m+n}{p+q-1}} \,\dfrac{n-q+1}{m+n-p-q+1}$$ $$=\dfrac{n-q+1}{m+n-p-q+1}\, \dfrac{m!n!(p+q-1)!(m+n-p-q+1)!}{p!(m-p)!(q-1)!(n-q+1)!(m+n)!}$$ $$=\dfrac{m!n!(p+q-1)!(m+n-p-q)!}{p!(m-p)!(q-1)!(n-q)!(m+n)!} =\dfrac{\dbinom{p+q-1}{q-1}\dbinom{m+n-p-k}{m-p}}{\dbinom{m+n}{n}},\,$$ $$\sum\limits_{q=0}^n P(p,q)=1$$ Sum of probabilities

and similarly $$\sum\limits_{p=0}^m Q(p,q)=1.$$

If $\;n<20,\;$ then the expectation of the money sum is $$E_{\tilde p}\left(p+\dfrac{q}{20}\right)= \tilde p +\dfrac1{20}\sum\limits_{q=0}^n qP(\tilde p,q)=\tilde p+\dfrac{n\tilde p}{20(m+1)}.$$


In the common case, $\;Q(p,q)\;$ does not influence to the fractional part of the sum, and $$E_{\tilde p}\left(p+\dfrac{q}{20}\right)= \tilde p +\left\{\sum\limits_{q=0}^{\min(n,10\tilde p)}\genfrac\{\}{}0q{20}P(p,q)\bigg|_{p=\tilde p- {\small\genfrac\lfloor\rfloor{}0q{20}}}\right\}.$$

  • $\begingroup$ Thanks @Yuri. See my update where I give some clarification as to what I'm looking for. $\endgroup$ Nov 3, 2021 at 5:47
  • $\begingroup$ @EmperorConcerto Thanks! Tried to fix. $\endgroup$ Nov 3, 2021 at 12:44

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.