Variance of $XY(1-Y)$ in terms of the means and variances $X$ and $Y$

probability theoryvariance

Consider two independent random variables X and Y. X has some distribution with mean $\mu_X$ and variance $\sigma^2_X$. Y has some distribution with mean $\mu_Y$ and variance $\sigma^2_Y$. I want to take the variance of the quantity $XY(1-Y)$. Is the correct answer:
$$\sigma^2_{XY(1-Y)} = \sigma^2_X[Y(1-Y)]^2+X^2[\sigma^2_Y(1-\sigma^2_Y)]?$$
I just did some kind of weird product rule but with variances and I'm not sure that's at all legit.

The reason I want to know the variance of this quantity is that it is a measure of the real noise in an experimental system I am working with. I am an experimental physicist and my math skills are weak at best. You might recognize the form $XY(1-Y)$ from the binomial distribution: $Np(1-p)$. My experiment does not follow a binomial distribution exactly, it follows a Poisson binomial distribution but with varying $N$ and $p$ for each shot of the experiment. So I need to know the variance of the quantity $XY(1-Y)$ when I know the variances and expectation values of $X$ and $Y$.

I'm trying to work this particular detail out to answer this question:
Repeated binomial processes with different probabilities and number of trials .

Best Answer

$\begin{aligned}\mathsf{Var}XY\left(1-Y\right) & =\mathsf{Covar}\left(XY\left(1-Y\right),XY\left(1-Y\right)\right)\\ & =\mathsf{Covar}\left(XY-XY^{2},XY-XY^{2}\right)\\ & =\mathsf{Var}\left(XY\right)-2\mathsf{Covar}\left(XY^{2},XY\right)+\mathsf{Var}\left(XY^{2}\right)\\ & =\left[\mathbb{E}X^{2}Y^{2}-\left(\mathbb{E}XY\right)^{2}\right]-2\left[\mathbb{E}X^{2}Y^{3}-\mathbb{E}XY^{2}\mathbb{E}XY\right]+\left[\mathbb{E}X^{2}Y^{4}-\left(\mathbb{E}XY^{2}\right)^{2}\right]\\ & =\left[\mathbb{E}X^{2}\mathbb{E}Y^{2}-\left(\mathbb{E}X\mathbb{E}Y\right)^{2}\right]-2\left[\mathbb{E}X^{2}\mathbb{E}Y^{3}-\mathbb{E}X\mathbb{E}Y^{2}\mathbb{E}X\mathbb{E}Y\right]+\left[\mathbb{E}X^{2}\mathbb{E}Y^{4}-\left(\mathbb{E}X\mathbb{E}Y^{2}\right)^{2}\right]\\ & =\left[\mathbb{E}X^{2}\mathbb{E}Y^{2}-\mu_{X}^{2}\mu_{Y}^{2}\right]-2\left[\mathbb{E}X^{2}\mathbb{E}Y^{3}-\mu_{X}^{2}\mu_{Y}\mathbb{E}Y^{2}\right]+\left[\mathbb{E}X^{2}\mathbb{E}Y^{4}-\mu_{X}^{2}\left(\mathbb{E}Y^{2}\right)^{2}\right]\\ & =\left[\left(\sigma_{X}^{2}+\mu_{X}^{2}\right)\left(\sigma_{Y}^{2}+\mu_{Y}^{2}\right)-\mu_{X}^{2}\mu_{Y}^{2}\right]-2\left[\left(\sigma_{X}^{2}+\mu_{X}^{2}\right)\mathbb{E}Y^{3}-\mu_{X}^{2}\mu_{Y}\left(\sigma_{Y}^{2}+\mu_{Y}^{2}\right)\right]+\left[\left(\sigma_{X}^{2}+\mu_{X}^{2}\right)\mathbb{E}Y^{4}-\mu_{X}^{2}\left(\sigma_{Y}^{2}+\mu_{Y}^{2}\right)^{2}\right]\\ & =\left[\sigma_{X}^{2}\sigma_{Y}^{2}+\sigma_{X}^{2}\mu_{Y}^{2}+\sigma_{Y}^{2}\mu_{X}^{2}\right]-2\left[\left(\sigma_{X}^{2}+\mu_{X}^{2}\right)\mathbb{E}Y^{3}-\mu_{X}^{2}\mu_{Y}\left(\sigma_{Y}^{2}+\mu_{Y}^{2}\right)\right]+\left[\left(\sigma_{X}^{2}+\mu_{X}^{2}\right)\mathbb{E}Y^{4}-\mu_{X}^{2}\left(\sigma_{Y}^{2}+\mu_{Y}^{2}\right)^{2}\right] \end{aligned} $

Especially the $5$-th equality rests on independence of $X$ and $Y$.

We cannot get any further since for the expressions $\mathbb EY^3$ and $\mathbb EY^4$ more information is needed concerning the distribution of $Y$.


edit:

Special case: $Y\sim\mathsf{Normal}\left(\mu_{Y},\sigma_{Y}^{2}\right)$.

Then $Y=\mu_{Y}+\sigma_{Y}U$ where $U\sim\mathsf{Normal}\left(0,1\right)$ and based on the knowledge that $\mathbb{E}U^{3}=0$ and $\mathbb{E}U^{4}=3$ we find:

  • $\mathbb{E}Y^{3}=\mathbb{E}\left(\mu_{Y}^{3}+3\mu_{Y}^{2}\sigma_{Y}U+3\mu_{Y}\sigma_{Y}^{2}U^{2}+\sigma_{Y}^{3}U^{3}\right)=\mu_{Y}^{3}+3\mu_{Y}\sigma_{Y}^{2}$
  • $\mathbb{E}Y^{4}=\mathbb{E}\left(\mu_{Y}^{4}+4\mu_{Y}^{3}\sigma_{Y}U+6\mu_{Y}^{2}\sigma_{Y}^{2}U^{2}+4\mu_{Y}\sigma_{Y}^{3}U^{3}+\sigma_{Y}^{4}U^{4}\right)=\mu_{Y}^{4}+6\mu_{Y}^{2}\sigma_{Y}^{2}+3\sigma_{Y}^{4}$

Also have a look here for that.

Substituting we find the following expression for $\mathsf{Var}XY\left(1-Y\right)$:

$$\left[\sigma_{X}^{2}\sigma_{Y}^{2}+\sigma_{X}^{2}\mu_{Y}^{2}+\sigma_{Y}^{2}\mu_{X}^{2}\right]-2\left[\sigma_{X}^{2}\mu_{Y}^{3}+3\sigma_{X}^{2}\sigma_{Y}^{2}\mu_{Y}+2\sigma_{Y}^{2}\mu_{X}^{2}\mu_{Y}\right]+\left[\sigma_{X}^{2}\mu_{Y}^{4}+6\sigma_{X}^{2}\sigma_{Y}^{2}\mu_{Y}^{2}+3\sigma_{X}^{2}\sigma_{Y}^{4}+4\sigma_{Y}^{2}\mu_{X}^{2}\mu_{Y}^{2}+2\sigma_{Y}^{4}\mu_{X}^{2}\right]$$

I hope I did not make any mistakes (check me on it).

Related Question