# Binomial distribution Question about the product of two individual random variables

How do you solve this question:

Consider two independent binomially-distributed random variables $X \sim B(2, a)$ and $Y \sim B(2, b)$. Let $W$ be the random variable that represents the product of each value of $X$ with each value of $Y$. Construct a table showing the probability distribution of $W$. Hence find an expression for $\mathrm{E}(W)$ in terms of $a$ and $b$.

$X$ and $Y$ take on values 0,1,2, so $XY$ takes on values $0,1,2,3,4$.

The probability of $P(W=w) = \sum_{x,y: xy=w} P(X=x,Y=y) = \sum_{x,y: xy = w} P(X=x) P(Y=y)$.

For example, $P(W=0)$ will involve the $(x,y)$ pairs: $(0,0),(0,1),(0,2),(1,0),(2,0)$.

Then, $E[W] = \sum_{w=0}^4 P(W=w)$.

Hint:

$P(X=k_1,Y=k_2)=P(X=k_2)\cdot P(Y=k_2)=f_{X,Y}(x,y)$

$=\binom{n_1}{k_1}\binom{n_2}{k_2}\cdot a^{k_1}\cdot (1-q)^{n_1-k_1}\cdot b^{k_2}\cdot (1-b)^{n_2-k_2}$

with $X \sim B(n_1,a)$ and $Y \sim B(n_2,b)$

For $n_1=n_2=2$ you need a 3x3 table.

The expected value is $E(XY)=\sum_{k_1=0}^2 \sum_{k_2=0}^2 k_1 \cdot k_2\cdot f_{X,Y}(x,y)$

$=\sum_{k_1=0}^2 \sum_{k_2=0}^2 k_1 \cdot k_2\cdot \binom{2}{k_1}\binom{2}{k_2} a^{k_1}\cdot (1-a)^{2-k_1}\cdot b^{k_1}\cdot (1-b)^{2-k_2}$