Conditional Expectation as a function of X I hope someone can clear the doubt on conditional distribution, in a text, it mentions:
To interpret
the notation $f_{X \mid Y}(x \mid y)$, we need to be clear that there is nothing random about
the random variable $Y$, since it is already fixed. What remains is a sub-population distribution
in terms of $X$ (i.e. the reduced sample space of $\Omega_X$ where $Y$ happened). Consequently,
the conditional PMF/PDF $f_{X \mid Y}(x \mid y)$ is a distribution in terms of $X$.
I have no trouble understanding this, since conditional just means looking into the reduced sample space of $X$ where $Y$ has happened for a specific set. But soon after, when conditional expectation is mentioned, it says:
There are two points to note here. First, the expectation of $\mathbb{E}[X \mid Y=y]$ is taken with respect to $f_{X \mid Y}(x \mid y)$. We assume that the random variable $Y$ is already fixed at the state $Y=y$. Thus, the only source of randomness is $X$. Secondly, since the expectation $\mathbb{E}[X \mid Y=y]$ has eliminated the randomness of $X$, the resulting function is in $y$.
A quick read online reveals that the expectation of $X$ given $Y$ can indeed be a function of $Y$ if we treat this conditional expectation as random variable. I am just slightly confused why the conditional expectation is not a function of $X$, since the underlying conditional distribution is a function of $X$.

If you take the expectation of $X$, it's not a function of $X$. You integrate $xf(x)$ over $x$, and so $x$ is gone, producing only a number.
If you take the expectation of $X|Y=y$, it's not a function of $X$. You integrate $xf(x|y)$ over $x$ (think of it as $xf(x)$ with a different $f(x)$ for different $y$), and so $x$ is gone, producing only a number, which may be different for different $y$s, hence a function of $y$.
