# Zero variance Random variables

I am a probability theory beginner. The expression for the variance of a random variable $x$ (of a random process is

$$\sigma^2 = E(x^2) - (\mu_{x})^2$$

If $E(x^2) = (\mu_{x})^2$, then $\sigma^2 = 0$. Can this happen ? Can a random variable have a density function whose variance (the second central moment alone) is $0$ (other than the dirac delta function).

• Variance is $0$ if and only if the random variable is constant. – voldemort May 8 '14 at 5:27
• @voldemort more precisely: almost surely constant. – Hagen von Eitzen May 8 '14 at 5:53

The variance $$E(X^2)-E(X)^2=E(X-E(X))^2$$ is equal to $0$ if and only if $X$ is equal to $E(X)$ in all of its support. This can only happen if $X$ is equal to some constant with probability $1$ (known as a degenerate distribution).

• The information 'in all of its support' was somehow a misleading information to me. Consider $E[X]\ne 0$, both $supp(X)$ and $supp(X)^c$ are not null subsets and define $X=E[X]$ on $supp(X)$, $X=0$ on $supp(X)^c$. Then $Var[X]=E[X-E[X]]^2=E[X]^2\cdot P[supp(X)^c]^2\ne 0$. So it has to hold $X=E[X]$ almost surely or equivalently that $supp(X)^c$ is a null subset. – user408858 Nov 4 '18 at 15:40
• It is, of course, $Var[X]=E[(X-E[X])^2]$. So in the formula there should be $Var[X]=E[X]^2\cdot P[supp(X)^c]$. – user408858 Nov 4 '18 at 16:49