Die and coin variance of random variable question.

42 Views Asked by At

Die and coin. Roll a die and flip a coin. Let $Y$ be the value of the die. Let $Z = 1$ if the coin shows a head, and $Z = 0$ otherwise. Let $X = Y + Z$. Find the variance of $X$.

My work:

$E(Y) = 1 \cdot \cfrac{1}{6} + 2 \cdot \cfrac{1}{6} + 3 \cdot \cfrac{1}{6} + 4 \cdot \cfrac{1}{6} + 5 \cdot \cfrac{1}{6} + 6 \cdot \cfrac{1}{6} = \cfrac{7}{2}$

$E(Z) = 0 \cdot \cfrac{1}{2} + 1 \cdot \cfrac{1}{2} = \cfrac{1}{2}$

So $E(X) = E(Y + Z) = E(Y) + E(Z) = \cfrac{7}{2} + \cfrac{1}{2} = 4$

$E(Y^2) = 1^2 \cdot \cfrac{1}{6} + 2^2 \cdot \cfrac{1}{6} + 3^2 \cdot \cfrac{1}{6} + 4^2 \cdot \cfrac{1}{6} + 5^2 \cdot \cfrac{1}{6} + 6^2 \cdot \cfrac{1}{6} = \cfrac{91}{6}$

$E(Z^2) = 0^2 \cdot \cfrac{1}{2} + 1^2 \cdot \cfrac{1}{2} = \cfrac{1}{2}$

so $E(X^2) = E(Y^2 + Z^2) = E(Y^2) + E(Z^2) = \cfrac{91}{6} + \cfrac{1}{2} = \cfrac{47}{3}$

$Var(X) = E(X^2) - (E(X))^2 = \cfrac{47}{3} - 4^2 = -\cfrac{1}{3}???$

Where did I go wrong, variance can't be negative so clearly my work is wrong, but I have no idea where I went wrong? Can someone point me in the right direction of how to do this question?

2

There are 2 best solutions below

3
On BEST ANSWER

$Y\perp\!\!\!\!\!\!\perp Z$ thus $V(X)=V(Y)+V(Z)$


Your error is this

$$E(X^2)=E[(Y+Z)^2] \ne E(Y^2)+E(Z^2)$$

4
On

$E(X^2)\ne E(Y^2+Z^2)$

$E(X^2)=E(Y^2+Z^2+2YZ)=E(Y^2)+E(Z^2)+2E(YZ)=\dfrac{91}{6}+\dfrac{1}{2}+2\cdot\dfrac{7}{2}\cdot \dfrac{1}{2}=\dfrac{47}{3}+\dfrac{1}{2}=\dfrac{97}{6}$

$V(X)=E(X^2)-E(X)^2=\dfrac{97}{6}-16=\dfrac{97-96}{6}=\dfrac{1}{6}$

An alternate way:

Since X and Y are independent events covariance term vanishes therefor $V(X)=V(Y)+V(Z)=E(X^2)-E(X)^2+E(Z^2)-E(Z)^2$