Can random variable $X$ take $2$ (or more values) in this situation?

I am looking at the following exercise in a text. "Let $a$ be a real number and $X$ be a discrete random variable such that $Var(X) = 0$. Which statement is not always true?".

Then it gives a list of statements, where the first statement is "$X$ takes only one value". The answer given in the text says that one other statement is not always true (I am not bothering to write that statement here, but it involves number $a$).

But, surely the statement above is also not always true. For example let $X$ take values $0$ and $1$, with $P(X = 0) = 0$ and $P(X=1) = 1$. Then $Var(X)=0$. So this means there is a mistake in the text I am reading?


$\newcommand{\o}[1]{\operatorname{#1}}$

For a discrete random variable, "taking a value with probability $0$" is the same as not taking on that value at all. That is not the case for continuous RVs and the terms "almost never"/ "almost surely" come into play for events (or complement of event) with infinitesimally small probability.

If $X$ is a discrete RV with a finite sample space, then your textbook is correct in saying that $X$ takes only one value (a more precise way would be to say $X$ takes only one value with probability $1$)

$$\o{Var}(X):=\Bbb E[(X-\mu)^2]=\sum_x (x-\mu)^2\cdot\Bbb P(X=x)$$

Now, both $\Bbb P(X=x)$ and $(x-\mu)^2$ are non-negative for all $x$, so $\o{Var}(X)\ge 0$ with equality iff all the terms in the sum are $0$ which is only when $x=\mu,\Bbb P(X=\mu)=1$ and all other values $X$ can "potentially take" has probability $0$ (in a setting with finite sized sample space, this is the same as not taking on that value at all)

So, if the sample space for $X$ is finite, $X$ takes only one value $\mu$ (which will also be its mean) with probability $1$ and doesn't take on any other value (takes with probability $0$)


Now that I think about it, the same should hold for countably infinite sized sample space as well.

Suppose $X$ takes on values $(x_i)_{i\in\Bbb N}$ with probabilities $(p_i)_{i\in\Bbb N}$. Denote by $\mu$ the mean of $X$. Then, by definition (and law of the unconscious statistician),

$$\o{Var}(X):=\Bbb E[(X-\mu)^2]=\sum_i (x_i-\mu)^2p_i$$

If only finitely many $p_i$'s are nonzero, the terms with zero probabilities vanish and we come back to the case of finite sized sample space.

Suppose countably infinitely many $p_i$'s are nonzero. There is at least one $x_k\ne\mu$ with probability $p_k\ne 0$. But then, $\o{Var}(X)\ge (x_k-\mu)^2p_k\gt 0$ which is a contradiction to $\o{Var}(X)=0$

In conclusion, your textbook is correct.