# Probability - Balls and Buckets; variance question

I've been working on this problem for a while and its giving me no end of trouble! The question is this: Suppose we have 2k buckets, numbered 1 through 2k. We throw x black balls and y white balls, at random, towards the buckets. A black ball has twice the chance of landing in an odd bucket as landing in an even one, and a white ball has twice the chance of landing in an even bucket as landing in an odd one. Aside from this, the chances of a ball falling into a certain bucket is evenly distributed (i.e. a black ball is just as likely to land in bucket 1 as bucket 15, etc). I'm trying to compute $E(z)$ and $Var(z)$, where $z$ is the number of buckets that have at least one ball in them.

It seems to me that it may be easier to look at the chance that bucket i is empty, as follows:

Pr(bucket i is empty|bucket is odd) = $(\frac{3k-2}{3k})^x(\frac{3k-1}{3k})^y$,

and Pr(bucket i is empty|bucket is even) = $(\frac{3k-2}{3k})^y(\frac{3k-1}{3k})^x$.

If we let $Z_i$ equal 1 if the bin is empty and 0 otherwise, our expected value should be $((\frac{3k-2}{3k})^x(\frac{3k-1}{3k})^y)\cdot k$ $+$ $((\frac{3k-2}{3k})^y(\frac{3k-1}{3k})^x)\cdot k$.

This expression seems really unwieldy though, and calculating variance and covariance with it seems an almost insurmountable task - am I going about this in an incorrect fashion? Thanks so much for your help!

Edit: Attempting to continue down this path, running into some issues?

If I go along with this, I'm looking for $\sum E(z_i^2) + \sum\sum_{i\neq j}E(z_iz_j)+E(z)^2$, where the first sum is equal to $\sum E(z_i)$, since $z$ takes on values either 1 or 0. There are four cases for the covariance term in the middle: i is odd, j is odd; i is odd, j is even; i is even, j is odd; i is even, j is even. If i and j are both even or odd, there are $k^2$ possibilities for [both odd] and for [both even]. Otherwise, there are $k^2-k$ possibilities for each case.

So I must calculate probabilities of four cases:

1.) Given: i is odd, j is odd Pr(no balls in i)$x$Pr(no balls in j|no balls in i):

$\large (k^2-k)*((\frac{3k-2}{3k})^x\cdot (\frac{3k-1}{3k})^y\cdot (\frac{3k-4}{3k-2})^x\cdot (\frac{3k-2}{3k-1})^y)$

The first half of the expression is just the probability that nobody gets off at floor i. The second half needs to take into account that one of the odd buckets will not have balls in it.

The rest of the cases are basically the same, with minor tweaks. Assuming this is correct, do I just attempt to plug in these expressions in the variance expression above and do my best to simplify?

thanks for the help!

• Do you have any explanation for the fact that this question asked the same thing in a different formulation within $8$ hours of yours, and that you write "nobody gets off at floor $i$" in the other question's wording once? Did you reformulate the question about elevators and floors? If so, why? – joriki Dec 19 '12 at 11:00

No, you're going about this in the right way, except you forgot to switch $x$ and $y$ between the even and odd cases, and "bucket $i$ is empty" should read "bucket $i$ is not empty". I don't think calculating the variance with this approach is as bad as you think.