How to write $E(Y|X)$ as a function of $X$?

81 Views Asked by At

How to write $E(Y|X)$ as a function of $X$ ?

If for example $X$ and $Y$ are discrete valued as below

then $E(Y|X)$ should be equal to $-1+2X^2$ but I don't get it.

If I write for example $\displaystyle E(Y|X=-1)=\sum_y y\Pr(Y=y|X=-1)=\sum_y y\frac{\Pr(Y=y,X=-1)}{\Pr(X=-1)}=-1\cdot \frac{\Pr(Y=-1,X=-1)}{\Pr(X=-1)}+1\cdot \frac{\Pr(Y=1,X=-1)}{\Pr(X=-1)}=0\neq1=-1+2(-1)^2$

what goes wrong ?

2

There are 2 best solutions below

2
On BEST ANSWER

Your formula is correct, but I believe you plugged in the wrong probabilities. The last part should look as follows $\space-1\cdot \frac{\Pr(Y=-1,X=-1)}{\Pr(X=-1)}+1\cdot \frac{\Pr(Y=1,X=-1)}{\Pr(X=-1)}=-1\cdot \frac{0}{\frac14}+1\cdot \frac{\frac14}{\frac14}=1=-1+2(-1)^2$.

0
On

If $X=-1$ is given, then $Y=1$ is definitely true. Note from your table that $Y=-1$ cannot happen, when $X=-1$.

Thus $Y|X=-1$ is a constant random variable, and so its mean value is $1$.

Similarly $E(Y|X=1)=1$, and $E(Y|X=0)=-1$.