<p>They are not equivalent.
In the linear regression model (matrix notation),
<span class="math-container">$$ y = X\beta + u,$$</span></p>
<p>the OLS estimator for <span class="math-container">$\beta$</span> is
<span class="math-container">$$\hat \beta_{OLS} = \beta + (X'X)^{-1}X'u.$$</span></p>
<p>Then
<span class="math-container">$$\mathbb E\left(\hat \beta_{OLS} \mid X\right) = \beta + (X'X)^{-1}X'\mathbb E\left(u \mid X\right).$$</span></p>
<p>Under the assumption that is usually called &quot;mean-independence of the error term from the regressors&quot;, or &quot;strict exogeneity of the regressors&quot;,
<span class="math-container">$$E\left(u \mid X\right)=0,$$</span></p>
<p>we get</p>
<p><span class="math-container">$$\mathbb E\left(\hat \beta_{OLS} \mid X\right) = \beta$$</span></p>
<p>And as another answer pointed out, we then also get by the law of iterated expectations,</p>
<p><span class="math-container">$$\mathbb E\left(\hat \beta_{OLS} \right)= \mathbb E \Big[\mathbb E\left(\hat \beta_{OLS} \mid X\right)\Big] = \mathbb E(\beta) = \beta.$$</span></p>
<p>The reason that econometrics uses conditional arguments is that with observational data, the regressors are stochastic. But the original framework in which linear regression and least-squares were developed, was controlled experiments, where the regressors were &quot;deterministic&quot;, namely, their values were decided upon by the researcher (hence the name &quot;design matrix&quot; that is still used sometimes). There, there was no need to use conditional arguments, because, being deterministic, the regressors were not/could not be characterized by a disgtribution, to have moments, etc.</p>
<p>When we condition on a random variable, we treat it &quot;as though&quot; it is &quot;fixed/deterministic&quot;.</p>

CC BY-SA 4.0
2022-09-12T16:41:28.740Z
2022-09-12T16:41:28.740Z
Alecos Papadopoulos
<p>The idea is that <span class="math-container">$E[\hat{b}|X]$</span> could possibly be a function of <span class="math-container">$X$</span>. For example, we might have an estimator for which <span class="math-container">$E[\hat{b}|X] = b +f(X)$</span>. This would mean our estimator is only unbiased for the draws of data, <span class="math-container">$X$</span>, for which <span class="math-container">$f(X)=0$</span>.</p>
<p>If we have that <span class="math-container">$E[\hat{b}|X]$</span> is the same constant, <span class="math-container">$b$</span>, for all <span class="math-container">$X$</span> (mathematically, if <span class="math-container">$E[\hat{b}|X]=b$</span> for all <span class="math-container">$X$</span>), then regardless of the draw of data, <span class="math-container">$X$</span>, our estimator is unbiased.</p>
<p>We can also think about this as an application of the law of iterated expectations.</p>
<p><span class="math-container">$E[\hat{b}]= E[E[\hat{b}|X]] = E[b] = b$</span></p>

CC BY-SA 4.0
2022-09-12T10:00:47.313Z
2022-09-12T14:35:24.000Z
2022-09-12T14:35:24.000Z
Michael Gmeiner
<p>I understand that we say that an estimator is unbiased if its expected value is equal to the population parameter it targets (i.e. if <span class="math-container">$\bar X _N $</span> is an estimator of the mean over a sample of size <span class="math-container">$N$</span>, then <span class="math-container">$E[\bar X_N ] = \mu$</span>).</p>
<p>However, I recently learned that, in the OLS regression under the model <span class="math-container">$y_i = b x_i + a + u_i$</span>, we say that the estimators <span class="math-container">$\hat a$</span> and <span class="math-container">$\hat b$</span> are unbiased if <span class="math-container">$E[\hat a | X] = a$</span> and <span class="math-container">$E[\hat b | X] = b$</span>.</p>
<p><em><strong>I am having trouble reconciliation these two ideas. How is it that the idea in the first paragraph (i.e. <span class="math-container">$E[\hat b] = b$</span>) is equivalent to the idea in the second paragraph (i.e. <span class="math-container">$E[\hat b | X] = b$</span>)?</strong></em></p>

<econometrics><regression>
Unbiasedness and OLS Regression
hu234
# Unbiasedness and OLS Regression

(Asked by: username_0 on 2022-09-12)

I understand that we say that an estimator is unbiased if its expected value is equal to the population parameter it targets (i.e. if $\bar X \_N $ is an estimator of the mean over a sample of size $N$, then $E[\bar X\_N ] = \mu$).

However, I recently learned that, in the OLS regression under the model $y\_i = b x\_i + a + u\_i$, we say that the estimators $\hat a$ and $\hat b$ are unbiased if $E[\hat a | X] = a$ and $E[\hat b | X] = b$.

***I am having trouble reconciliation these two ideas. How is it that the idea in the first paragraph (i.e. $E[\hat b] = b$) is equivalent to the idea in the second paragraph (i.e. $E[\hat b | X] = b$)?***

**Tags:** econometrics, regression


---

## 2 answers

### Answer by username_1 on 2022-09-12. Score: 4

They are not equivalent.
In the linear regression model (matrix notation),
$$ y = X\beta + u,$$

the OLS estimator for $\beta$ is
$$\hat \beta\_{OLS} = \beta + (X'X)^{-1}X'u.$$

Then
$$\mathbb E\left(\hat \beta\_{OLS} \mid X\right) = \beta + (X'X)^{-1}X'\mathbb E\left(u \mid X\right).$$

Under the assumption that is usually called "mean-independence of the error term from the regressors", or "strict exogeneity of the regressors",
$$E\left(u \mid X\right)=0,$$

we get

$$\mathbb E\left(\hat \beta\_{OLS} \mid X\right) = \beta$$

And as another answer pointed out, we then also get by the law of iterated expectations,

$$\mathbb E\left(\hat \beta\_{OLS} \right)= \mathbb E \Big[\mathbb E\left(\hat \beta\_{OLS} \mid X\right)\Big] = \mathbb E(\beta) = \beta.$$

The reason that econometrics uses conditional arguments is that with observational data, the regressors are stochastic. But the original framework in which linear regression and least-squares were developed, was controlled experiments, where the regressors were "deterministic", namely, their values were decided upon by the researcher (hence the name "design matrix" that is still used sometimes). There, there was no need to use conditional arguments, because, being deterministic, the regressors were not/could not be characterized by a disgtribution, to have moments, etc.

When we condition on a random variable, we treat it "as though" it is "fixed/deterministic".


---

### Answer by username_2 on 2022-09-12. Score: 4

The idea is that $E[\hat{b}|X]$ could possibly be a function of $X$. For example, we might have an estimator for which $E[\hat{b}|X] = b +f(X)$. This would mean our estimator is only unbiased for the draws of data, $X$, for which $f(X)=0$.

If we have that $E[\hat{b}|X]$ is the same constant, $b$, for all $X$ (mathematically, if $E[\hat{b}|X]=b$ for all $X$), then regardless of the draw of data, $X$, our estimator is unbiased.

We can also think about this as an application of the law of iterated expectations.

$E[\hat{b}]= E[E[\hat{b}|X]] = E[b] = b$


---

