0

I was reading this

Why is the expected value $E(X^2) \neq E(X)^2$?

and this

https://stats.stackexchange.com/questions/228624/random-variable-with-zero-variance

and this led me to the following question.

If a discrete r.v. has $0$ variance does it mean that this r.v. takes on only a single value $\mu$ (its own mean)? I think that should be true but I cannot quite convince myself right now.

The opposite of this statement is obviously true.

But is it true in this direction too?

How can we prove this?

I think should be a trivial proof but I don't quite see it right now.

peter.petrov
  • 12,568

1 Answers1

2

Yes. Use the definition

$$0=\operatorname{Var}X=\mathbb E[(X-\mu)^2].$$ But $Y=(X-\mu)^2\geq0$. So if there is some $\omega$ with $\mathbb P(\omega)>0$ and $Y(\omega)>0$, then $$\mathbb E[Y]=\sum_{\omega\in\Omega}Y(\omega)\cdot\mathbb P(\omega)>0,$$ a contradiction. So we must have $\mathbb P(Y=0)=1$ i.e. $\mathbb P(X=\mu)=1$.

jlammy
  • 9,164
  • Hm... can you elaborate on this implication? I don't follow after "which implies". The first two things I agree with, they are obvious. But how does that follow? – peter.petrov Jan 28 '21 at 19:05
  • Hi @peter.petrov, I've edited in a little more explanation. Essentially, if there is a non-zero probability that $(X-\mu)^2>0$, then you introduce a strictly positive term into the formula for $\mathbb E[(X-\mu)^2]$, which is a contradiction. Let me know if there's anything else unclear! – jlammy Jan 28 '21 at 19:22
  • Thanks, I think I get it better now. So it is trivial indeed, right? One just needs to use the definitions to prove it. – peter.petrov Jan 28 '21 at 19:29
  • Yes, I guess it's trivial in the sense that there are not really any novel ideas involved -- just following your nose. In the continuous case though, a little more care is needed in the details. – jlammy Jan 28 '21 at 19:32
  • Thanks. Yeah, I noticed. That's why I asked about the discrete case in particular. – peter.petrov Jan 29 '21 at 10:54