I recently read in this page (https://www.timlrx.com/2018/02/26/notes-on-regression-approximation-of-the-conditional-expectation-function/#fn1) that:
"Regression offers a way of approximating the CEF linearly i.e,...,Thus, even if the CEF is non-linear as in the recipe and star rating example, the regression line would provide the best linear approximation to it (drawn in green below)".
I understand that we use conditional expectation in OLS assuming that the conditional expectation of Y for a ceratin value of X is true when Y can be modelled as a linear function of X. Please correct if I am misundestanding something.
So, and this can sound a silly (sorry!), what we are REALLY DOING when performing linear regression, is just aproximating the conditional expectation function? I mean, what we are really trying to estimate in a regression is the line that best fit the conditional expectation function? Or there is something I am no getting right. Please do not hesitate in correcting me :)
Oh, and one last thing If so, what is the necessity to do linear regression? Why we can't just work with the conditional expectation function instead of linear regression since is the conditional expectation function what we are trying to approxitamate to?