Expectation related with convergence let x be arandom variable and let 
$A_n$ ={${ \omega  : n \leq |x(w)|<n+1 }$} n=0,1,2,...
prove that 
$\sum_{n=1}^{\infty}p(|x|> n)$=$\sum_{n=1}^{\infty}np(A_n)$ $\leq$ E(|x|) 
$\leq$ $\sum_{n=1}^{\infty}(n+1)p(A_n)$=1+$\sum_{n=1}^{\infty}p(|x|>n)$
deduce 
1) E(x) is finite iff $\sum_{n=1}^{\infty}p(|x|> n)$ is convergent
2)if E(x) is finite then np(|x|> n) $\to$ 0 as n $\to$ $\infty$
I try to solve it , I begin with 
let $A_n =({n \leq |x|<n+1} ) = ({|x|<n+1})-({|x|<n})$
then 
$p(A_n)=p({|x|<n+1})-p({|x|<n})$
what i I can do now , any help please its important problem for me !
 A: I'll address the first half of the expression you need to prove and let you finish the second half. First, $\sum_{n=1}^\infty P(|X| \geq n) = \sum_{n=1}^\infty n P(A_n)$ is just a matter of rearranging the terms of the series. To wit, 
$$\begin{align}\sum_{n=1}^\infty P(|X| \geq n) &= \sum_{n=1}^\infty \Big[ P(n \leq |X| < n+1) + P(n+1 \leq |X| < n+2) + ...\Big]
\end{align}$$
In this sum, the term $P(1 \leq |X| < 2)$ occurs $1$ time, the term $P(2 \leq |X| < 3)$ occurs $2$ times, and, in general, the term $P(n \leq |X| < n+1)$ occurs $n$ times, hence
$$\sum_{n=1}^\infty P(|X| \geq n) = \sum_{n=1}^\infty n P(A_n).$$
To justify this rearrangement completely rigorously, you can appeal to something like the Tonelli-Fubini theorem. I leave the details to you. You may want to have a look at this post, which raises a question that is similar to yours and receives a very nice answer from Did.
Now, if $x$ is a non-negative real number, let $\lfloor x \rfloor$ be the greatest integer that is less than or equal to $x$ (e.g. $\lfloor \pi \rfloor = 3$). Note that by definition $\lfloor x \rfloor \leq x$. Also note that if $X$ is a real-valued random variable, then $\lfloor |X| \rfloor$ is an integer-valued (and therefore discrete) random variable. Thus, by the definition of expected value, 
$$\sum_{n=1}^\infty n P(A_n) = \sum_{n=1}^\infty n P(\lfloor |X| \rfloor = n) = E(\lfloor |X| \rfloor) \leq E|X|.$$
