Conditional Expectation Function in linear regression I've already read this: Conditional expectation function
For this question, we assume familiar notation in linear regression, with $Y$ being the response and stochastic regressors $X$. I've seen both $E(Y|X)$ and $E(Y|X=x)$ referred to as the "conditional expectation function".
I understand that $E(Y|X)$ is a random variable while $E(Y|X=x)$ is a realization of $E(Y|X=x)$. That being said, in the regression setup, we view realizations of Y and X, which we denote $(y, x)$.
Therefore, we condition on the fact that $X=x$. Then, we use our data to estimate $E(Y|X=x)$.
My question is when $E(Y|X)$ comes into play at all? Where do we even consider it? Or is it irrelevant, since we've already observed a realization of it?
A great answer would also explain why we call both $E(Y|X)$ and $E(Y|X=x)$ the conditional regression functions, as they seem to be certainly related, yet different objects; one is random while the other is deterministic.
Notice that throughout my answer, we've assumed $X$ is stochastic. Therefore, the question is not a question about stochastic vs fixed regressors.
 A: In linear regression, we assume the random variable $E(Y|X)$ has the parametric form $X\beta$. When we "fit" the model, we are estimating the parameter $\beta$, which according to our assumption gives us a general formula for $E(Y|X)$. If we made no assumptions whatsoever about the form of $E(Y|X)$, then it would be true that we would only be able to estimate $E(Y|X=x)$ for our observed realizations $(x,y)$. But that wouldn't be a linear regression model.
The fact that one might refer to both $E(Y|X)$ and $E(Y|X=x)$ by the name "conditional regression function" is just a case of overloading terminology. The first can be thought of as a function of the random variable X, the second can be thought of as a function of the fixed sample $x$. This conflation happens a lot with random variables--one might refer to "the sum of a two rolled dice", which can be interpreted both as a function of random variables (the dice themselves being random), or a function of the fixed outcome of two rolled dice, which is deterministic.
