Home > Riddles > White balls in two boxes

White balls in two boxes

Chance and uncertaintyLevel 4 · Advanced · ●●●●○

You have 50 white balls and 50 black balls.
You must distribute them in two boxes, complying with:

  • each box has at least one ball.

Then this experiment is done:

  1. one of the two boxes is chosen at random (probability 1/2 each),
  2. A ball is drawn at random from that box.

You win if the ball drawn is white.
How should you distribute the balls to maximize the probability of winning?
What is that maximum probability?

Hints

Show hints
  1. And it is verified that p(x) decreases with x, so the maximum occurs at x=1.
  2. With that distribution: $\mathbb{P}(\text{blanca})=\frac12\cdot1+\frac12\cdot\frac{49}{99}=\frac{148}{198}\approx0.7475$.
  3. Place 1 single white ball in one box, and the other 99 (49 white and 50 black) in the other.

Solution

Show full solution

Back to problem
Answer: Place 1 single white ball in one box, and the other 99 (49 white and 50 black) in the other.
With that distribution:

$$ \mathbb{P}(\text{blanca})=\frac12\cdot1+\frac12\cdot\frac{49}{99} =\frac{148}{198}\approx0.7475. $$

To justify optimality, in an optimal solution the “small” box should not contain black balls (they only worsen its white fraction).
If that box has white $x$ and 0 black ones, the probability is:

$$ p(x)=\frac12+\frac12\cdot\frac{50-x}{100-x},\quad 1\le x\le50. $$

And it is verified that $p(x)$ decreases with $x$, so the maximum occurs in $x=1$.
Conclusion: the exact maximum is $\frac12+\frac12\cdot\frac{49}{99}\approx74.75\%$.


Related riddles

Keep practicing

If you enjoyed this one, try more pure-logic riddles, explore this theme, browse the full archive, or read the riddle-solving guide.

← Previous: The relay of messages · Next: The impossible coloring from 1 to 5 →