Which of the two is "mean independent" in econometrics? In my master econometrics class, the professor mentions "mean independence" and throughout his slides, he uses two definitions interchangeably:

*

*$E[U|D=1]=E[U|D=0]$

*$E[U|D]=0$
where $D$ is the binary variable, $D=1$ indicates the treated group, $D=0$ indicates the untreated group, and $U$ is the error term of a regression model.
For me these two imply different things:
The 1st means the expectation of error of the two subgroups are the same, which is a constant with respect to $D$.
The 2nd means $U$ is independent of $D$ and also conditional on $D$. The expectation of $U$ is 0, so the 2nd is actually "mean independence" + "zero expectation" to me.
Am I understanding correctly? If not, are they 2 different things or the same thing?

It does seem confusing if one is not well-versed in the econometric lingo. :)
First thing one need to know is that in the purest form, that is, for two arbitrary random variables $X$ and $Y$, mean independence of $Y$ given $X$ means $E(Y|X)=E(Y)$.
Second, since we are talking about an error term $U$ here (instead of some generic r.v. $Y$), we have an additional property that $E(U)=0$.
This is why "mean independence of error term $U$ given $X$" can be expressed as $E(U|X)=0$.
A third thing here is that we have a special $X$ variable, which is a binary treatment variable $D$.
When $D$ takes only two values $\{0, 1\}$, it is equivalent to write $E(U|D)=0$ as $$E(U|D=1)=E(U|D=0)=0.$$
Furthermore, since $U$ is an error term, we must have $$0=E(U)=E(U|D=1)P(D=1)+E(U|D=0)P(D=0).$$
Under the condition $E(U|D=1)=E(U|D=0)$, the equation above gives
$E(U|D=1)=E(U|D=0)=0$.
Thus, the two conditions are equivalent: $$E(U|D=1)=E(U|D=0) \Leftrightarrow E(U|D=1)=E(U|D=0)=0.$$
To summarize, all the above arguments show that the two definitions in your question are equivalent and one can use them interchangeably.
P.S. Let me know if you spot any typo here.
