# Two dependent random variables with standard normal distribution and zero covariance

I need to find two dependent random variables with standard normal distribution, but with zero covariance. It is easy too find just two dependent random variables with such a distribution (X and -X, for example), but how I can reach zero covariance?

• Answer by Google. – David Mitra Mar 2 '14 at 11:15
• This article has also some example distributions which are dependent but have zero correlation. – hauntergeist Mar 2 '14 at 11:21

Try $X \sim N(0,1)$ and $Y=X$ when $|X|\lt k$ and $Y=-X$ when $|X|\ge k$ for some non-negative $k$.

Then $X$ and $Y$ have standard normal distributions and $cov(X,Y)$ is a continuous increasing function of $k$, negative when $k$ is close to $0$ and positive when $k$ is large. So for some $k$ you will have $cov(X,Y)=0$

• Some experimentation suggests $k$ should be slightly more than $1.53817$ – Henry Mar 2 '14 at 11:49
• and to be more precise, $k$ is the square root of the median of a chi-squared distribution with $3$ degrees of freedom, which using R code sqrt(qchisq(0.5,3)) gives about $1.538172$ – Henry Apr 30 '18 at 23:42

Let $X$ and $Z$ be independent standard normal random variables, and take $Y=Z$ on $\{X\cdot Z\ge 0\}$ and $Y=-Z$ on $\{X\cdot Z <0\}$.

• It might help if you said that you were comparing the normal random variables $Y$ and $Z$, which have zero covariance despite $|Y|=|Z|$ with probability $1$. – Henry Feb 20 '16 at 18:34

Although I haven't worked through all aspects that must be checked, I believe that if you specify

$$[X \mid Y] = Y$$

i.e. that $X$ becomes $Y$ when conditioning on $Y$, you obtain

$$\text {Cov}(X,Y) = E(XY) = E[E(XY\mid Y)] = E[YE(X\mid Y)]= E[YE(Y)] =0$$

Note that $$E(X) = E[E(X\mid Y)] = E[Y] = 0$$

and by the decomposition-of-variance formula

$$\text {Var}(X) = \text {Var}(E[X\mid Y]) + E[\text {Var}(X\mid Y)]= \text {Var}(E[Y])+E[\text {Var}(Y)] = 0 + 1 = 1$$

i.e. this conditional specification is consistent with the unconditional moments.

So these variables are uncorrelated but not independent.

• What is the meaning of $[X \mid Y = Y]$? – Did Mar 22 '14 at 18:05
• @Did The verbal description compensates for the confusing notation, which I just attempted to improve (and which still remains a shorthand, but a widespread one) – Alecos Papadopoulos Mar 23 '14 at 0:07
• Sorry but the notation $[X|Y=Y]$ is NOT widespread, and for good reasons. For your interest, the only reasonable interpretation of the thing I can think of does not lead to covariance zero either. – Did Mar 23 '14 at 6:38