Finding E(Y) and Var(Y) given exponentially distributed random variable Let X∈Exp(λ). For positive integer n, define Y:=n if X∈(n,n+1]. I am asked to find E(Y) and Var(Y).
I know how to compute expected value and variance for "common" variables like Y=1/X, etc. But I don't know where to begin for this problem. Any ideas?
 A: As Ian noted in the comments, $$\mathbb{P}(Y=n)=\mathbb{P}(n<X\le n+1)=\int_n^{n+1} \lambda e^{-\lambda t} \, \mathrm{d} t=\frac{e^{-\lambda n}-e^{-\lambda (n+1)}}{\lambda}$$
Now plug this into the formula for the expected value to get
$$\mathbb{E} [Y]=\frac{ 1}{\lambda} \sum_{n=1}^{\infty} n(e^{-\lambda n}-e^{-\lambda (n+1)})$$
Which can now be solved by expanding, factoring and noting the derivative of the geometric series with $e^{-\lambda}$, likewise for the variance.
A: As Ian noted, just find $\mathsf E(Y)$ and $\mathsf E(Y^2)-\mathsf E(Y)^2$ using : $$\begin{align}\mathsf E(Y^k) ~&=~\sum_{n=0}^\infty n^k~\mathsf P(Y=n)\\[1ex] &=~ \sum_{n=0}^\infty n^k~\mathsf P(n< X\leqslant n+1)\end{align}$$
A: Several people have mentioned that
$$
\Pr(Y=n) = \Pr(n<X\le n+1) = \int_n^{n+1} e^{-\lambda x} (\lambda\,dx) 
$$
and Guacho Perez mentioned that this is
$$
\frac{e^{-\lambda n}-e^{-\lambda (n+1)}}\lambda.
$$
I will take this a step further and note that this is
$$
\Big(e^{-\lambda}\Big)^n \cdot \frac{1 - e^{-\lambda}} \lambda = \Big(q^n\times (\text{a factor not depending on } n)\Big).
$$
This means you have a geometric distribution on the set $\{0,1,2,3,\ldots\}.$ Do you know the mean and variance of that?
