# Alec's expected value trick


## Lemma

Suppose is a non-negative real random-variable, then I have found a way to calculate the expected value of [ilmath]X[/ilmath], [ilmath]\E{X} [/ilmath]:

• We claim: $\E{X}\eq\int^\infty_{0}\big(1-\P{X<x}\big)\mathrm{d}x$ or $\E{X}\eq\int^\infty_0\P{X\ge x}\mathrm{d}x$

## Statement

We should be able to use this for a general real random variable by considering conditional random variables (via conditional probability) for the positive and negative parts respectively.