Conditional expectation of Poisson r.v. $X$ given $X$ is even? We have a random variable $X$ that is poisson distributed with $\lambda$.
We wish to show:
$$E[X\mid X \text{ is even}]=\lambda \frac{1-e^{-2\lambda}}{1+e^{-2\lambda}}$$
So far, I have that 


*

*$P(X \text{ is even})=\frac{1+e^{-2\lambda}}{2}$

*$P(X\text{ is odd})=\frac{1-e^{-2\lambda}}{2}$ and that 

*$E[X]=\lambda$ for the Poisson distribution.


I am struggling because I'm not completely sure how these pieces fit together. Conditional expectation is still a little fuzzy to me. Any hints/solutions are appreciated. 
 A: Treat $X\mid X \text{ is even}$ as a random variable. What is its pmf? $$P(X=k\mid X \text{ is even})=0$$ if $k$ is odd (obviously) and for $k$ even $$P(X=k \mid X\text{ is even})=\frac{P(X=k, X \text{ is even})}{P(X \text{ is even})}=\frac{P(X=k)}{P(X \text{ is even})}=\frac{2e^{-λ}λ^k}{k!(1+e^{-2λ})}$$ So 
\begin{align}E[X \mid X \text{ is even}]&=\sum_{k=0}^{+\infty}kP(X=k \mid X \text{ is even})=\sum_{k\text{ is even}}^{+\infty}k\frac{2e^{-λ}λ^k}{k!(1+e^{-2λ})}\\[0.2cm]&=\frac{2}{1+e^{-2λ}}\sum_{k\text{ is even}}^{+\infty}\frac{e^{-λ}λ^k}{(k-1)!}\\[0.2cm]&=\frac{2λ}{1+e^{-2λ}}\sum_{k\text{ is even}}^{+\infty}\frac{e^{-λ}λ^{k-1}}{(k-1)!}\\[0.2cm]&=\frac{2λ}{1+e^{-2λ}}\sum_{k\text{ is odd}}^{+\infty}\frac{e^{-λ}λ^{k}}{k!}=\frac{2λ}{1+e^{-2λ}}\cdot P(X \text{ is odd})\\[0.2cm]&=\frac{2λ}{1+e^{-2λ}}\cdot \frac{1-e^{-2λ}}{2}=λ\frac{1-e^{-2λ}}{1+e^{-2λ}}\end{align}
A: You know that
$$
\mathbb{E}[ X \mid X \text{ even} ] = \sum_{n=0}^\infty n \cdot \Pr[ X=n \mid X \text{ even} ]
= \sum_{n=0}^\infty 2n \cdot \Pr[ X=2n \mid X \text{ even} ]
$$
(as $\Pr[ X=2n+1 \mid X \text{ even} ] = 0$, only the even integers have non-zero contribution).
Now, $\Pr[ X=2n \mid X \text{ even} ] = \frac{\Pr[ X=2n \text{ and } X \text{ even} ] }{\Pr[ X \text{ even} ] }= \frac{\Pr[ X=2n ] }{\Pr[ X \text{ even} ] }$. Can you conclude?
In more detail: (place your mouse over the gray area to reveal its contents)
Using your computation,

$$\begin{align}\Pr[ X=2n \mid X \text{ even} ] = \frac{2}{1+e^{-2\lambda}}\Pr[ X=2n ] = \frac{2e^{-\lambda}}{1+e^{-2\lambda}}\cdot\frac{\lambda^{2n}}{(2n)!}\end{align}$$

so

$$\begin{align}\mathbb{E}[ X \mid X \text{ even} ] &=  \frac{2e^{-\lambda}}{1+e^{-2\lambda}}\sum_{n=0}^\infty 2n\frac{\lambda^{2n}}{(2n)!}= \frac{2\lambda e^{-\lambda}}{1+e^{-2\lambda}}\sum_{n=1}^\infty\frac{\lambda^{2n-1}}{(2n-1)!} \\&= \frac{2\lambda e^{-\lambda}}{1+e^{-2\lambda}}\sum_{n=0}^\infty\frac{\lambda^{2n+1}}{(2n+1)!} = \frac{2\lambda e^{-\lambda}}{1+e^{-2\lambda}}\sinh \lambda.\end{align}$$

where $\sinh$ is the hyperbolic sine function.
Finally:

 To conclude and get the expression you are looking for, recall that $\sinh \lambda = \frac{e^\lambda-e^{-\lambda}}{2}$, so that $\frac{2\lambda e^{-\lambda}}{1+e^{-2\lambda}}\sinh \lambda = \frac{2\lambda}{1+e^{-2\lambda}}\frac{1-e^{-2\lambda}}{2} = \lambda\frac{1-e^{-2\lambda}}{1+e^{-2\lambda}}$.

