Expected Value of Greatest Integer Random Variable Let $X$ be a random variable with probability density function 
\begin{equation}
f(x)=\frac{1}{2} e^{-|x|},\;\; -\infty<x<\infty.
\end{equation}
What is expected value of $\lfloor X \rfloor$, i.e.
\begin{equation}
E( \lfloor X \rfloor),
\end{equation}
where $\lfloor X \rfloor$ denotes the greatest integer of $X$.
 A: Let's define, for ease of notation, $Z=\lfloor X \rfloor$. 
To get the expectation, let's first find the distribution law of $Z$.
Let $n\in\mathbb{N}_0$. Then $P(Z=n)=P(n\leq X < n+1)=\int_{n}^{n+1}\frac{1}{2}e^{-x}dx=\frac{e-1}{2e^{n+1}}$.
Because of the symmetry of the function $\frac{1}{2}e^{-|x|}$ around $0$, we have that $P(Z=-n-1)=P(-n-1\leq X<-n)=P(n\leq X < n+1)=P(Z=n)$.
Now we can simply calculate the expectation:
\begin{align}
E(Z) &= \sum\limits_{k=-\infty}^{+\infty}kP(Z=k)\\
&=\sum\limits_{n=0}^{+\infty}nP(Z=n)+\sum\limits_{k=-\infty}^{-1}kP(Z=k)\\
&=\sum\limits_{n=0}^{+\infty}nP(Z=n)+\sum\limits_{n=0}^{+\infty}(-n-1)P(Z=-n-1)\\
&= \sum\limits_{n=0}^{+\infty}nP(Z=n)+\sum\limits_{n=0}^{+\infty}(-n-1)P(Z=n)\\
&= -\sum\limits_{n=0}^{+\infty}\frac{e-1}{2e^{n+1}} = \frac{1-e}{2e}\cdot\frac{1}{1-\frac{1}{e}}\\
&=-\frac{1}{2}
\end{align}
A: In fact the answer is $- 1/2$ for any density function which is symmetric about zero, and has finite expectation.  The point is that 
$\lfloor x \rfloor + \lfloor -x \rfloor = -1$ for every non-integer $x$.
So $E \lfloor X \rfloor + E \lfloor -X \rfloor = -1$ given finite expectation, and then (given symmetry) $E \lfloor -X \rfloor = E \lfloor X \rfloor $.
