Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am looking for an example of two random variables $X,Y$ such that

(a) $X,Y$ are not independent.

(b) At least one of $X,Y$ is not normal.

(c) $E(X|y)$ (expected value of $X$ given $Y=y$) is linear in $y$, i.e. of the form $a+by$, and $E(Y|x)$ is linear in $x$.

(d) The correlation coefficient $\rho\neq \pm 1$.

share|cite|improve this question

Let $Y$ be any discrete random variable, choose constants $a$ and $b$, and just set $X=aY+b$. They are not independent, not Gaussian, and the conditional expectations are linear as you wanted.

share|cite|improve this answer
You are right. I just added an additional condition. – TCL Apr 15 '11 at 5:26

$Y, Z$ are r.v.'s. Let $X=aY+bZ$. Then the correlation should not be $\pm1$.

share|cite|improve this answer
If Y and Z are independent and Y has nonzero density everywhere (so $E[X|Y=y]$ is well-defined), then indeed $E[X|Y=y] = a y + b E[Z]$. But I don't know about $E[Y | X = x]$. – Robert Israel Apr 15 '11 at 6:15
@Robert. If $Y,Z$ are independent and both uniform on [0,1] , then $X=Y+Z$ does give an example where $E(X|y)=\frac{1}{2}+y, E(Y|x)=\frac{1}{2}x$ (if my calculation is correct), $0<y<1, 0<x<2$. However, I still don't know if there is an example where both $X,Y$ have positive density everywhere. – TCL Apr 15 '11 at 13:32
If $Y$ has density function $2y,0<y<1$ and $Z$ is uniform on $[0,1]$, $Y,Z$ independent, $X=Y+Z$. Then according to my calculations $E(Y|x)=\frac{2}{3}x, 0<x<1$ and $E(Y|x)=\frac{2(x^2-x+1)}{3x}, 1<x<2$. So $E(Y|x)$ is not linear. – TCL Apr 15 '11 at 20:53
@TCL You are right. It's more complicated than I thought. – GWu Apr 15 '11 at 21:54
up vote 1 down vote accepted

A general method to get such $X, Y$ is as follows:

Let $Y,Z$ be independent identically distributed random variables. Let $X=Y+Z$. Then as noted above $E(X|y)=y+E(Z)$ is linear in $y$.

And intuitively, $E(Y|x)=E(Z|x)=x/2$. This can be proved rigorously (for continuous case) as follows:

Suppose the density function for $Y,Z$ is $f(u)$. Then the joint pdf for $X,Y$ is $f(y)f(x-y)$, and the density function for $X$ is the convolution of $f$ with itself. Then $$ E(Y|x)=\frac{\int y f(y)f(x-y) dy}{\int f(y)f(x-y) dy} .$$ This is equal to $x/2$ as shown by Eric Naslund in [this post].

An integral identity

share|cite|improve this answer
If $X=2Y+Z$ and $Y,Z$ are independently uniform on $[0,1]$. Then $E(Y|x)=x/4$ for $0<x<1$, $=(2x-1)/4$ for $1<x<2$ and $=(x+1)/4$ for $2<x<3$, showing that it is not linear. – TCL Apr 25 '11 at 3:40

Note that if Y is a binary random variable, then any function of Y is linear in Y. For example $$ \sin(Y)\;=\;\sin(0)\;+\;(\sin(1)-\sin(0))\cdot Y. $$ This means that any generic distribution over $\{0,1\}^2$ satisfies your conditions.

By the way, in general, if $E(X|Y)$ is linear in $Y$, then it must be necessarily of the form $$ E(X|Y)\;=\;E(X)\;+\;\frac{{\rm cov}(X,Y)}{{\rm var}(Y)}(Y-E(Y)). $$

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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