Variables defined as floor and fraction part from exponentially distributed random variable Random variable $X$ has exponential distribution with parameter $\lambda>0$. Let $T=\lfloor X\rfloor $, $R=\{X\}$ where $\lfloor x\rfloor$ is floor from number $x\in\mathbb{R}$ and $\{x\}$ is it's fraction part. What is the distribution and expected value of $T$ and $R$?
I tried doing that the following way:
$$\mathbb{P}(T=k)=\mathbb{P}(X\in[k,k+1))=\int_k^{k+1}\lambda e^{-\lambda x}=-e^{-\lambda x}\Big|_k^{k+1}=\frac{e^{\lambda}-1}{e^{\lambda +k}}$$ so $$\mathbb{E}T=\sum_{k=0}^{\infty}\frac{k(e^{\lambda}-1)}{e^{\lambda +k}}=\frac{e^{\lambda}-1}{e^{\lambda}}\sum_{k=0}^{\infty}\frac{k}{e^{\lambda k}}=\frac{e^{\lambda}-1}{e^{\lambda}}\frac{e^{\lambda}}{(e^{\lambda}-1)^2}$$
I took the last equality from Wolfram, yet I'm unsure of it's origins. Where does it come from? Secondly, I'm clueless about $R$ distribution. Could you help?
 A: Since the pdf of $X$ is $\lambda e^{-\lambda x}\mathbb{1}_{x\geq 0}$ we have:
$$\forall m\in\mathbb{N},\quad\mathbb{P}[\lfloor X\rfloor\leq m]=\int_{0}^{m+1}\lambda e^{-\lambda x}\,dx = 1-e^{-\lambda(m+1)}$$
hence the pdf of $\lfloor X \rfloor$ is $(e^{\lambda}-1)e^{-\lambda(m+1)}\mathbb{1}_{m\in\mathbb{N}}$ and:
$$\mathbb{E}[\lfloor X\rfloor]=(e^{\lambda}-1)\sum_{m=0}^{+\infty} m e^{-\lambda(m+1)}=\frac{1}{e^\lambda-1}$$
since for any $-1<y<1$:
$$\sum_{m=0}^{+\infty} m y^m = y\cdot\frac{d}{dy}\sum_{m=1}^{+\infty}y^m=\frac{y}{(1-y)^2}.$$
For the second part, we have:
$$\forall t\in(0,1),\qquad \mathbb{P}[\{X\}\leq t]=\sum_{n\in\mathbb{N}}\int_{n}^{n+t}\lambda e^{-\lambda x}dx = (1-e^{-\lambda t})\sum_{n\in\mathbb{N}}e^{-\lambda n}=\frac{1-e^{-\lambda t}}{1-e^{-\lambda}}$$
hence the pdf of $\{X\}$ is $\frac{\lambda}{1-e^{-\lambda}}e^{-\lambda x}\mathbb{1}_{x\in(0,1)}$. By the linearity of $\mathbb{E}$,
$$\mathbb{E}[\{X\}]=\mathbb{E}[X]-\mathbb{E}[\lfloor X\rfloor] = \frac{1}{\lambda}-\frac{1}{e^{\lambda}-1}.$$
A: To calculate the expected value, you can also notice that the floor function follows a geometric distribution (number of failures before the first success) with parameter p=1-exp{-lambda}.
