# Expectation of min(X,1)

On several occasions, I've come across the following statement:

Let $X$ be a random variable. Then we have, for $X$ nonnegative,

$E[\min(X,1)] = \int_0^1 Pr(X\geq u) du$.

How would one go about to show this?

We have that $$\operatorname EY=\int_0^\infty\Pr\{Y\ge y\}\mathrm dy$$ for any non-negative random variable $Y$ (see here). In this case $Y=\min\{X,1\}$. Hence, \begin{align*} \operatorname E\min\{X,1\} &=\int_0^\infty\Pr\{\min\{X,1\}\ge x\}\mathrm dx\\ &=\int_0^1\Pr\{\min\{X,1\}\ge x\}\mathrm dx+\int_1^\infty\Pr\{\min\{X,1\}\ge x\}\mathrm dx\\ &=\int_0^1\Pr\{X\ge x\}\mathrm dx \end{align*} since $\Pr\{\min\{X,1\}\ge x\}=\Pr\{X\ge x\}$ when $0\le x\le1$ and $\Pr\{\min\{X,1\}\ge x\}=0$ when $x>1$.

Hint: Show the pointwise equality $$\min(X,1)=\int_0^1\mathbf{1}_{u\leqslant X}\,\mathrm du$$ and take expectations on both sides.