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$ )
Then:
$E[Y]=-e^{-2}\int_{0}^{\infty}2te^{-2t}+\int_{0}^{\infty}2te^{-2t}=\frac{1}{2}-\frac{1}{2e^{-2}}$
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?