I want to find what is $\mathbb{E}(X|Y)$, where X follows Exp(1) and $Y:=\left \lfloor X \right \rfloor$.
My idea:
- First, $\mathbb{P}(Y=n)=\mathbb{P}(X \in [n,(n+1)))=\int_{n}^{n+1}e^{-x}dx=e^{-n}(1-1/e).$
- Second, $f_{X}(x|Y=n)=\frac{f_{X,Y}(x,n)}{\mathbb{P}(Y=n)}=\frac{e^{-x}\mathbb{1}_{[X \in n,(n+1))}}{e^{-n}(1-1/e)}$.
$$\mathbb{E}(X|Y)=\int_{0}^{\infty}xf_{X}(x|Y=n)dx=e^{n}(\frac{e}{e-1})\int_{n}^{n+1}xe^{-x}dx=e^{n}(\frac{e}{e-1})[e^{-n}(-n-2)-e^{-n}(-n-1)]$$
Then, of course, something would simplify but I just to be sure that what I have done is correct.
$$\int_n^{n+1}xe^{-x}dx=\left[-e^{-x}(1+x)\right]^{n+1}_n=e^{-n}(n+1)-e^{-n-1}(n+2)$$ Further is looks okay to me except that LHS is not $\mathbb E(X\mid Y)$ but $\mathbb E(X\mid Y=n)$ .