Changing variables inside conditional expectation

42 Views Asked by At

Say we have a random variable $X$ on a probability space, taking values in the natural numbers. We want to compute $E(X)$. Letting $n\in \mathbb{N}$ and using the law of total expectation, $E(X) = E(E(X \mid X = n))$. It's obvious that we can't write $E(X \mid X = n) = E(n \mid X = n) = n \cdot E(1 \mid X = n) = n$, but what rules are we breaking if we do it? Intuitively, conditioned on that $X=n$ we should be left with the expectation of $n$, right?