Let $X$ be a non-negative random variable. Why does the following hold:
$$\int_0^\infty \boldsymbol{1}_{X > c} \, dc = \int_0^X dc = X \quad\text{(?)} $$
I am confused because I thought that $\int_0^\infty \boldsymbol{1}_{X > c} \, dc$ gives me something like $\sum_{c \in [0,\infty)}\lambda(\{X > c\})$.
EDIT: This was the original equation: $\mathbb E(\int_0^\infty \boldsymbol{1}_{X > c}) \, dc =\mathbb E(\int_0^X dc) = \mathbb E(X)$. Maybe I read this wrong!