= Nonnegative random variable
{title2=$X\ge0\text{ almost surely}$}
A <nonnegative random variable> is a <random variable> $X$ satisfying
$$
\Pr(X\ge0)=1.
$$
Thus $\{X\ge0\}$ is an <almost sure event>. It is stronger than having a nonnegative mean, but it can allow negative values on a <zero-probability event>. A nonnegative mean alone permits large negative and positive outcomes to cancel.
For an original discrete example, let $X=0$ with probability $0.9$ and $X=10$ with probability $0.1$. Then $\mathbb E[X]=1$, even though the variable is usually zero. The discrete calculation is the sum of value times probability; the primary text defines that finite-expectation operation in its expected-value section.<Introduction to Probability by Charles M. Grinstead and J. Laurie Snell>[Section 6.1, Definition 6.1, printed p. 226]{ref}
A particularly useful consequence is <Markov's inequality>. For $a>0$, the pointwise bound $X\ge a\mathbf1_{\{X\ge a\}}$ holds almost surely. Taking <expected values> gives
$$
\Pr(X\ge a)\le\frac{\mathbb E[X]}a.
$$
In the example, $\Pr(X\ge5)=0.1\le1/5$. The bound need not be exact; it uses only nonnegativity and the mean. With an infinite nonnegative expectation it is uninformative rather than a finite tail estimate.
The same argument proves that a <nonnegative random variable> with zero expectation is zero almost surely: for every positive integer $n$, $\Pr(X\ge1/n)=0$, and $\{X>0\}$ is the countable union of these events. Without nonnegativity this conclusion fails; equal probabilities at $-1$ and $1$ give mean zero without a zero variable.
Nonnegativity also makes the <tail integral formula for expectation> natural:
$$
\mathbb E[X]=\int_0^\infty\Pr(X>t)\,dt.
$$
It follows by expressing $X$ as the integral of the indicators $\mathbf1_{\{X>t\}}$ and interchanging nonnegative integrals. The resulting extended expectation can be infinite. This representation connects an average amount or waiting time with the areas of its tail probabilities, rather than requiring a <probability density function>.
Back to article page