# Variance of X+Y+XY?

Assuming that random variables X and Y are independent, what is $\displaystyle Var((1+X)(1+Y)-1)=Var(X+Y+XY)$?

Should I start as follows $$Var((1+X)(1+Y)-1)\\ =Var((1+X)(1+Y))\\ =(E[(1+X)])^2 Var(1+Y)+(E[(1+Y])^2 Var(1+X)+Var(1+X)Var(1+Y)$$

or maybe as follows

$$\\ Var((1+X)(1+Y)-1)\\ =Var(1+Y+X+XY-1)\\ =Var(X+Y+XY)\\ =Var(X)+Var(Y)+Var(XY)+2Cov(X,Y)+2Cov(X,XY)+2Cov(Y,XY)$$

I'm considering could I express the problem in terms of covariances (and variances) between individual random variables. I would like to forecast the variance by individual covariances in my model if its possible. Does the solution simplify if expected values of the variables are zero?

Edit: Moving on from the first alternative $$=(E[(1+X)])^2 Var(1+Y)+(E[(1+Y])^2 Var(1+X)+Var(1+X)Var(1+Y)\\ =(E[(1+X)])^2 Var(Y)+(E[(1+Y])^2 Var(X)+Var(X)Var(Y)\\ =(1+E[X])^2 Var(Y)+(1+E[Y])^2 Var(X)+Var(X)Var(Y)\\ \text{ }\\ \text{if E[X] = 0 and E[Y] = 0, then }\\ =Var(Y) + Var(X) + Var(X)Var(Y)\\ \text{ }\\$$

• I'd start the first way. You can simplify that substantially. – Glen_b Jan 19 '18 at 12:58
• You may find this post useful stats.stackexchange.com/questions/15978/… – Matt Barstead Jan 19 '18 at 13:54
• Thanks a lot both. I'll look at the post, and maybe get back to it – user31383 Jan 19 '18 at 14:06

For independent random variables $X$ and $Y$ with means $\mu_X$ and $\mu_Y$ respectively, and variances $\sigma_X^2$ and $\sigma_Y^2$ respectively, \begin{align}\require{cancel} \operatorname{var}(X+Y+XY) &= \operatorname{var}(X)+\operatorname{var}(Y)+\operatorname{var}(XY)\\ &\quad +2\cancelto{0}{\operatorname{cov}(X,Y)}+2\operatorname{cov}(X,XY)+\operatorname{cov}(Y,XY)\\ &=\sigma_X^2+\sigma_Y^2+\big(\sigma_X^2\sigma_Y^2+\sigma_X^2\mu_Y^2+\sigma_Y^2\mu_X^2\big)\\ &\quad +2\operatorname{cov}(X,XY)+\operatorname{cov}(Y,XY). \end{align} Now, \begin{align} \operatorname{cov}(X,XY) &= E[X\cdot XY] - E[X]E[XY]\\ &=E[X^2Y]-E[X]\big(E[X]E[Y]\big)\\ &= E[X^2]E[Y]-\big(E[X]\big)^2E[Y]\\ &= \sigma_X^2\mu_Y \end{align} and similarly, $\operatorname{cov}(Y,XY) = \sigma_Y^2 \mu_X$. Consequently, \begin{align}\operatorname{var}(X+Y+XY) &=\sigma_X^2+\sigma_Y^2+\sigma_X^2\sigma_Y^2+\sigma_X^2\mu_Y^2+\sigma_Y^2\mu_X^2 +2\sigma_X^2\mu_Y + 2\sigma_Y^2 \mu_X\\ &= \sigma_X^2\big(1 + \mu_Y^2 + 2\mu_Y\big) + \sigma_Y^2\big(1 + \mu_X^2 + 2\mu_X\big) + \sigma_X^2\sigma_Y^2\\ &= \sigma_X^2\big(1 + \mu_Y\big)^2 + \sigma_Y^2\big(1 + \mu_X\big)^2 + \sigma_X^2\sigma_Y^2. \end{align}
$$Var(XY) = Var(X)Var(Y) + E(X)^2 Var(Y) + E(Y)^2 Var(X)$$
You only have to substitute $X'=X+1$ and $Y'=Y+1$, with $E(X')=E(X)+1$, $var(X') = var(X)$, $E(Y')=E(Y)+1$, $var(Y') = var(Y)$ leading to:
$$\begin{array}\\ Var((X+1)(Y+1)) &= Var(X'Y') \\ &= Var(X')Var(Y') + E(X')^2 Var(Y') + E(Y')^2 Var(X') \\ &= Var(X)Var(Y) + \cdots\end{array}$$