Expected value of the number of bills

253 Views Asked by At

Every day I put 1 or 2 dollars in the piggy bank with probability $1/2$. What's is expected value number of 2-dollar bills when in the piggy bank will be for the first time at least 100 dollars ?

I know what is going on. Let $X$- number of 2-dollar bills.

1) $X=1$ :

1 dollar- 98 bills and 2 dollars- 1 bill or 1 dollar - 99 bills and 2-dollars- 1 bill

2) $X=2$

1 dollar- 96 bills and 2 dollars- 2 bills or 1 dollar- 97 bills and 2 dollars- 2 bills

etc.

Unfortunately, I can't think of a quick way.

3

There are 3 best solutions below

2
On

This of it this way. You have $101\ \ \$1$ and $50\ \ \$2$. You have to use combination to get either $100$ or $101$.

So the total no of ways you can do it for $\$100$ is $$\sum_{n=0}^{100}\ ^{100}C_{n}\cdot^{50}C_{(100-n)/2}$$ where $n$ is even

And for $\$101$ is $$\sum_{n=1}^{101}\ ^{101}C_{n}\cdot^{50}C_{(100-n+1)/2}$$ Where $n$ is odd

So for getting $\$100$ there are total $51$ combinations. And for $\$101$ there are $51$ ways. So total $102$ combinations.

3
On

You expect to have an equal number of \$1 and \$2 bills in your bank, so when your total is $\$N$ you expect to have $\frac N3$ \$2 bills.

The hitch for this is that the first time you have at least \$100, you might have jumped over \$100 to get \$101. There are exactly three equally likely cases for the last step: you went from \$98 to \$100, you went from \$99 to \$100, and you went from \$99 to \$101.

All totaled, that gives an expected number of \$2 bills of $$\frac13\left(\frac{98}3+1+\frac{99}{3}+0+\frac{99}{3}+1\right)=33\frac59$$

1
On

You either reach $100$, or you reach $99$ and then draw a $2$-dollar bill. The probability to reach $100$ with $k$ $2$-dollar bills and $100-2k$ $1$-dollar bills is $\binom{100-k}k2^{k-100}$. The probability to reach $99$ with $k$ $2$-dollar bills and $99-2k$ $1$-dollar bills is $\binom{99-k}k2^{k-99}$. Thus the expected number of $2$-dollar bills is

\begin{eqnarray*} &&\sum_{k=0}^{50}k\binom{100-k}k2^{k-100}+\frac12\sum_{k=0}^{49}(k+1)\binom{99-k}k2^{k-99}\\ &=&\frac2{27}\left(299+301\cdot2^{-100}\right)+\frac1{27}\left(305-605\cdot2^{-100}\right)\\ &=& \frac{301-3\cdot2^{-100}}9\\ &\approx&\frac{301}9\\ &=&33\frac49\;. \end{eqnarray*}