<p>Just to add on to the previous answer, since I do not have enough reputation to comment:</p>

<p>In general, for random variables <span class="math-container">$X$</span> and <span class="math-container">$Y$</span>, <span class="math-container">$\mathop{{}\mathbb{E}}[Y|X = x]$</span> indicates what the expected value of <span class="math-container">$Y$</span> is, given that <span class="math-container">$X = x$</span>. Note that this is a real number! Further, if <span class="math-container">$X$</span> and <span class="math-container">$Y$</span> are independent, then <span class="math-container">$\mathop{{}\mathbb{E}}[Y|X = x] = \mathop{{}\mathbb{E}}[Y]$</span>.</p>

<p>However, we can use this to define the conditional expectation of <span class="math-container">$Y$</span> given <span class="math-container">$X$</span> as a random variable, defined on the range of X:
<span class="math-container">$$\mathop{{}\mathbb{E}}[Y|X](x) = \mathop{{}\mathbb{E}}[Y|X = x]$$</span>
This is a random variable because we do not know apriori the value of <span class="math-container">$X$</span>. <span class="math-container">$x$</span> is the value the random variable <span class="math-container">$X$</span> takes depending on the outcome.
Thus, the 'source' of randomness is <span class="math-container">$X$</span>.</p>

<p>An important relation is:
<span class="math-container">$$\mathop{{}\mathbb{E}}[Y] = \mathop{{}\mathbb{E}}[\mathop{{}\mathbb{E}}[Y|X]]$$</span>
where the outermost expectation is with respect to the value <span class="math-container">$X$</span> takes.</p>

<p>We can now answer your question. </p>

<p><span class="math-container">$\mathop{{}\mathbb{E}}[u|x] = 0$</span> for all <span class="math-container">$x$</span> implies <span class="math-container">$\mathop{{}\mathbb{E}}[u] = 0$</span> using the above relation, and noting that the expectation of a constant random variable is the same constant (here, <span class="math-container">$0$</span>).</p>

CC BY-SA 4.0
2019-05-26T21:02:27.217Z
2019-05-26T21:02:27.217Z
Ameya
<p>Intuitive explanation might help.</p>

<p><strong>(i) <span class="math-container">$E[u]=0$</span> vs <span class="math-container">$E[u|x]=0$</span>:</strong> Imagine partitioning the population by the value of <span class="math-container">$x$</span> so that each slice of population has the same value of <span class="math-container">$x$</span> in it. You can then get the mean of <span class="math-container">$u$</span> for each slice. "<span class="math-container">$E[u|x]=0$</span>", which is a shortcut notation of "<span class="math-container">$E[u|x=c]=0$</span> for (almost) all <span class="math-container">$c$</span>", means that the average of <span class="math-container">$u$</span> in every partition is zero. You can also get the mean of <span class="math-container">$u$</span> for the whole population. "<span class="math-container">$E[u]=0$</span>" means that the average of <span class="math-container">$u$</span> for the whole population is zero.</p>

<p>For example, let <span class="math-container">$x$</span> be years of education. <span class="math-container">$E[u|x]=0$</span> means that the average of <span class="math-container">$u$</span> for those with 9 years of education is zero, the average of <span class="math-container">$u$</span> for those with 10 years of education is zero, etc., while <span class="math-container">$E[u]=0$</span> means that the average of <span class="math-container">$u$</span> for the whole population is zero.</p>

<p>You see that "<span class="math-container">$E[u|x]=0$</span>" implies some sort of "<span class="math-container">$u$</span> being not related with <span class="math-container">$x$</span>", and it's called <em>mean independence</em>. On the other hand, <span class="math-container">$E[u]=0$</span> does not say anything about the relationship between <span class="math-container">$u$</span> and <span class="math-container">$x$</span>. <span class="math-container">$E[u]=0$</span> makes sense without <span class="math-container">$x$</span> ever being involved, while <span class="math-container">$E[u|x]=0$</span> makes sense only in relation to <span class="math-container">$x$</span>.</p>

<p><strong>(ii) <span class="math-container">$var(u)=\sigma^2$</span> vs <span class="math-container">$var(u|x)=\sigma^2$</span>:</strong> Imagine partitioning the population by the value of <span class="math-container">$x$</span>. You can get the variance of <span class="math-container">$u$</span> for every slice. '<span class="math-container">$var(u|x)=\sigma^2$</span>' means the variance of <span class="math-container">$u$</span> for every partition is <span class="math-container">$\sigma^2$</span>. Here, the key point is that <span class="math-container">$\sigma^2$</span> is a constant and is not involved with <span class="math-container">$x$</span>. It means that all the slices have the same variance. <span class="math-container">$var(u|x)=\sigma^2$</span> is very informative. Next, you can also get the variance of <span class="math-container">$u$</span> for the whole population, and <span class="math-container">$var(u)=\sigma^2$</span> means that that variance (of <span class="math-container">$u$</span> for the whole population) is denoted <span class="math-container">$\sigma^2$</span>, where <span class="math-container">$\sigma^2$</span> is just a notation.</p>

<p><span class="math-container">$var(u|x)$</span> can depend on <span class="math-container">$x$</span> (heteroskedasticity), but it is totally nonsense to question whether <span class="math-container">$var(u)$</span> depends on <span class="math-container">$x$</span> because <span class="math-container">$var(u)$</span> has nothing to do with <span class="math-container">$x$</span> from the beginning (unless you mean <span class="math-container">$var(u|x)$</span> by <span class="math-container">$var(u)$</span>).</p>

<p><strong>(iii) <span class="math-container">$cov(x,u)=0$</span>:</strong> This just means that <span class="math-container">$cov(x,u)=0$</span>, where <span class="math-container">$cov(a,b)$</span> is defined as <span class="math-container">$E[(a-Ea)(b-Eb)]$</span>. In your case, <span class="math-container">$cov(x,u)=E[xu]$</span> because <span class="math-container">$E[u]=0$</span>. If you need intuition about the meaning of <span class="math-container">$cov(x,u)=0$</span>, imagine you have <span class="math-container">$(x,u)$</span> values plotted on the XY plane for the whole population, with <span class="math-container">$x$</span> on the horizontal axis and <span class="math-container">$u$</span> on the vertical axis. You draw a nice straight line (where being straight is important). <span class="math-container">$cov(x,u)=0$</span> means that the straight line is horizontal. It says something about <span class="math-container">$u$</span> and <span class="math-container">$x$</span> being not related, and when it happens, we say that "<span class="math-container">$x$</span> and <span class="math-container">$u$</span> are uncorrelated."</p>

<p><span class="math-container">$E[u|x]=0$</span> implies <span class="math-container">$cov(x,u)=0$</span> but not vice versa, which is the reason why <span class="math-container">$cov(x,u)$</span> is <strong>weaker</strong> than <span class="math-container">$E[u|x]=0$</span>. You can prove it using the law of iterated expectations: <span class="math-container">$E[xu] = E[xE(u|x)] = E[x\cdot 0]=E[0]=0$</span>. For a counter example for the other way around, suppose that <span class="math-container">$x\sim N(0,1)$</span> and <span class="math-container">$u=x^2-1$</span>. Then <span class="math-container">$E[u|x]=x^2-1$</span>, which is not zero except <span class="math-container">$x=\pm 1$</span> but <span class="math-container">$cov(x,u) = E[x(x^2-1)] = E[x^3]-E[x]=0-0=0$</span>.</p>

<p><strong>(iv) What is the difference between <span class="math-container">$cov(y,x)$</span> and <span class="math-container">$cov(u,x)$</span>?</strong> If <span class="math-container">$y=\beta_0 + \beta_1 x +u$</span>, <span class="math-container">$cov(y,x) = cov(\beta_0+\beta_1 x+u,x) = \beta_1 cov(x,x) + cov(u,x)$</span>, where <span class="math-container">$cov(x,x) = var(x)$</span> by definition. That's the difference.</p>

<p><strong>ADD:</strong></p>

<p>I've just noticed the OP's confusion about <span class="math-container">$cov(x_i,u_i)$</span> and <span class="math-container">$cov(x,u)$</span>. First, <span class="math-container">$cov(x,u)$</span> can be intuitively understood as the population property explained above in (iii). <span class="math-container">$cov(x,u)$</span> is about the population, and does not say anything about the sample. The notation <span class="math-container">$cov(x_i,u_i)$</span> is on the other hand about the sample, and should in fact mean something like "<span class="math-container">$cov(x_i,u_i)$</span>, <span class="math-container">$i=1,\ldots,n$</span>", i.e., <span class="math-container">$cov(x_1,u_1)$</span>, <span class="math-container">$cov(x_2,u_2)$</span>, ..., and <span class="math-container">$cov(x_n,u_n)$</span>. They are all the same if the first person, the second person, ..., the <span class="math-container">$n$</span>th person are independent random draws from the same population (which is the meaning of <span class="math-container">$iid$</span>). If they are drawn from different populations, <span class="math-container">$cov(x_i, u_i)$</span> may be different for different <span class="math-container">$i$</span>, but I am pretty sure you are assuming <span class="math-container">$iid$</span>.</p>

<p>Now, what is <span class="math-container">$cov(x_1,u_1)$</span> then? This is the hard part. To understand its meaning, you should understand that <span class="math-container">$(x_1,u_1)$</span> is a <em>random vector</em>, whose value can change when you repeat sampling in your thought experiments. (This will keep confusing you until you understand this point.) The "first person" in the sample will keep changing when you repeat drawing the sample over and over again in your mind, and thus the <span class="math-container">$(x_1,u_1)$</span> value will keep changing over repeated samples. So, as you repeat sampling indefinitely, the values of <span class="math-container">$x_1$</span> and <span class="math-container">$u_1$</span> will change and make a (joint) distribution. <span class="math-container">$cov(x_1,u_1)$</span> is the covariance of that joint distribution. Likewise, you can understand <span class="math-container">$cov(x_2,u_2)$</span> as the covariance of <span class="math-container">$x_2$</span> and <span class="math-container">$u_2$</span> over the repeated samples. If you keep drawing the first observation independently from the same population as you talk about <span class="math-container">$cov(x,u)$</span>, then <span class="math-container">$cov(x_1,u_1) = cov(x,u)$</span>.</p>

<p>So when we talk about the population property, we use the notation <span class="math-container">$cov(x,u)$</span>. When we talk about the covariance of <span class="math-container">$x_1$</span> and <span class="math-container">$u_1$</span> (over repeated samples), we use the notation <span class="math-container">$cov(x_1,u_1)$</span>. The notation <span class="math-container">$cov(x_i,u_i)$</span> is a (sloppy) shortcut notation of <span class="math-container">$cov(x_1,u_1), \ldots, cov(x_n,u_n)$</span>. "<span class="math-container">$cov(x_i,u_i)$</span>" itself does not make much sense until you say what <span class="math-container">$i$</span> is, like in "<span class="math-container">$cov(x_i,u_i)$</span> is zero for every <span class="math-container">$i=1,\ldots,n$</span>", or "<span class="math-container">$cov(x_i,u_i)$</span> is nonzero for every <span class="math-container">$i=1,\ldots,n$</span> but they are the same for all <span class="math-container">$i$</span>." The statement "<span class="math-container">$cov(x_i,u_i)=0$</span>" is usually a lazy (or clumsy) writing of "<span class="math-container">$cov(x_i,u_i)=0$</span> for all <span class="math-container">$i=1,\ldots,n$</span>", which means <span class="math-container">$cov(x_1,u_1)=0$</span>, <span class="math-container">$cov(x_2,u_2)=0$</span>, ..., <span class="math-container">$cov(x_n,u_n)=0$</span>.</p>

CC BY-SA 4.0
2019-01-07T08:20:50.107Z
chan1142: beautiful answer. I deleted my comment because I was thinking of heterogeneous case which is not really what he's asking about, given how you explained it. very nice explanation.
mark leeds
CC BY-SA 4.0
2019-01-07T00:52:21.937Z
2019-01-28T11:25:41.770Z
2019-01-28T11:25:41.770Z
chan1142
<p>In my introductory econometrics course, we have been discussing the GM-assumptions and homoskedasticity. Unfortunately, I have some confusions and interlinked questions, so I am wondering if somebody could help me with my understanding please?</p>

<p>model: <span class="math-container">$y_i = \beta_0 + \beta_1 x_i + u_i  $</span></p>

<p><strong>What is the difference between <span class="math-container">$E[u] = 0$</span> and <span class="math-container">$E[u|x] = 0$</span>? Does the first imply the latter?</strong></p>

<p>I understand that the latter marks that the conditional mean, ie that the expected value of <span class="math-container">$u$</span> is <span class="math-container">$\sigma^2$</span> irrespective of <span class="math-container">$x$</span>, but isn't this implied by the unconditional mean? Is one of them a stronger assumption? </p>

<p><strong>Do the above imply <span class="math-container">$cov(u,x) = 0$</span> and how? What is the difference between <span class="math-container">$cov(y,x)$</span> and <span class="math-container">$cov(u_i,x_i)$</span>?</strong></p>

<p>We have stated that the homoskedasticity assumption implies zero covariance between <span class="math-container">$u$</span> and <span class="math-container">$x$</span>, but how does it come? And why is it labelled a "weaker assumption" (at least by Woolridge)? What really confuses me is that we often use the notation <span class="math-container">$cov(u_i,x_i)$</span> instead of <span class="math-container">$cov(u,x)$</span> - is there any difference? If the first one relates to a specific <span class="math-container">$i$</span>, does it really have a meaning at all?</p>

<p>Apologies if these questions are rather trivial. And thank you very much for your help!</p>

CC BY-SA 4.0
2019-01-05T21:09:01.810Z
Isn't $E[u] = 0$ rather than $\sigma^2$?
Giskard
CC BY-SA 4.0
2019-01-05T21:38:35.220Z
Shouldn't it be variance $V[u]=\sigma^2$?
Adam Bailey
CC BY-SA 4.0
2019-01-05T21:55:13.030Z
@AdamBailey Seeing as the OP mentions homoskedasticity you are probably correct. Sadly I only saw your comment after I have finished my long answer.
Giskard
<econometrics>
Confusion over homoskedacity assumption
Jhonny
# Confusion over homoskedacity assumption

(Asked by: username_0 on 2019-01-05)

In my introductory econometrics course, we have been discussing the GM-assumptions and homoskedasticity. Unfortunately, I have some confusions and interlinked questions, so I am wondering if somebody could help me with my understanding please?

model: $y\_i = \beta\_0 + \beta\_1 x\_i + u\_i $

**What is the difference between $E[u] = 0$ and $E[u|x] = 0$? Does the first imply the latter?**

I understand that the latter marks that the conditional mean, ie that the expected value of $u$ is $\sigma^2$ irrespective of $x$, but isn't this implied by the unconditional mean? Is one of them a stronger assumption?

**Do the above imply $cov(u,x) = 0$ and how? What is the difference between $cov(y,x)$ and $cov(u\_i,x\_i)$?**

We have stated that the homoskedasticity assumption implies zero covariance between $u$ and $x$, but how does it come? And why is it labelled a "weaker assumption" (at least by Woolridge)? What really confuses me is that we often use the notation $cov(u\_i,x\_i)$ instead of $cov(u,x)$ - is there any difference? If the first one relates to a specific $i$, does it really have a meaning at all?

Apologies if these questions are rather trivial. And thank you very much for your help!

**Tags:** econometrics

> **Comments:**
> **username_1**: Isn't $E[u] = 0$ rather than $\sigma^2$?  
> **username_2**: Shouldn't it be variance $V[u]=\sigma^2$?  
> **username_1**: @AdamBailey Seeing as the OP mentions homoskedasticity you are probably correct. Sadly I only saw your comment after I have finished my long answer.  

---

## 2 answers

### Answer by username_4 on 2019-01-07. Score: 5 | Accepted answer

Intuitive explanation might help.

**(i) $E[u]=0$ vs $E[u|x]=0$:** Imagine partitioning the population by the value of $x$ so that each slice of population has the same value of $x$ in it. You can then get the mean of $u$ for each slice. "$E[u|x]=0$", which is a shortcut notation of "$E[u|x=c]=0$ for (almost) all $c$", means that the average of $u$ in every partition is zero. You can also get the mean of $u$ for the whole population. "$E[u]=0$" means that the average of $u$ for the whole population is zero.

For example, let $x$ be years of education. $E[u|x]=0$ means that the average of $u$ for those with 9 years of education is zero, the average of $u$ for those with 10 years of education is zero, etc., while $E[u]=0$ means that the average of $u$ for the whole population is zero.

You see that "$E[u|x]=0$" implies some sort of "$u$ being not related with $x$", and it's called *mean independence*. On the other hand, $E[u]=0$ does not say anything about the relationship between $u$ and $x$. $E[u]=0$ makes sense without $x$ ever being involved, while $E[u|x]=0$ makes sense only in relation to $x$.

**(ii) $var(u)=\sigma^2$ vs $var(u|x)=\sigma^2$:** Imagine partitioning the population by the value of $x$. You can get the variance of $u$ for every slice. '$var(u|x)=\sigma^2$' means the variance of $u$ for every partition is $\sigma^2$. Here, the key point is that $\sigma^2$ is a constant and is not involved with $x$. It means that all the slices have the same variance. $var(u|x)=\sigma^2$ is very informative. Next, you can also get the variance of $u$ for the whole population, and $var(u)=\sigma^2$ means that that variance (of $u$ for the whole population) is denoted $\sigma^2$, where $\sigma^2$ is just a notation.

$var(u|x)$ can depend on $x$ (heteroskedasticity), but it is totally nonsense to question whether $var(u)$ depends on $x$ because $var(u)$ has nothing to do with $x$ from the beginning (unless you mean $var(u|x)$ by $var(u)$).

**(iii) $cov(x,u)=0$:** This just means that $cov(x,u)=0$, where $cov(a,b)$ is defined as $E[(a-Ea)(b-Eb)]$. In your case, $cov(x,u)=E[xu]$ because $E[u]=0$. If you need intuition about the meaning of $cov(x,u)=0$, imagine you have $(x,u)$ values plotted on the XY plane for the whole population, with $x$ on the horizontal axis and $u$ on the vertical axis. You draw a nice straight line (where being straight is important). $cov(x,u)=0$ means that the straight line is horizontal. It says something about $u$ and $x$ being not related, and when it happens, we say that "$x$ and $u$ are uncorrelated."

$E[u|x]=0$ implies $cov(x,u)=0$ but not vice versa, which is the reason why $cov(x,u)$ is **weaker** than $E[u|x]=0$. You can prove it using the law of iterated expectations: $E[xu] = E[xE(u|x)] = E[x\cdot 0]=E[0]=0$. For a counter example for the other way around, suppose that $x\sim N(0,1)$ and $u=x^2-1$. Then $E[u|x]=x^2-1$, which is not zero except $x=\pm 1$ but $cov(x,u) = E[x(x^2-1)] = E[x^3]-E[x]=0-0=0$.

**(iv) What is the difference between $cov(y,x)$ and $cov(u,x)$?** If $y=\beta\_0 + \beta\_1 x +u$, $cov(y,x) = cov(\beta\_0+\beta\_1 x+u,x) = \beta\_1 cov(x,x) + cov(u,x)$, where $cov(x,x) = var(x)$ by definition. That's the difference.

**ADD:**

I've just noticed the OP's confusion about $cov(x\_i,u\_i)$ and $cov(x,u)$. First, $cov(x,u)$ can be intuitively understood as the population property explained above in (iii). $cov(x,u)$ is about the population, and does not say anything about the sample. The notation $cov(x\_i,u\_i)$ is on the other hand about the sample, and should in fact mean something like "$cov(x\_i,u\_i)$, $i=1,\ldots,n$", i.e., $cov(x\_1,u\_1)$, $cov(x\_2,u\_2)$, ..., and $cov(x\_n,u\_n)$. They are all the same if the first person, the second person, ..., the $n$th person are independent random draws from the same population (which is the meaning of $iid$). If they are drawn from different populations, $cov(x\_i, u\_i)$ may be different for different $i$, but I am pretty sure you are assuming $iid$.

Now, what is $cov(x\_1,u\_1)$ then? This is the hard part. To understand its meaning, you should understand that $(x\_1,u\_1)$ is a *random vector*, whose value can change when you repeat sampling in your thought experiments. (This will keep confusing you until you understand this point.) The "first person" in the sample will keep changing when you repeat drawing the sample over and over again in your mind, and thus the $(x\_1,u\_1)$ value will keep changing over repeated samples. So, as you repeat sampling indefinitely, the values of $x\_1$ and $u\_1$ will change and make a (joint) distribution. $cov(x\_1,u\_1)$ is the covariance of that joint distribution. Likewise, you can understand $cov(x\_2,u\_2)$ as the covariance of $x\_2$ and $u\_2$ over the repeated samples. If you keep drawing the first observation independently from the same population as you talk about $cov(x,u)$, then $cov(x\_1,u\_1) = cov(x,u)$.

So when we talk about the population property, we use the notation $cov(x,u)$. When we talk about the covariance of $x\_1$ and $u\_1$ (over repeated samples), we use the notation $cov(x\_1,u\_1)$. The notation $cov(x\_i,u\_i)$ is a (sloppy) shortcut notation of $cov(x\_1,u\_1), \ldots, cov(x\_n,u\_n)$. "$cov(x\_i,u\_i)$" itself does not make much sense until you say what $i$ is, like in "$cov(x\_i,u\_i)$ is zero for every $i=1,\ldots,n$", or "$cov(x\_i,u\_i)$ is nonzero for every $i=1,\ldots,n$ but they are the same for all $i$." The statement "$cov(x\_i,u\_i)=0$" is usually a lazy (or clumsy) writing of "$cov(x\_i,u\_i)=0$ for all $i=1,\ldots,n$", which means $cov(x\_1,u\_1)=0$, $cov(x\_2,u\_2)=0$, ..., $cov(x\_n,u\_n)=0$.

> **Comments:**
> **username_5**: username_4: beautiful answer. I deleted my comment because I was thinking of heterogeneous case which is not really what he's asking about, given how you explained it. very nice explanation.  

---

### Answer by username_3 on 2019-05-26. Score: 0

Just to add on to the previous answer, since I do not have enough reputation to comment:

In general, for random variables $X$ and $Y$, $\mathop{{}\mathbb{E}}[Y|X = x]$ indicates what the expected value of $Y$ is, given that $X = x$. Note that this is a real number! Further, if $X$ and $Y$ are independent, then $\mathop{{}\mathbb{E}}[Y|X = x] = \mathop{{}\mathbb{E}}[Y]$.

However, we can use this to define the conditional expectation of $Y$ given $X$ as a random variable, defined on the range of X:
$$\mathop{{}\mathbb{E}}[Y|X](x) = \mathop{{}\mathbb{E}}[Y|X = x]$$
This is a random variable because we do not know apriori the value of $X$. $x$ is the value the random variable $X$ takes depending on the outcome.
Thus, the 'source' of randomness is $X$.

An important relation is:
$$\mathop{{}\mathbb{E}}[Y] = \mathop{{}\mathbb{E}}[\mathop{{}\mathbb{E}}[Y|X]]$$
where the outermost expectation is with respect to the value $X$ takes.

We can now answer your question.

$\mathop{{}\mathbb{E}}[u|x] = 0$ for all $x$ implies $\mathop{{}\mathbb{E}}[u] = 0$ using the above relation, and noting that the expectation of a constant random variable is the same constant (here, $0$).


---

