In the lecture notes of my development economics class, it says that
" In the regression model : Yi = β0 + β1Xi + ui,
if Xi is randomly assigned, then Xi is independent of ui, i.e., E(ui|Xi) = 0, so OLS yields an unbiased estimator of β1."
And the professor says the same thing in his lecture recording.
I really don't understand this statement, because in econometrics (linear regression part) I thought random sampling and zero conditional mean (E(ui|Xi) = 0) were two separate assumptions which led to the OLS unbiased estimator theory, not one affecting the other.
But the lecture note is saying that random sampling causes zero conditional mean, instead of my previous notion that the two are separate assumptions which are used together to derive the unbiasedness.
Is the lecture note correct in that random sampling actually causes zero conditional mean? If it is, could anyone explain to me why this is the case instead of them being two separate assumptions as stated in a standard econometrics textbook?
random sampling causes the sample Xis to be iid but that still doesn't have anything to do with ui, and I thought that was why the additional assumption of zero conditional mean was added to ensure the unbiasedness of the OLS. I would appreciate it if someone could tell me what the lecture note is trying to say here.