3
$\begingroup$

I have two urns, urn $1$ contains $k$ white balls and $l$ red balls, urn $2$ contains $n - k$ white balls and $n -l$ red balls. I have the total probability

$ P($ "white ball is drawn" $) = \frac{k}{k + l} \frac{1}{2} + \frac{n - k}{2n - (k + l)} \frac{1}{2}$

and I would like to find $k$ and $l$ such that this probability is maximal. How can I do that? I tried to set the derivative of $P$ with respect to $k$ zero but this gets awfully complicated. Is there a better way to do this? Many thanks for your help!

3 Answers 3

2

If you set $m = k+l$, then the probability of selecting a white ball can be expressed as $$ P_w = \frac{k}{2m} + \frac{n-k}{2(2n-m)} = \frac{k(2n-m) + (n-k)m}{2m(2n-m)} = \frac{2k(n-m) + nm}{2m(2n-m)}. $$ This is invariant under $(k,m)\rightarrow(n-k,2n-m)$ (which just exchanges the urns), so we can assume $m \le n$ with no loss of generality. If $m=n$, we have $P_w = 1/2$. For $m

1

Hint: First try with the same number of black and white balls, as it will lead you to the solution in the more general case. Note that if you have the same number of balls in each urn, the probability is 1/2 regardless of the distribution. So to get the probability away from 1/2 it needs to be unbalanced. Also if each urn is equally split, the probability will be 1/2 regardless of how many balls are in each urn. So imagine transferring a black ball from one urn to the other and see what it does to the probability. There is a solution that is easy to convince yourself is optimal once you see it.

  • 0
    Imagine there are lots of balls, equal numbers black and white. This way you get 1/2 chance you select urn 1 (and so will win) and if you select urn 2 you have (almost) 1/2 chance of winning. So your total chance is (almost) 3/4. You get so much chance of winning for so few (one) white balls, how can anything be better? Clearly not rigorous, but many find it convincing.2011-02-10
1

Hint: change variables.

Call $b_1 = l_1 + k_1 $ the balls in urn 1, $b_2 = l_2 + k_2 $ the balls in urn 2. We may assume $l_1 , l_2$ are fixed, and that $b_1,b_2$ are our variables, subject to the restriction $b_1 + b_2 = 2n$

You want then to maximize

$\displaystyle \frac{b_1-l_1}{b_1}\frac{1}{2} +\frac{b_2-l_2}{b_2}\frac{1}{2}$

which is the same that minimize

$\displaystyle g(b_1,b_2) = \frac{l_1}{b_1} + \frac{l_2}{b_2}$

(with the restriction $b_1 + b_2 = 2n$)

From this, you can continue (Lagrange multipliers or whatever).

FYI, I get (assuming real values)

$\displaystyle \frac{b_1^2}{l_1} = \frac{b_2^2}{l_2}$

which leds to

$\displaystyle k_1 = \frac{2n}{1+\sqrt{l_2/l_1}}-l_1$

  • 0
    Thanks. I'm supposed to get $k=1, l=0$, how do you get that from what you wrote? I think you can assume natural values instead of reals because balls should occur in natural numbers ; )2011-02-10
  • 0
    Well, I assumed you only have `k` variable, `l` fixed.2011-02-10