Expected Value and Variance with Substitution?

In preparation for a statistics test, I came across this practice question that is causing me a lot of difficulty:

X, Y, and Z are i.i.d random variables with mean = 4 and variance = 1. Let W = $$\frac{1}{\sqrt3}$$XY - 2Z - $$\frac{16}{\sqrt3)}$$. Compute E(W) and Var(W).

I'm not quite sure how to approach it. First, I tried simplifying E(W), and got -8, which I don't think is correct:

E(W) = $$\frac{1}{\sqrt3}$$(E(X)E(Y))- 2E(Z) - $$\frac{16}{\sqrt3}$$

E(W) = $$\frac{1}{\sqrt3}$$(4)(4) - 2(4) - $$\frac{16}{\sqrt3}$$ = - 8

I know that $$\operatorname{Var}(W) = E(W^2)-[E(W)^2]$$, but that's basically it. Is it just a matter of substituting 1 into the equation? I'm not quite sure how to proceed.

Thanks!

You have correctly computed \begin{align} E[W] &= E\left[\frac{1}{\sqrt{3}}XY - 2Z -\frac{16}{\sqrt{3}}\right]\\ &= \frac{1}{\sqrt{3}}E[XY] - 2E[Z] -\frac{16}{\sqrt{3}} &\scriptstyle{\text{linearity of expectation}}\\ &= \frac{1}{\sqrt{3}}E[X]E[Y] - 2E[Z] -\frac{16}{\sqrt{3}} &\scriptstyle{X~\text{and}~Y~\text{are independent}}\\ &= \frac{1}{\sqrt{3}}\times 4 \times 4 - 2\times 4 - \frac{16}{\sqrt{3}}\\ &= -8. \end{align} You made a correct start to finding the variance of $$W$$ as $$\operatorname{Var}(W) = E(W^2)-(E[W])^2$$. You know the value of $$(E[W])^2$$ already from the above. Now all that remains is to figure out $$E[W^2] = E\left[\left(\frac{1}{\sqrt{3}}XY - 2Z -\frac{16}{\sqrt{3}}\right)^2\right]$$ which you can do by multiplying out the square. You will get six terms of which one will have $$X^2Y^2$$ in it, another $$Z^2$$ in it, yet another $$XYZ$$, and one with $$XY$$ in it. Use linearity of expectation to write $$E[W^2]$$ as the sum of six expectations, and then use independence of $$X$$, $$Y$$, and $$Z$$ to write $$E[XYZ]$$ as $$E[X]E[Y]E[Z]$$ etc. Don't forget that $$E[X^2] = \operatorname{Var}(X) + (E[X])^2$$ etc. Good luck!

----------------

Since writing the above, BruceET, in a comment that he regrettably declines to incorporate into his own answer, has come up with a much simpler computation for $$\operatorname{Var}(W)$$. Since comments are ephemeral and can de deleted at any time by the author, I am memorializing this method below.

Since $$XY$$ and $$Z$$ are independent random variables, $$\operatorname{Var}(W) = \operatorname{Var}\left(\frac{1}{\sqrt{3}}XY - 2Z -\frac{16}{\sqrt{3}}\right) = \frac{1}{{3}}\operatorname{Var}(XY)+4\operatorname{Var}(Z).$$ We of course know that $$\operatorname{Var}(Z) = 1$$, while \begin{align} \operatorname{Var}(XY) &= E[(XY)^2] - \left(E[XY]\right)^2\\ &= E[X^2Y^2] - \left(E[XY]\right)^2\\ &= E[X^2]E[Y^2] - \left(E[X]E[Y]\right)^2\\ &= \left(\operatorname{Var}(X)+(E[X])^2\right)\left(\operatorname{Var}(Y)+(E[Y])^2\right)- \left(E[X]E[Y]\right)^2\\ &= 17^2-16^2\\ &= (17+16)(17-16)\\ &= 33 \end{align} leading to $$\operatorname{Var}(W) = \frac{1}{{3}}\operatorname{Var}(XY)+4\operatorname{Var}(Z) = 15.$$ And that's it. No fuss, no complicated calculations, no million simulations yielding a sample variance of $$14.99188$$ which R rounds off to $$15$$ as the approximate value of the variance, instead of the above direct mathematical computation giving the exact value of the variance as $$15$$. Ah well, de gustibus non est disputandam.....

• Too much? Given $E(X)=E(Y)=4,$ easy to see $E(X^2)=E(Y^2)=17,$ so $V(XY) = 17^2-16^2 = 33.$ Whence $V(W) = \frac 13V(XY)+4V(Z)=\frac 13(33) + 4(1) = 15.$ Sep 29, 2019 at 23:41
• @BruceET Include that calculation at the top of your own answer (whether you delete the rest of it is up to you) and I will remove my downvote. Sep 30, 2019 at 1:56
• Thanks for your consideration, but I like my answer just as it is--for reasons previously explained. Especially the use of simulation. It's not that I object to making edits based on comments. Make them regularly, when I've gotten something wrong. But not this time. Sep 30, 2019 at 2:42
• @whuber I was criticizing, and continue to criticize, BruceET's answer because he provided only a simulation and not the mathematical calculation (the mathematical calculation was in the first comment in this thread). So, the original answer had no basis for asserting that the variance was $15$ (in fact, R only said that the variance was approximately_$15$). I have no objections to the use of simulation to _check mathematical answers to probability questions but have strong objections to simulation being presented as the only answer without any obvious effort at analysis. (continued) Sep 30, 2019 at 21:16
• @whuber Let's assume that BruceET had actually solved the problem analytically before he ran the simulation. Then why not say so, even if it just to say "The variance of $W$ is $15$ as can be shown analytically but here I will present just a simulation in R to confirm this result numerically". Why not include just these words, if not the complete proof that he wrote in his comment, as an edit to his answer? The way BruceET's answer is written makes in sound like simulation is the only way to go. Sep 30, 2019 at 21:22

You are on the right track. You've already seen what is perhaps the deepest part---that $$E(XY) = E(X)E(Y)$$ because $$X$$ and $$Y$$ are independent.

Here is a simulation, in R, of a million realizations of $$W$$ to the given specifications. It is reasonable to expect two or three significant digits of accuracy.

set.seed(928)
m = 10^6;  mu = 4;  sg = 1
x = rnorm(m,mu,sg);  y = rnorm(m,mu,sg);  z = rnorm(m,mu,sg)
w = (1/sqrt(3))*x*y - 2*z - 16/sqrt(3)
mean(w); var(w)
[1] -8.000974    # aprx E(W) = -8
[1] 14.99188     # aprx Var(W) = 15


Beyond your question: $$W$$ is slightly right-skewed (because of the product term), so that the simulated distribution of $$W$$ is not a really close match to $$\mathsf{Norm}(\mu=-8,\sigma=\sqrt{15}).$$

• No, the hardest part is figuring out what $E[W^2]$ is since $W^2$ is a sum of terms including $XYZ$ and we need to use the independence of $X$, $Y$, and $Z$ to deal with that. Your rush to use R misses all the stuff that the OP needs to learn. Sep 29, 2019 at 22:03
• It seemed to me from reading the question that OP has learned what is needed. Relationship btw $Var(W), E(W^2),$ and $E(W)$ clearly on display. $E(X^2Y^2) = E(X^2)E(Y^2)$ parallels what OP has already figured out. The simulation in R was a way to show answers without actually doing the problem, which I try to avoid on 'self-study'-type problems--even if not so ID'd. As always, willing to discuss with OP if requested. // If you disagree, why not give your own answer based on your assessment of the question. Sep 29, 2019 at 22:32
• Well, I do disagree and have written my own answer to teach the OP what I think he needs to learn. Sep 29, 2019 at 22:57