Suppose a box contains $10$ green, $10$ red, and $10$ black balls. We draw $10$ balls from the box by sampling with replacement. Let $X$ be the number of green balls, and $Y$ be the number of black balls in the sample.
Find $E[XY]$.
I was thinking that this is a multinomial distribution. The pmf would be as follows:
$$P(XY) = {10!\over(10!)(10!)} (1/3)^x (1/3)^y$$
The problem with this approach is that I have to then go through and calculate all of the individuals probabilities $( (0,0)...(0,10),(1,0)...(1,10)$, etc. )
Is there a shorter way to do this? While I'm pretty sure that the way that I'm doing it would be correct if I took the time to calculate everything, it would be really time consuming. I'm pretty sure there is a shorter way to do this.
Suppose we repeat the experiment $n$ times. Here $n=10$.
For $i=$ to $n$, define Bernoulli random variables $X_i$ by $X_i=1$ if on the $i$-th draw we get a green, and by $X_i=0$ otherwise. Define $Y_i$ analogously for black. Then $X=X_1+\cdots +X_n$ and $Y=Y_1+\cdots +Y_n$, and $$XY=(X_1+X_2+\cdots+X_n)(Y_1+Y_2+\cdots +Y_n).$$ Imagine expanding the product on the right. We get terms $$X_1Y_1+X_1Y_2+\cdots+X_1Y_n,$$ and similar terms with $X_2$, $X_3$, and so on.
By the linearity of expectation, for $E(XY)$ we want the sum of the expectations of all these terms.
Note that $E(X_iY_i)=0$, since $X_i$ and $Y_i$ cannot be simultaneously $1$. And $E(X_iY_j)=\frac{1}{3}\cdot\frac{1}{3}$ if $i\ne j$, for then $X_i$ and $X_j$ are independent.
So our sum of the expectations has $n^2-n$ terms all equal to $\frac{1}{9}$. It follows that $E(XY)=\frac{n^2-n}{9}$.
Remark: The method of Indicator Random Variables that we used is quite powerful. In many cases, we can use it to bypass the sometimes painful process of finding (and using) the probability mass function.
There are other ways to solve our particular problem without explicit use of the pmf. Another good way is by the method of Conditioning, which I will leave to someone else to do.