Correlation between X and XY If I have two independent random variables X and Y, what is the correlation between X and the product XY? If this is unknown, I would be interested in knowing at least what happens in the specific case of X and Y being normal with zero mean, if that's easier to solve.
 A: In the specific case of X and Y being random variables with zero means, then $\rho(XY,X) = 0$ because $\mathbb{E}(X^2Y) = \mathbb{E}[\mathbb{E}[ X^2Y | X]] = \mathbb{E}[X^2\mathbb{E}[Y|X]] = 0$. Hence $cov(XY,X) = \mathbb{E}(X^2Y) - \mathbb{E}(XY).\mathbb{E}(X) = 0$
A: Using the law of total covariance and independence of $X$ and $Y$,
\begin{align}
\mbox{Cov}(X,XY)
  &=E\mbox{Cov}(X,XY|Y)+\mbox{Cov}(EX|Y,EXY|Y)
\\&=E(Y\mbox{Cov}(X,X))  +\mbox{Cov}(EX,YEX)
\\&=E(Y\mbox{Var}X)  +\mbox{Cov}(EX,YEX)
\\&=EY\mbox{Var}X.
\end{align}
Using the law of total variance, and again, independence,
\begin{align}
\mbox{Var}(XY) 
  &= E\mbox{Var}(XY|Y) + \mbox{Var} E(XY|Y)
\\&= E(Y^2 (\mbox{Var}X|Y)) + \mbox{Var} (Y (EX|Y))
\\&= E(Y^2 \mbox{Var}X) + \mbox{Var} (Y EX)
\\&= E(Y^2) \mbox{Var}X + (EX)^2\mbox{Var} Y 
\\&= \mbox{Var}X\mbox{Var}Y+(EY)^2 \mbox{Var}X + (EX)^2\mbox{Var} Y .
\end{align}
Note how $Y$ can be treated as a constant in any of the above inner conditional expectations, variances or covariances.
From the above covariance and variance, the correlation can, after some algebraic manipulations, be nicely expressed in terms of the two coefficients of variation as
\begin{align}
\mbox{corr}(X,XY)
 &=\frac1{\sqrt{ 1 +
\frac{\text{Var}Y}{(EY)^2}\left(1 + \frac{(EX)^2}{\text{Var}X}\right)
}}.
\end{align}
A check of this result by simulation:
> n <- 1e+6
> x <- rexp(n,2)-2
> y <- rnorm(n,mean=5)
> cv2 <- function(x) var(x)/mean(x)^2
> 1/sqrt(1+cv2(y)*(1+1/cv2(x)))
[1] 0.844882
> cor(x,x*y)
[1] 0.8445373

A: Solution
I take it that a valid solution will be one that expresses--if possible--the correlation in terms of the separate properties of the variables $X$ and $Y$.  Computing the correlation will involve computing the covariances of monomials in $X$ and $Y$. It is economical to get this done all at once.  Simply observe that 


*

*When $X$ and $Y$ are independent and $i$ and $j$ are powers, then $X^i$ and $Y^j$ are independent;

*The expectation of a product of independent variables is the product of their expectations.
This will give formulas in terms of the moments of $X$ and $Y$.
That's all there is to it.

Details
Write $\mu_i(X) = E(X^i)$, etc. for the moments.  Thus, for any numbers $i,j,k,l$ for which the calculations make sense and produce finite numbers,
$$\eqalign{
\operatorname{Cov}\left(X^iY^j, X^kY^l\right) &= E\left(X^iY^j X^kY^l\right) - E\left(X^iY^j\right) E\left(X^kY^l\right) \\&= \mu_{i+k}(X)\mu_{j+l}(Y) - \mu_i(X)\mu_k(X)\mu_j(Y)\mu_l(Y).}$$
Note that the variance of any random variable is its covariance with itself, so we don't have to do any special calculation for variances.
It should now be obvious how to compute moments involving monomials, of any powers, of any finite number of independent random variables.  As an application, apply this result to the definition of correlation, which is the covariance divided by the square roots of the variances:
$$\eqalign{\operatorname{Cor}(X,XY) &= \frac{\operatorname{Cov}(X^1Y^0, X^1Y^1)}{\sqrt{\operatorname{Cov}(X^1Y^0, X^1Y^0)\ \operatorname{Cov}(X^1Y^1, X^1Y^1)}} \\
&=\frac{\mu_2(X)\mu_1(Y) - \mu_1(X)^2\mu_1(Y)}{\sqrt{\left(\mu_2(X)-\mu_1(X)^2\right)\left(\mu_2(X)\mu_2(Y)-\mu_1(X)^2\mu_2(Y)^2\right)}} .
}
$$
There are various algebraic simplifications which you might choose if you wish to relate this to expectations, variances, and covariances of the original variables, but carrying them out here wouldn't provide any more insight.
A: The Linear Correlation between X and XY will be,
Corr(X,XY) = Cov(X,XY) / sqrt(var(X)*var(XY))
Cov(X,XY) = Summation((X-mean(X))(XY-mean(XY)) / n
n - sample size;
var(X) = variance of X;
var(XY) = variance of XY
