30
$\begingroup$

If two random variables $X$ and $Y$ are uncorrelated, can we also know that $X^2$ and $Y$ uncorrelated? My hypothesis is yes.

$X, Y$ uncorrelated means $E[XY]=E[X]E[Y]$, or

$$ E[XY]=\int xy f_X(x)f_Y(y)dxdy=\int xf_X(x)dx\int yf_Y(y)dy=E[X]E[Y] $$

Does that also mean the following? $$ E[X^2Y]=\int x^2y f_X(x)f_Y(y)dxdy=\int x^2f_X(x)dx\int yf_Y(y)dy=E[X^2]E[Y] $$

$\endgroup$
5
  • 4
    $\begingroup$ Yes. This question has been asked and answered before but I cannot find a specific reference from my mobile device. $\endgroup$ Sep 9, 2017 at 11:33
  • 3
    $\begingroup$ @DilipSarwate it seems that the accepted answer already gives a counter example. $\endgroup$
    – Vim
    Sep 9, 2017 at 15:25
  • 8
    $\begingroup$ @DilipSarwate You must have meant "No" instead of "Yes" in your comment! $\endgroup$
    – amoeba
    Sep 9, 2017 at 18:31
  • 12
    $\begingroup$ @amoeba The original version of the question asked about independence for which the answer is indeed Yes. It has since been edited to ask about uncorrelated random variables. I can't change my comment now. $\endgroup$ Sep 9, 2017 at 19:32
  • $\begingroup$ The original question was quite confused, as it used a wrong definition of independence. The current question is still confused, as it asserts an inappropriate deduction from being uncorrelated (it assumes $f_{XY}(x,y)=f_X(x)f_Y(y)$). I hope @vegardstikbakke reads up on the proper definitions of independent and uncorrelated, with some examples. $\endgroup$ Sep 10, 2017 at 7:57

3 Answers 3

60
$\begingroup$

No. A counterexample:

Let $X$ be uniformly distributed on $[-1, 1]$, $Y = X^2$.

Then $E[X]=0$ and also $E[XY]=E[X^3]=0$ ($X^3$ is odd function), so $X,Y$ are uncorrelated.

But $E[X^2Y] = E[X^4] = E[{X^2}^2] > E[X^2]^2 = E[X^2]E[Y]$

The last inequality follows from Jensen's inequality. It also follows from the fact that $E[{X^2}^2] - E[X^2]^2 = Var(X) > 0$ since $X$ is not constant.


The problem with your reasoning is that $f_X$ might depend on $y$ and vice versa, so your penultimate equality is invalid.

$\endgroup$
5
  • 9
    $\begingroup$ No need for making it more complicated with Jensen's inequality; $X^4$ is a non-negative random variable, and is not $0$ w.p. 1, so $E[X^4] >0$ (or you can just do $\int_{-1}^1 x^4 dx$ and easily see its positive). $\endgroup$
    – Batman
    Sep 9, 2017 at 17:02
  • 1
    $\begingroup$ You should also add a plot. I had been considering a similar example (Y=|X| on -1:+1) but would have presented that visually. $\endgroup$ Sep 10, 2017 at 8:27
  • 2
    $\begingroup$ @Batman I don't really see how it gives you anything since we're interested if $E[{X^2}^2] - E[X^2]^2 > 0$ $\endgroup$ Sep 10, 2017 at 12:05
  • 1
    $\begingroup$ @Anony-Mousse No need to restrict Y. Y = |X| meets the requirement. $\endgroup$ Sep 11, 2017 at 3:55
  • $\begingroup$ LorenPechtel for visualization. Because IMHO it is better to see why this can happen, and not just that the math outcome is as desired. $\endgroup$ Sep 11, 2017 at 6:34
20
$\begingroup$

Even if $\operatorname{Corr}(X,Y)=0$, not only is it possible that $X^2$ and $Y$ are correlated, but they may even be perfectly correlated, with $\operatorname{Corr}(X^2,Y)=1$:

> x <- c(-1,0,1); y <- c(1,0,1)
> cor(x,y)
[1] 0
> cor(x^2,y)
[1] 1

Or $\operatorname{Corr}(X^2,Y)=-1$:

> x <- c(-1,0,1); y <- c(-1,0,-1)
> cor(x,y)
[1] 0
> cor(x^2,y)
[1] -1

In case you cannot read R code, the first example is equivalent to considering two random variables $X$ and $Y$ with a a joint distribution such that $(X,Y)$ is equally likely to be $(-1,1)$, $(0,0)$ or $(1,1)$. In the perfectly negatively correlated example, $(X,Y)$ is equally likely to be $(-1,-1)$, $(0,0)$ or $(1,-1)$.

Nevertheless, we can also construct $X$ and $Y$ such that $\operatorname{Corr}(X^2,Y)=0$, so all extremes are possible:

> x <- c(-1,-1,0,1,1); y <- c(1,-1,0,1,-1)
> cor(x,y)
[1] 0
> cor(x^2,y)
[1] 0
$\endgroup$
10
$\begingroup$

The error in your reasoning is that you write the following about $E[h(X,Y)]$: $$E[h(X,Y)]=\int h(x,y) f_X(x)f_Y(y)dxdy$$ while in general $$E[h(X,Y)]=\int h(x,y) f_{XY}(x,y)dxdy.$$ The two coincide if $f_{XY}(x,y)=f_X(x)f_Y(y)$, i.e. if $X$ and $Y$ are independent. Being uncorrelated is a necessary but not sufficient condition for being independent. So if two variables $X$ and $Y$ are uncorrelated but dependent, then $f(X)$ and $g(Y)$ may be correlated.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.