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

  • $\begingroup$ @Chinny84 greatest integer command is not working properly here. So, I just denote by some other notation but I have defined this notation. $\endgroup$ Jan 27, 2017 at 17:37
  • 1
    $\begingroup$ how far have you got? could you work out the expected value without the greatest integer part, using integration? $\endgroup$
    – Cato
    Jan 27, 2017 at 17:44
  • $\begingroup$ 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 $\endgroup$
    – Cato
    Jan 27, 2017 at 17:56
  • $\begingroup$ @Cato could you please elaborate it? $\endgroup$ Jan 27, 2017 at 18:02

2 Answers 2


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}


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


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.