Find probability and expectation of conditional Poisson random variables We are given $$X \sim \operatorname{Pois}(2),Y \sim \operatorname{Pois}(3),X⊥Y,T=X+Y$$
I am asked to find $$P(X=k│T=n)  ∀k,n;E(X│T),σ(X│T)$$
Getting $$E(X|T), \sigma(X│T)$$ is fairly straightforwad for me, once I have $$P(X=k|T=n)$$ (just integrate over all values of k and n according to the definitions of expectation and variance).
This is what I have so far:
Note that $$P(X=k|T=n) = P(X=k|X+Y=n) = P(X=k|Y=n-X) = \frac{P(X=k,Y=n-X)}{P(Y=n-X)}
= \frac{P(X=k)}{P(Y=n-X)}$$
since X and Y are independent.
Also, $$P(X=k)=\frac{\lambda^ke^{-\lambda}}{k!}=\frac{2^ke^{-2}}{k!}$$
To get $$P(Y=n-X)$$ what I did was
$$P(Y=n-X) = \int_{-\infty}^{\infty}P(Y=n-X|X=k)P(X=k)dk =
\int_{-\infty}^{\infty}\frac{3^{n-k}e^{-3}}{(n-k)!}\frac{2^ke^{-2}}{k!}dk $$
I am not sure how to proceed...
 A: You can't integrate; rather, you must sum, because $X$, $Y$, and $T$ are Poisson and therefore discrete.
You also have a problem with your work.  It should read:
$$\begin{align}
\Pr[X = k \mid T = n] 
&= \frac{\Pr[(X = k) \cap (T = n)]}{\Pr[T = n]} \\
&= \frac{\Pr[(X = k) \cap (X+Y = n)]}{\Pr[T = n]} \\
&= \frac{\Pr[(X = k) \cap (Y = n-k)]}{\Pr[X + Y = n]} \\
&= \frac{\Pr[X = k]\Pr[Y = n-k]}{\Pr[X + Y = n]}.
\end{align}$$
The last equality holds because $X$ and $Y$ are independent.  You cannot write something like $\Pr[X = k \mid Y = n - X]$ because the given condition $Y = n-X$ is a function of the same random variable $X$ on which the conditional probability is calculated.  Such an expression does not make any sense.
Then what you need to write for the denominator is, for instance,
$$\begin{align}
\Pr[X + Y = n] &= \sum_{y = 0}^n \Pr[X + Y = n \mid Y = y]\Pr[Y = y] 
\\
&= \sum_{y = 0}^n \Pr[X = n-y \mid Y = y]\Pr[Y = y] \\
&= \sum_{y = 0}^n \Pr[X = n-y] \Pr[Y = y], \end{align}$$ where the last equality holds because again, $X$ and $Y$ are independent.  Here I have applied the law of total probability by conditioning on the outcomes of $Y$; but you can also condition on $X$:  $$\Pr[X + Y = n] = \sum_{x=0}^n \Pr[Y = n-x]\Pr[X = x].$$
In either case, the resulting sum has the same value:  $$\Pr[X + Y = n] = \sum_{y=0}^n e^{-2} \frac{2^{n-y}}{(n-y)!} e^{-3} \frac{3^y}{y!} = e^{-5} \sum_{y=0}^n \frac{1}{y!(n-y)!} 3^y 2^{n-y}$$ and to evaluate this sum, we observe that $$\binom{n}{y} = \frac{n!}{y!(n-y)!}$$ and use the binomial theorem.
