Why E[g(Y)|Y] = g(Y)?

116 Views Asked by At

The intuition for $E[g(Y)|Y=y]$ would be that $g(Y)$ would play the role of a constant once $Y$ is fixed to a certain $y$ value. But how to show this more formally ? I can't seem to expand the equation below.

$E[g(Y)|Y=y]=\sum_{y} g(y)P[g(y)=y'|Y=y]$

2

There are 2 best solutions below

1
On BEST ANSWER

Your error arises from using the same variable name for the index of summation as the given condition. More precisely, for a discrete random variable $Y$ with support $S$, $$\operatorname{E}[g(Y) \mid Y = y] = \sum_{a \in S} g(a) \Pr[Y = a \mid Y = y].$$ Since $\Pr[Y = a \mid Y = y] = \mathbb 1(a = y)$, it follows that the sum contains only one term and its value is $g(y)$.

4
On

It looks like you've got your variables confused. On the left, $y$ is a fixed value but on the right you're summing over it. I believe you should have $$\sum_{y'} g(y')P[Y=y'|Y=y].$$ From there, think about what the probability means in the cases $y = y'$ and $y \neq y'$, and the answer should become clear.