Submitted by zhenengxie on Wed, 06/03/2015 - 22:12
For part (i) I solution I have tried the following. Let $N$ be the number of balls drawn before and including the last white ball drawn. Using the hyper geometric distribution:
\[ P(N \leq n) = \frac{\binom{w}{w} \binom{b}{n-w}}{\binom{b+w}{n}} \]
Which simplifies to:
\[ P(N \leq n) = \frac{b! \times n!}{(b+w)! \times (n-w)!} \]
Also
\[ P(N = n) = P(N \leq n) - P(N \leq n-1) \]
\[ \therefore P(N = n) = \frac{b! \times n!}{(b+w)! \times (n-w)!} - \frac{b! \times (n-1)!}{(b+w)! \times (n-1-w)!} \]
Which simplifies to:
\[ P(N = n) = \frac{b! \times (n-1)! \times w}{(b+w)! \times (n-w)!} \]
for $w \leq n \leq b + w$ and 0 otherwise
\[ \therefore E(N) = \sum^{b+w}_{n = w} \frac{b! \times (n-1)! \times w}{(b+w)! \times (n-w)!} \times n \ = \sum^{b+w}_{n = w} \frac{b! \times n! \times w}{(b+w)! \times (n-w)!} \]
At which point I hit a brick wall, assuming what I've said to the point isn't nonsense. I've also had a look on TSR which gives a solution based on the binomial distribution. To quote:
"We may consider lining the balls up in a row and asking for the expected number of black balls to the left of the rightmost white ball. For each black ball, the probability that it is placed to the left of the last white ball is $\frac{w}{w+1}$ so the number of black balls to the left of the last white ball has a Binomial distribution with $n=b$ and $p=\frac{w}{w+1}$ so the expected number is $\frac{bw}{w+1}$"
I don't know how the probability of $p=\frac{w}{w+1}$ arises or why the binomial distribution would be appropriate. I would be grateful for any clarification.
TSR solution
Consider the $w$ white balls as fixed,
--- O --- O --- O --- O --- O ---
and we are placing the black balls in the gaps between the white balls (the --- in the above diagram). Each white ball is equally likely to be placed in any of the gaps.
Can you see why this is equivalent to specifying the drawing of balls from the bag?
What's the probability of placing a black ball in a specific gap? What's the probability of placing a black ball in any except the last gap (i.e. before the last white ball)?
A binomial is a sum of independent Bernoulli events - in this case the event is whether (or not) the $i$th black ball is placed before the last white ball.
Thanks!
Thanks!