Why doesn't the law of total expectation apply here? $E[X] = E[E[X \mid Y]]$

46 Views Asked by At

I'm learning about Entropy for the first time. From Wikipedia,

$$H(Y \mid X = x) = E[I(Y) \mid X=x]$$

and the confusing part for me is this statement: " $H(Y \mid X)$ is the result of averaging $H(Y \mid X = x)$ over all possible values $x$ that $X$ may take. "

This reminds me exactly of $E[X] = E[E[X|Y]]$.

My question

It seems to me $H(Y \mid X)$ should equal $H(Y)$ but this is wrong. Here's why I think this... because of the total law of expectation,

$$H(Y \mid X) = E[H(Y \mid X)] = E[E[I(Y) \mid X]] = E[I(Y)] = H(Y)$$

Can you help me understand where I'm going wrong? Thank you.

1

There are 1 best solutions below

3
On BEST ANSWER

Your mistake is $$ H(Y|X)=E[H(Y|X)]. $$ There is no reason for this to be true.