Covariance between Bernoulli and Binomial Random Variable

293 Views Asked by At

I am given that $X$ is a Bernoulli random variable. I am also given vector $Y$ where $Y_1 = X$ and other $Y_i$ are also in Bernoulli Distribution.

Then, I am given $Z = Y_1 + ... + Y_n$ and am asked to calculate covariance between $X$ and $Z$.

So it seems like they are not independent. $E[X] = p$ and $E[Z] = np$ so $Cov(X,Z) = E[XZ] - np^2$ but when I tried to expand this out, I eventually ended up getting $0$ so does that mean the random variables are actually independent from each other or am I making some math error there? How would I go about getting $E[XZ]$? Help would be appreciated. Thanks.

1

There are 1 best solutions below

0
On BEST ANSWER
  • If I understand correctly, you are given vector $(Y_1, Y_2, ..., Y_n)$ but $Y_1=X$ so this is just $(X, Y_2, ..., Y_n)$ with all of them following an independent bernoulli distribution with parameter p. And you have $Z=X+Y_2+...+Y_n$. Thus covariance is linear in each of its arguments and we have

$$\begin{split}Cov(X,Z)&=Cov(X, X+Y_2+...+Y_n)\\ &=Cov(X,X)+Cov(X,Y_2)+...+Cov(X,Y_n)\\ &=Var(X)\\ &=p(1-p)\end{split}$$

  • You could also have done it your way, but your calculations are not right. We know $Cov(X,Z)=E(XZ)-\underbrace{E(X)}_{np}\underbrace{E(Z)}_{np*n}$. Now $E(XZ)=E(X^2+XY_2+...+XY_n)$. We need to find $E(X^2)$. This is $E(X^2)=Var(X)+[E(X)]^2=p(1-p)+n^2p^2$. So $E(XZ)=p(1-p)+n^2p^2+(n-1)*n^2p^2$. Thus

$$\begin{split}Cov(X, Z)&=p(1-p)+n^2p^2+(n-1)*n^2p^2-n^3p^2\\ &=p(1-p)\end{split}$$