0
$\begingroup$

I'm obviously doing something wrong here.. could someone please point it out?

By definition of variance: $$ \mathrm{Var}[Y] = \mathrm{E}\left[(Y-\mathrm{E}Y)^2\right] $$ By definition of total expectation: $$ = \mathrm{E}\left[\mathrm{E}\left[(Y-\mathrm{E}Y)^2 | X \right] \right] $$ By definition of variance: $$ = \mathrm{E} \left[ \mathrm{Var} [Y|X] \right] $$ which is wrong.

$\endgroup$
  • $\begingroup$ Law of total expectation is that $E[E[Y|X]] = E[Y]$. Law of total variance is that $var(Y) = E(var(Y|X)) + var(E(Y|X))$. If you expand out that second display, you will find it pretty easily. $\endgroup$ – AdamO Jun 20 at 3:42
  • 1
    $\begingroup$ I've seen the derivation on wikipedia. My question is about where I went wrong with my attempt.. $\endgroup$ – robsmith11 Jun 20 at 4:48
2
$\begingroup$

One more thing,

The Conditional Variance, has one more condition, where we have conditional Expectation inside the brackets. Due to this your third statement will be incorrect

$\endgroup$
  • 1
    $\begingroup$ Conditional variance is $$\operatorname{var}(Y|X)=E[(Y-E[Y|X])^2|X]$$ $\endgroup$ – gunes Jun 20 at 6:54
1
$\begingroup$

The expression $ \mathrm{E}\left[(Y-\mathrm{E}Y)^2 | X \right] $ isn't the variance of Y, but rather the conditional variance of $Y$ with respect to $X$.

$\endgroup$
  • $\begingroup$ Isn't that what my 3rd equation shows? $\endgroup$ – robsmith11 Jun 20 at 5:32
  • 1
    $\begingroup$ @rob You called it the variance, not the conditional variance (and justified it "by definition" which doesn't show anything). $\endgroup$ – Glen_b Jun 20 at 5:55
  • $\begingroup$ @rob Consider iid variates, $Z_i\sim \text{Bernoulli}(0.5),\, i=1,2$. Let $X=Z_1$. Let $Y=Z_2+X$. Think about the distinction between Var$(Y)$ and Var$(Y|X=x)$ (one is twice the other!). Note that $Y$ is the number of heads in two tosses of a fair coin ($Z_1+Z_2$), but if you condition on $X$, then $(Y|X=x)$ is simply a constant ($x$) plus the number of heads in one toss of a fair coin ($Z_2+x$). $\endgroup$ – Glen_b Jun 20 at 6:00
  • $\begingroup$ While @Glen_b's example is good, I'd recommend just taking the time to read up about conditional variance (wiki is an ok source). $\endgroup$ – Itamar Mushkin Jun 20 at 7:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.