I am trying to learn from my mistakes, and faced the following problem:

Let $X \sim \exp(2)$ and $Y=\lfloor X \rfloor$, compute $E[Y]$.

Well my false attempt was:

First compute the PDF of Y:

$ F_Y(t)=P(Y\leq t)=P(\lfloor x \rfloor \le X)$ (:I guess the problem is here) $=P(t\leq X\leq t+1)=F_X(t+1)-F_X(t)=(1-e^{-2t-2})-(1-e^{-2t})=e^{-2}e^{-2t}-e^{-2t}$

Then I would like to take the derivative:

$f_y(t)=-2e^{-2}e^{-2t}+2e^{-2t}$ (I always consider the case where $t\geq 0$ )



I can guess that I have made the following wrong assumptions but I will really appreciate to know what exactly is wrong:

Y is obviously discrete, but I computed $F_Y, f_y, E[Y]$ as if it was continous - but I am not completely sure what is wrong with that since I only used X to compute Y, and since X is continuous I though I could do that.

Edit another approach Iv'e tried was to compute that directly:

$E[Y]=\int_{0}^{\infty} \lfloor x \rfloor f_X(x) dx=\sum_{n=0}^{\infty} \int_{n}^{n+1} \lfloor x \rfloor f_X(x) dx$ But now I am not sure what do do, what can I do with that floor function?

  • $\begingroup$ $Y$ is a discrete random variable; no differentiating the cdf. How to find pmf from cdf? And since you are asked for the expectation only, why not find directly $$E\lfloor X\rfloor=\int \lfloor x\rfloor f_X(x)\,dx$$ $\endgroup$ – StubbornAtom Feb 12 at 7:48
  • $\begingroup$ @StubbornAtom hmmm, I am not sure $\endgroup$ – superuser123 Feb 12 at 7:50
  • 3
    $\begingroup$ Compute $P\{Y=n\}$ for each $n$. $\endgroup$ – Kavi Rama Murthy Feb 12 at 7:51
  • $\begingroup$ @StubbornAtom I edited my second attempt $\endgroup$ – superuser123 Feb 12 at 7:58
  • 1
    $\begingroup$ Yes, go ahead. It is straightforward integration and then summation when you consider what is $\lfloor x\rfloor $ when $n\le x<n+1$. $\endgroup$ – StubbornAtom Feb 12 at 7:59

Your Answer

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

Browse other questions tagged or ask your own question.