Let's suppose we know that if $X \ge 0$ and X is integer-valued, then: $E(X) = \sum_{n \ge 1} Pr(X \ge n)$ For more info please visit: Proof of $\sum_{k=0}^n k \text{Pr}(X=k) = \sum^{n-1}_{k=0} \text{Pr}(X>k) -n \text{Pr}(X>n)$
My question is how to get $E(X^2)$.
Thanks,