Draw nickels and dollar coins until $p$ dollars, expectation

algebra-precalculuscombinatoricsexpected valueprobability

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).

Best Answer

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)}.$$

Expectation

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\}.$$

Related Question