# Proving conditional expectation

#### Usagi

##### Member
Hi guys, assume we have an equality involving 2 random variables U and X such that $$E(U|X) = E(U)=0$$, now I was told that this assumption implies that $$E(U^2|X) = E(U^2)$$. However I'm not sure on how to prove this, if anyone could show me that'd be great!

#### CaptainBlack

##### Well-known member
Hi guys, assume we have an equality involving 2 random variables U and X such that $$E(U|X) = E(U)=0$$, now I was told that this assumption implies that $$E(U^2|X) = E(U^2)$$. However I'm not sure on how to prove this, if anyone could show me that'd be great!
Not sure this is true. Suppose $$U|(X=x) \sim N(0,x^2)$$, and $$X$$ has whatever distribution we like.

Then $$E(U|X=x)=0$$ and $$\displaystyle E(U)=\int \int u f_{U|X=x}(u) f_X(x)\;dudx =\int E(U|X=x) f_X(x) \; dx=0$$.

Now $$E(U^2|X=x)={\text{Var}}(U|X=x)=x^2$$. While $$\displaystyle E(U^2)=\int E(U^2|X=x) f_X(x) \; dx= \int x^2 f_X(x) \; dx$$.

Or have I misunderstood something?

CB

#### Usagi

##### Member
Hi CB,

Actually the problem arose from the following passage regarding the homoskedasticity assumption for simple linear regression:

I do not understand how they came to the conclusion that $$\sigma^2 = E(u^2|x) \implies \sigma^2 = E(u^2)$$

#### CaptainBlack

##### Well-known member
Hi CB,

Actually the problem arose from the following passage regarding the homoskedasticity assumption for simple linear regression:

I do not understand how they came to the conclusion that $$\sigma^2 = E(u^2|x) \implies \sigma^2 = E(u^2)$$