# Expected Value of Greatest Integer Random Variable

Let $X$ be a random variable with probability density function $$f(x)=\frac{1}{2} e^{-|x|},\;\; -\infty<x<\infty.$$ What is expected value of $\lfloor X \rfloor$, i.e. $$E( \lfloor X \rfloor),$$ where $\lfloor X \rfloor$ denotes the greatest integer of $X$.

• @Chinny84 greatest integer command is not working properly here. So, I just denote by some other notation but I have defined this notation. Jan 27, 2017 at 17:37
• how far have you got? could you work out the expected value without the greatest integer part, using integration?
– Cato
Jan 27, 2017 at 17:44
• find prob of greatest integer being n, then do infinite summation of nP(N = n) to get average - the summation is different for n<0 and n>=0
– Cato
Jan 27, 2017 at 17:56
• @Cato could you please elaborate it? Jan 27, 2017 at 18:02

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)$.
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$.