# Showing OLS estimator is unbiased. Question about taking expectation

I've been reading about simple linear regression $y = \beta_0 + \beta_1 x + u$. The following proof from Wooldrige's Econometrics confuses me.

Theorem: $E(\hat{\beta_1})=\beta_1$ for any values of $\beta_0$.

Proof: In this proof, the expected values are conditional on the sample values of the independent variable....

$$E(\hat{\beta_1}) = \beta_1 + (1/SST_x) \sum_{i=1}^n d_i E(u_i) = \beta_1 + (1/SST_x) \sum_{i=1}^n d_i\cdot 0 = \beta_1$$

where we have used the fact that the expected value of each $u_i$ (conditional on $\{x_1,x_2,\cdots,x_n\}$) is zero. Since unbiasedness holds for any outcome on $\{x_1,x_2,\cdots,x_n\}$, unbiasedness also holds without conditioning on $\{x_1,x_2,\cdots,x_n\}$.

I am confused by the part when we take expectation on both sides. Are we considering $E(\hat{\beta_1}|X=x_j)$? I saw some notes writing $E(\hat{\beta_1} | x_1,\cdots,x_n)$, but does this even mean? I am just really confused and don't know what's really going on here.

Update: I am not sure how to make myself more clear, but my understanding of OLS estimate doesn't seem to agree with the book. For example, I understand that we start with a "true model", and then generate some samples $(x_1,y_1),\cdots,(x_n,y_n)$ from this model. In this case, shouldn't we aim to show that

$$E(\hat{\beta_1}|X_1=x_1,\cdots,X_n=x_n)=\beta_1$$

?

Update 2: I guess my question can be better stated this way. When we write $E(...)$ here, do we mean $E(...)$, or $E(... | X_1=x_1,\cdots,X_n = x_n)$?

If we mean $E(...)$, then on the right hand side what is $E(u_i)$ and $u_i$ as a random variable? Because in the population model, we do not have $u_i$. Instead, we only have $u$.

If we mean $E(...|X_1 = x_1,\cdots,X_n = x_n)$, then why don't the book (and most notes I found online) write it that way? And in both case, what is $u_i$? I understand what $u$ is. Should I consider $u_i$'s as sample of $u$, just like $X_i$'s as sample of $X$?

• I take your question to be the last one you ask. But I see no reason even to ask it, because you answered it earlier where you quoted "In this proof, the expected values are conditional on the sample values of the independent variable." To be explicit, the sample values being referred to are what you seem to be writing "$X_1=x_1, \ldots, X_n=x_n$." – whuber Feb 14 '17 at 16:01
• @whuber Thanks for the reply. In this case, then why some notes say things like "we treat $X_i$'s as non-stochastic"? I actually couldn't find definitions of something being stochastic or non-stochastic. – 3x89g2 Feb 14 '17 at 16:41
• "Stochastic" means random (from the Ancient Greek). – whuber Feb 14 '17 at 17:05
• @whuber So in this case, $X_i$'s are stochastic? – 3x89g2 Feb 14 '17 at 17:17
• Where the quotation states "conditional on the sample values of the independent variable" it is explicitly asserting you are not supposed to be taking the $X_i$ as random. – whuber Feb 14 '17 at 18:17