A puzzle in maximizing an expected value You have 10 pennies and 10 dollars. How do you distribute   them in two identical bottles so that the expected value of the coin randomly picked from one of the bottles (the bottle is also randomly selected) is maximized? 
I was asked this during an interview, and I said that if you put 1 dollar in one bottle and the rest of the 19 coins in the other bottle this would be the maximizing strategy , but I want to know if this is the right answer
 A: Your answer is correct.
This problem can be solved by writing an equation for the expected value and optimizing it.  But there's an easier way.
When the Haverford College Problem Solving Group discussed this problem earlier this fall, they found the following two-step solution.  
Consider the smaller of the two total numbers of coins in the two bottles.  If the corresponding bottle has any pennies in it, the other bottle must have some dollars.  Your expectation increases--without changing the total coin counts in either bottle--if you swap a penny from the smaller bottle with a dollar from the larger one, because you have increased the value of the smaller bottle by 99 cents and decreased the value of the large bottle by 99 cents, but the 99 cents in the smaller bottle is worth more because it is a larger proportion of the number of coins in the bottle.  Repeating these swaps for as long as possible demonstrates that an optimum must have all dollars, and no pennies, in one bottle.  (You need to rule out the possibility that an optimal solution might have equal numbers of coins in each bottle.  That is easy to do after you have found the optimum, which is the next step.)
Starting from any such configuration (with the first bottle having only dollars in it), moving a dollar from the first bottle to the second obviously will not change the expected value of the first (provided you leave at least one dollar in it!) and will increase the expected value of the second, because its proportion of dollars increases.  The expected value of the game will therefore increase each time you do this until just one dollar remains in the first bottle.  It is easy to check that moving that last dollar out, so that no money is in the first bottle, is not optimal.  Therefore the one-dollar-in-one-bottle configuration is the unique best one.
