My book says that if you have two variables, say $x$ and $y$ and they are independent then their covariance is zero. But I see online that if covariance is zero, this does not always mean that $x$ and $y$ are independent.
So I have some concept questions here:
If two variables are independent, does this mean that they have no relationship with each other at all? Meaning they have no linear, quadratic, cubic, etc. relationship with each other, causing the covariance to be zero (since they share no linear relationship which covariance measures). Is that what independence means, they have no relationship of any kind?
If covariance is zero, this does not always mean that $x$ and $y$ are independent. Is this because $x$ and $y$ can share a different relationship with each other that is nonlinear such as a quadratic or cubic relationship? Causing covariance to be $0$ since they have a nonlinear relationship, but $x$ and $y$ to not be independent since they could have something like a cubic or quadratic relationship?
If covariance is zero. Should I interpret this as one of two possibilities? Which are $x$ and $y$ are independent or $x$ and $y$ share a relationship that is nonlinear.
My book says that if covariance is zero, then when one variable increases, the effect on the other variable is random. Is this only when $x$ and $y$ are independent? I feel that this isn't always true, especially if $x$ and $y$ share a different kind of relationship like a quadratic relationship. Is my hunch right?
Thank you in advance
Simple example: Let $X$ be a random variable with probabilities $P(X=1)=P(X=-1)=.25\ P(X=0)=.5$ Define random variable $Y$ by $Y=0$, when$X\ne 0$ and $P(Y=1)=P(Y=-1)=.25$, when $X=0$.
$E(X)=E(Y)=E(XY)=0$, so they are uncorrelated, but obviously not independent.