How can $20$ balls, $10$ white and $10$ black, be put into two urns so as to maximize the probability of drawing a white ball if an urn is selected at random and a ball is drawn at random from it?
The correct answer is to put $1$ white ball in an urn and the remaining $9$ white and $10$ black balls in the other urn. How does one prove this?
The probability of choosing a white ball is
$$P(\mbox{w}) = \frac12\frac{\# \mbox{white in urn 1}}{\mbox{total in urn 1}} + \frac12\frac{\# \mbox{white in urn 2}}{\mbox{total in urn 2}}.$$
If each urn has an equal number of white and black balls, then $P(\mbox{w})$ is always $50\%$.
Otherwise, one of the urns has more black balls than white, let's say urn 2. Therefore, $$\frac{\# \mbox{white in urn 2}}{\mbox{total in urn 2}} < \frac12.$$ Now let's also assume that there is atleast one black ball in each urn. In this case,
$$\frac{\# \mbox{white in urn 1}}{\mbox{total in urn 1}} \leq \frac{10}{11} \hspace{.3in} \mbox{(in case 10w,1b)},$$ therefore $$P(\mbox{w} \ \big| \ \mbox{atleast one black in each}) < \frac12 \frac{10}{11} + \frac12 \frac12 \approx .705.$$
Finally, we check the case where there is not atleast one black ball in each urn. So let urn 1 have 1w,0b and urn 2 have 9w,10b, and check that the probability of white in this case is $>.73$. Also note that any more white in the first urn are redundant: it won't change the probability of getting white if the first urn is chosen (it's already 100%), and it will always lower the probability of getting white in the second urn. Therefore the best option is 1w,0b in one urn, and 9w,10b in the other.