I'm a student studying probability models.
I have confronted a difficult problem as follow.
If X is nonnegative integer valued random variable, show that
$$E[X]=\sum_{n=1}^{\infty} P(n \le X) = \sum_{n=0}^{\infty} P(n <X)$$
Also, I have a hint for this problem.
HINT: Define the sequence of random variables $I_n, 1\le n$ by $$ I_n = \begin{cases} 1 &\text{if } n \le X\\ 0 &\text{if } n > X \end{cases} $$ Now express X in terms of $I_n$
How can i proof the expected value of X with the HINT or without?
Since $X$ takes non-negative integer values, i.e. $X\in S=\{0,1,2,\cdots\}$,
say $X=n$ for some $n\ge 0$, then we note that
$(1) \ \forall k\in S\cap [0,n]$, i.e. for all non-negative integers $k\le n$, $I_k=1$,
$(2) \ \forall k\ge n+1,k\in S, I_k=0$
Thus $$\text{for }n\gt 0, \ X=n\implies I_k=\begin{cases}1 & \text{if } 0\le k\le n \\ 0 & \text{if } k\ge n+1\end{cases}\\ \implies \displaystyle\sum_{i=1}^n I_i=n \implies \displaystyle\sum_{i=1}^\infty I_i=n \ (\because \text{rest are }0) \\ \implies X=\displaystyle\sum_{i=1}^\infty I_i $$ Note also that $$E(I_n)=1\cdot P(I_n=1)+0\cdot P(I_n=0) = P(I_n=1)=P(n\le X)\tag2$$ Then use the linearity of expectation as $$E(X)=E\left( \displaystyle\sum_{i=1}^\infty I_i\right)=\displaystyle\sum_{i=1}^\infty E(I_i)$$ with $(2)$.