A bag contains n white and 2 black cards.
A bag contains n white and 2 black cards. Balls are drawn one by one without replacement until a black is drawn. If 0,1,2,3,... white balls are drawn before the first black, a man is to receive $0^2$, $1^2,2^2, 3^3$,... rupees respectively. Find his expectation.
I have tried solving this question and have reached till $\frac{2}{(n+2)(n+1)}$ [$1^2n + 2^2(n-1) + 3^2(n-2) + .....+ n^2$] Is this right? What would be the final answer?
Thank you :)
$\endgroup$ 11 Answer
$\begingroup$Note: The previous edit was completely wrong, this should now be correct.
The key is to use linearity of expectation. Numbering the white balls from $1$ to $n$, let $W_i$ be a random variable equal to $1$ if the $i^{th}$ white ball is drawn before the two black ones, for each $i\in \{1,\dots,n\}$. Note $W=W_1+\dots+W_n$, so$$ E[W^2]=E[(W_1+\dots+W_n)^2]=\sum_{i=1}^n\sum_{j=1}^nE[W_iW_j] $$We then proceed in two cases.
If $i=j$, then $E[W_iW_j]=E[W_i^2]=P(W_i=1)$. This probability is $1/3$, since the $i^{th}$ white ball is equally likely to be before, between, or after the black balls.
If $i\neq j$, then $E[W_iW_j]$ is the probability that both white balls numbered $i$ and $j$ are before both black balls. You can show that this probability is $4/24=1/6$ (why?).
Therefore, we have$$ E[W^2]= n\cdot \frac13 + n(n-1)\cdot \frac1{6}=\frac{n(n+1)}3 $$
$\endgroup$