Is a non-negative random variable with zero mean almost surely zero?

We have proven the following in class:

If $X$ is a finite random variable with $X\geq 0$ then $$E(X)=0 \iff P(X=0)=1$$ (By finite I meant that the range has finitely many elements).

Does it hold for any non-negative random variable $X:\Omega\to\mathbb R_{\geq0}$?

(I've tried proving it with the indicator function yet it didn't help.)


Solution 1:

Note that, for every $x\gt0$, $$ X\geqslant x\mathbf 1_{X\geqslant x}. $$ (This is the step where one uses that $X\geqslant0$ almost surely.) It follows that $$ E(X)\geqslant xP(X\geqslant x). $$ If $E(X)=0$ this inequality implies that $P(X\geqslant x)=0$. Finally, $$ [X\gt0]=\bigcup_{n\geqslant1}[X\geqslant1/n], $$ hence, if every event in the RHS has probability zero the event on the LHS has probability zero.

Solution 2:

Let $\langle \Omega,\mathcal{F},P\rangle$ denote our probability space. The expected value of $X$ is $$E[X]=\int_{\Omega}X\, \textrm{d}P.$$

If we let $U\in\mathcal{F}$ be $X^{-1}\{0\}$, then we can decompose the exectation: $$E[X]=\int_{U}X\, \textrm{d}P+\int_{\Omega\setminus U}X\, \textrm{d}P=\int_{\Omega\setminus U}X\, \textrm{d}P.$$

(The second equality follows from the fact that $X(\omega)=0$ for $\omega\in U$.)

Now, suppose that $P[\Omega\setminus U]>0$. Since $$\forall \omega\in (\Omega\setminus U)\, \big(X(\omega)>0\big)$$ there must be some $\epsilon>0$ and some $V\subseteq(\Omega\setminus U)$ such that $P[V]>0$ and $$\forall \omega\in V \, \big(X(\omega)>\epsilon\big).$$ Thus: $$E[X]=\int_{\Omega\setminus U}X\, \textrm{d}P \geq \int_{V} X\, \textrm{d}P \geq \int_{V}\epsilon\,\textrm{d}P = \epsilon P[V]>0.$$

For the converse direction, suppose that $P[U]=1$. Then $P[\Omega\setminus U]=0$ and so we get: $$E[X]=\int_{\Omega\setminus U}X\, \textrm{d}P = 0.$$