Probability of drawing a white ball given optimal distribution of balls Suppose you have 10 white balls, 10 black balls, and 2 baskets. You may place some of the balls into one basket and the remaining balls into the other basket however you wish. After you are done, your friend Janelle will flip a fair coin to select one of the baskets, then randomly select one ball from it. If you want to maximize the probability that Janelle will select a white ball, how should you distribute the 20 balls into the 2 baskets, and for that distribution, what is the probability that Janelle draws a white ball?
 A: A formal derivation of the S. Dolan answer is: Define $w$ and $b$ as the number of white and black balls we place in the left bin, respectively.  For now assume 
\begin{align}
w &\in \{1, 2, ..., 9\}\\
b &\in \{0, 1, ..., 10\}
\end{align}
So we are temporarily assuming there is at least one white ball in each bin (this will be justified later). Let $p = P[\mbox{Pick white}]$. Then for any fixed $w \in \{1, ..., 9\}$ we have
\begin{align}
p &= \frac{1}{2}\left(\frac{w}{w+b}\right) + \frac{1}{2}\left(\frac{10-w}{20-w-b}\right) \\
&\leq \max_{x \in \{0, 1, ..., 10\}}\left[ \frac{1}{2}\left(\frac{w}{w+x}\right) + \frac{1}{2}\left(\frac{10-w}{20-w-x}\right) \right]\\
&\overset{(a)}{\leq} \max_{x \in [0, 10]} \underbrace{\left[ \frac{1}{2}\left(\frac{w}{w+x}\right) + \frac{1}{2}\left(\frac{10-w}{20-w-x}\right) \right]}_{\mbox{convex in $x$}} 
\end{align}
where (a) holds because it relaxes the integer constraint $x \in \{0, 1, ..., 10\}$ to the interval constraint $x \in [0, 10]$. The expression in the underbrace is a convex function of $x$, so  the maximum occurs at an endpoint (either $x=0$ or $x=10$).  So, regardless of $w \in \{1, ..., 9\}$,  we should place all black balls in a particular bin. 
Recall we are limiting ourselves to the choices $w \in \{1, ..., 9\}$, so we can optimize over this given that one of the bins has all the black balls.  It is clear that we should not place more than 1 white ball in the bin with no black balls (since adding any more would not increase the conditional probability of drawing white given that bin, and would diminish the conditional probability given the other bin). 
So, assuming WLOG we place all black balls in the left bin, we want to place exactly one white ball in the right bin and the remaining 9 in the left, which is the same as the S. Dolan answer.  So:
$$ w^* = 9, b^*=10$$
$$ p^* = \frac{14}{19}>\frac{1}{2}$$
Now we must argue that allowing $w=0$ or $w=10$ is no good: Placing all white balls in a particular bin means that the probability of picking a white ball is at most $1/2$, which is not as good as the solution $p^*$.
A: Put one white ball in a basket and all remaining balls in the other basket.
Then the probability of a white ball being picked is $\frac{1}{2}\times1+\frac{1}{2}\times\frac{9}{19}=\frac{14}{19}.$
Proof
Any arrangement with unequal numbers of white and black balls in a basket must have a basket containing more black balls than white. The probability of choosing a white ball from that basket would be at best $\frac{1}{2}\times \frac{9}{19}.$ The probability of choosing a white ball from the other basket would be at best $\frac{1}{2}\times 1$ and therefore the answer given is optimal. 
