# The definition of control variables

My professor provided the following when introducing control variables

Suppose we have the causal model

Y = Beta_0 + Beta_1*D + U

Suppose E[UD] not 0

then, if we have extra observable characteristics X such that

E[U|D,X] = E[U|X] = f(x)

then we can use this to estimate Beta_1

Can someone explain the meaning behind E[U|D,X] = E[U|X] = f(x)? My professor says this allows us to make an "apples to apples" comparison of the causal effect we are trying to study. I don't have an issue running a regression and interpreting control variables, I just have trouble understanding what this specific expression tells us.

The professor's notation is a little non-standard, but in English, your professor's math is saying "conditional on $$X$$, the error, $$U$$ is mean-independent of $$D$$."
Thus, if we control for $$X$$ in the regression (condition on it), then we are taking $$X$$ out of the error, $$U$$, and, what remains in the error is uncorrelated with $$D$$, allowing us to estimate the treatment effect. The resulting equation is:
$$y_i =\beta_0 +\beta_1 D_i +\beta_2 X_i +U_i$$
$$\beta_1$$ estimates the change in $$y_i$$ associated with $$D_i$$ increasing by 1, holding fixed $$X$$. The key is that, by holding fixed $$X$$, we have removed the source of bias.