Expected number of good presents

29 Views Asked by At

Given $b$ boys and $g$ girls. Children give presents to each other. They know who gives a present whom from random permutation of $1,2,\dots b+g$. If child gives present to child with same gender present is good with probability $p_1$, otherwise probability is $p_2$. Presents are good independently. We have a random variable $X$ representing number of good presents. What is $E(X)$ and $Var(X)$?

My idea of solving this: Without loss of generality I assume that $g \le b$. Let $f(k)$ - number of permutations representing cases in which exactly $k$ girls give present to boys. $f(k) = [g (g-1)\cdots (g-k+1)b(b-1) \cdots (b-k+1)]\cdot [g (g-1)\cdots (g-k+1)]\cdot b! = \frac{g!}{(g-k)!}\frac{b!}{(b-k)!} \frac{g!}{(g-k)!}b!$ $E(X) = \sum\limits_{k=0}^{g}{\frac{f(k)}{(b+g)!}(E(Binom(b+g-2k, p_1))+E(Binom(2k, p_2)))} = \frac{g!g!}{(b+g)!}\sum\limits_{k=0}^{g}{\frac{(b+g-2k)p_1+(2k)p_2}{(b-k)!(g-k)!(g-k)!}}$

How to finish it?

1

There are 1 best solutions below

1
On

This is a good example of when using indicator random variables is extremely helpful and avoids the sort of complicated computation that your first attempt involves.

Let $I_i$ be the indicator for the event $\{\text{the $i$th child received a good present}\}$ (that is, $I_i$ equals $1$ if the event holds, and otherwise equals $0$). Then $X = \sum_{i=1}^{b+g} I_i$ so $$E[X] = E\left[\sum_{i=1}^{b+g} I_i \right]= \sum_{i=1}^{b+g} E[I_i].$$ It is much easier to compute each $E[I_i]$ individually than to compute $E[X]$ directly.

So, the remaining task is to compute $$E[I_i] = P(\text{the $i$th child received a good present}) = \cdots$$ for each $i$. Can you take it from here?


Similarly, $$E[X^2] = E\left[\left(\sum_{i=1}^{b+g} I_i\right)^2\right] = \sum_{i=1}^{b+g} E[I_i^2] + 2 \sum_{i \ne j} E[I_i I_j].$$ If we compute this, we can compute the variance of $X$.

Note $E[I_i^2] = E[I_i]$ because $I_i$ takes values $0$ or $1$, and note that you have already computed this quantity above. Thus the only new quantity we have left to compute is $E[I_i I_j]$ for $i \ne j$. This is $$E[I_i I_j] = P\text{(both children $i$ and $j$ receive good presents}) = \cdots$$ Can you take it from here?