Ball and Bin Questions
We can ask a variety of questions about the ball tossing process. As a first question, we ask:
How many balls fall in a given bin assuming `n` tosses?
- Since tossing a ball into a given bin is a Bernoulli trial, the odds of `k` successes given `n` tosses follows the binomial distribution `b(k;n, x_(i\n\-\b\i\n))`, where `x_(i\n\-\b\i\n)= Pr{\text{ball in bin}} = 1/b`; `x_(n\ot\-i\n\-b\i\n) = Pr{\text(ball not in bin)}= 1-1/b`.
- The sample space for the binomial distribution is `{1,2,...}` the possible values for `k`.
- The probability of a given event can be determined by considering
`(x_(i\n\-\b\i\n) + x_(n\ot\-i\n\-b\i\n))^n=(1/b +(1-1/b))^n = 1`.
- Expanding the left hand side and right hand side gives terms
`((n),(k)) cdot x_(i\n\-\b\i\n)^k cdot x_(n\ot\-i\n\-b\i\n)^(n-k) = ((n),(k)) 1/(b^k) cdot (1 - 1/b)^(n-k)`
which represent the probability of getting `k` balls after `n` tosses.
- Let `X` be a random variable whose value is the number of tosses to fall in the bin. Then
`E[X]= sum_(k=1)^n k ((n),(k)) 1/(b^k) cdot (1 - 1/b)^(n-k)`
`= n(1/b) sum_(k=1)^n ((n - 1),(k -1)) 1/(b^(k-1)) cdot (1 - 1/b)^(n-k)`
`= (n/b) sum_(k=0)^(n -1) ((n - 1),(k))1/(b^k) cdot (1 - 1/b)^((n - 1) -k)` notice the sum is
`(x_(i\n\-\b\i\n) + x_(n\ot\-i\n\-b\i\n))^(n -1) = 1` so
`=n/b`