I know there are already several posts about the relationship between covariance and independence in this forum but I couldn’t find the answer to the issue bugging me on those posts.
Let me firstly say I know that: (1) independence between RVs means covariance = 0, but covariance = 0 does not necessarily mean independency between RVs. (2) Pearson’s correlation coefficient (corrcoef) detects linear dependencies between RVs, so non-linear dependencies might well yield covariance = 0 (a simple example is the parabola one, when RVs are X and Y = X^2).
Now, let X and Y be RVs, where X = A + B and Y = A - B; Here, A and B are also RVs, that could be either dependent and independent, and with zero-mean, variance = 1.
What I want to know is whether X and Y are independent (or dependent).
At first glance I am inclined to say X and Y are dependent because both are functions of the same A and B. I would also say that their relationship seems linear because Y = X - 2B. What is making me confused is that COV(X,Y) = 0, so, corrcoef = 0, as can be seen below.
COV(X,Y) = E[(X - E[X])(Y - E[Y])] = E[XY] = E[(A+B)(A-B)] = E[A^2 - B^2] = E[A^2] - E[B^2] = 1 - 1 = 0 or COV(A+B,A-B) = COV(A,A) + COV(A,-B) + COV(B,A) + COV(B,-B) = VAR(A) - COV(A,B) + COV(A,B) - VAR(B) = 1 - COV(A,B) + COV(A,B) - 1 = 0
Wouldn’t COV(X,Y) = 0 mean that X and Y are either independent or dependent though following a non-linear relationship? But they don’t seem independent and they don’t seem to have a non-linear relationship. They seem to have a linear relationship, but in such case covariance should be different from 0.
What is the issue here? I would be glad if someone could shed some light on that.