[Math] Expected Value of Greatest Integer Random Variable

expectationprobabilityreal-analysis

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

Best Answer

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}

Related Question