This question already has an answer here:

In Larry Wasseman's lecture notes(lecture 4, page 4) I found this statement

$\mathbb{E}[Y|X=x] = \sum_y y f_{Y|X}(y|x)$ or $=\int_y y f_{Y|X}(y|x)dy.$
An important point about the conditional expectation is that it is a function of $X$, unlike the expectation of a random variable (which is just a number). Usually, we use $\mathbb{E}[Y|X]$ to denote the random variable whose value is $\mathbb{E}[Y|X=x]$, when $X=x$. This is something that you should pause to digest.

Can someone please explain this statement a bit?
1. Specifically, in which cases one can make a mistake for misunderstanding this concept?
2. What is the difference in using $X$(RV) or $x$(its realization) in simplifying some expression in probability theory?


marked as duplicate by Community Feb 18 at 19:33

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • $\begingroup$ Nevermind, found the answer here, mostly. $\endgroup$ – anotherone Feb 18 at 19:00