# What is $E[E[Y|X]|X]$? [closed]

What is $$E[E[Y|X]|X]$$ ?
Can I use the law of total expectation and say that it's equal to $$E[Y|X]$$ ?
If it's correct, could someone explain why?

Let $$\mathscr F$$ be the $$\sigma$$-algebra generated by $$X.$$ Then $$E[Y|X]=E[Y|\mathscr F]$$ is an $$\mathscr F$$-measurable random variable and we know that if $$Z$$ is a $$\mathscr F$$-measurable random variable, we have $$E[Z|\mathscr F]=Z.$$

• How do you know that $E[Z|F]=Z$ ? It's a known formula in the expectation rules?
– user869856
Commented Jan 4, 2021 at 15:04
• @Xavi by definition of conditional probability $\mathbf{E}[X\mid\mathscr F]$ is $\mathscr F$-measurable, thus $\mathbf{E}[\mathbf{E}[X\mid\mathscr F]\mid\mathscr F]=\mathbf{E}[X\mid\mathscr F]$ since if $X$ is $\mathscr F$-measurable then $\mathbf{E}[X\mid\mathscr F]=X$. Note that $\mathbf{E}[Y\mid X]$ means $\mathbf{E}[Y\mid \sigma(X)]$. Commented Jan 4, 2021 at 15:23
• @Xavi $E[Z|\mathscr F]=Z$ follows immediately from the definition of conditional expectation. You just have to check that $Z$ satisfies the two conditions of the definition.
– UBM
Commented Jan 4, 2021 at 16:59

I do not think this is the low of total expectation, at least not in its standard form.

• $$E[A|B]=A$$ if $$A$$ is $$B-$$measurable.
• $$E[Y|X]$$ is $$X-$$measurable.

So now put in the first property $$A=E[Y|X]$$ and $$B=X$$, that is your result.

• How do you know that $E[A|B] = A$ ?
– user869856
Commented Jan 4, 2021 at 14:52
• @Xavi it is because $A$ is $B$−measurable. Commented Jan 4, 2021 at 20:47

The law of total expectation would $$E[Y]=E[E[Y|X]]$$. In this expression $$E[Y|X]$$ is a random variable that is a function of $$X.$$ $$E[Y|X]$$ changes with $$X,$$ assuming different realizations depending on different outcomes of $$X=x,$$ and by the law of total expectation, its expected value, across the support of $$X$$ is just $$E[Y].$$ Conditioning on $$X$$ the expression $$E[Y|X]|X$$ is redundant $$E[Y|X]|X=E[Y|X],$$ and in this sense it amounts to applying the same law of total expectation $$E[E[Y|X]]=E[E[Y|X]|X]=E[Y].$$ $$\;$$

• Would it be possible for the gentleman who downvoted my answer to explain why it is incorrect so we can all learn?
– user869837
Commented Jan 4, 2021 at 15:19
• @Paul We want to get the result of $E[Y|X]$ not $E[Y]$
– user869856
Commented Jan 4, 2021 at 17:52
• My earlier comment that this answer was essentially correct was wrong... I hadn't read the last part closely. $E[E[Y\mid X]\mid X]=E[Y\mid X],$ not $E[Y].$ Commented Jan 4, 2021 at 18:11
• @Paul That's not true: $E[E[Y|X]|X]] \ne E[Y]$, the correct answer is $E[E[Y|X]|X]] = E[Y|X]$
– user840425
Commented Jan 4, 2021 at 18:15