$X$ and $Y$ are independent Poisson$(\lambda)$, $\lambda\sim\mathrm{exp}(\theta)$. What is the conditional distribution for $X$ given that $X+Y=n$? To clarify, the parameter $\lambda$ is a random variable with exponential distribution and parameter $\theta$. Can someone please tell me if I've correctly computed the conditional distribution for $X$ given $X+Y=n$. Thanks!
$$\begin{align*}
P\{X=k\} &= \int_0^\infty e^{\lambda}\frac{\lambda^{k}}{k!} \theta e^{-\theta\lambda} \, d\lambda \\
&=\frac{\theta}{k!}\int_0^\infty \lambda^{k} e^{-(1+\theta)\lambda} \, d\lambda \\
&=\frac{\theta}{k!(1+\theta)^{k+1}}\int_0^\infty u^k e^{-u} \, du\\
&=\frac{\theta}{(1+\theta)^{k+1}}  \text{ for } k = 0, 1, \ldots \\
\end{align*} 
$$
Then $$P\{Y=\ell\} =\frac{\theta}{(1+\theta)^{\ell+1}} \text{ for } \ell = 0, 1, \ldots$$
Therefore, 
$$\begin{align*}
 P\{X=k\mid X+Y=n\} &= P\{X=k\mid Y=n-k\} \\
&=\frac{\theta}{(1+\theta)^{k+1}}\frac{\theta}{(1+\theta)^{n-k+1}} \\
&=\frac{\theta^{2}}{(1+\theta)^{n+2}}
\end{align*}
$$
 A: $\newcommand{\E}{\operatorname{E}}$I will denote the random variable by capital $\Lambda$ and the variable in the integral by lower-case $\lambda$. I take $X$ and $Y$ to be conditionally independent given $\Lambda$, so conditional on $\Lambda$, $X+Y\sim\mathrm{Poisson}(2\lambda)$.  Then we have
\begin{align}
\Pr(X+Y=n) & = \E(\Pr(X+Y=n\mid\Lambda)) = \E\left( \frac{(2\Lambda)^n e^{-2\Lambda}}{n!} \right) \\[10pt]
& = \int_0^\infty \frac{(2\lambda)^n e^{-2\lambda}}{n!} e^{-\theta\lambda} (\theta\,d\lambda) = \text{etc.} \tag 1
\end{align}
By a similar method find $\Pr(X=k\ \&\ Y=n-k)$, but don't write that as $\Pr(X=k)\cdot\Pr(Y=n-k)$ since $X$ and $Y$ are not marginally independent but only conditionally independent.  In other words, you're looking for
\begin{align}
& \Pr(X=k\ \&\ Y=n-k) = \E(\Pr(X=k\ \&\ Y=n-k\mid \Lambda)) \\[10pt]
= {} & \E(\Pr(X=k\mid \Lambda)\Pr(Y=n-k\mid \Lambda)) \\[10pt]
= {} & \int_0^\infty \frac{\lambda^k e^{-\lambda}}{k!} \cdot \frac{\lambda^{n-k} e^{-\lambda}}{(n-k)!} e^{-\theta\lambda} (\theta\,d\lambda). \tag 2
\end{align}
Later postscript: Just for fun, let's see what this comes to.  From $(2)$, we get
\begin{align}
& \frac \theta {k!(n-k)!} \int_0^\infty \lambda^n e^{-(\theta+2)\lambda} \, d\lambda \\[10pt]
= {} & \frac \theta {k!(n-k)!(\theta+2)^{n+1}} \int_0^\infty ((\theta+2)\lambda)^n e^{-(\theta+2)\lambda} ((\theta+2)\, d\lambda) \\[10pt]
= {} & \frac \theta {k!(n-k)!(\theta+2)^{n+1}} \int_0^\infty u^n e^{-u}\,du = \binom n k \frac\theta {(\theta+2)^{n+1}}. \tag 3
\end{align}
From $(1)$, we get
\begin{align}
& \int_0^\infty \frac{(2\lambda)^n e^{-2\lambda}}{n!} e^{-\theta\lambda} (\theta\,d\lambda) = \frac {2^n\theta}{n!} \int_0^\infty \lambda^n e^{-(\theta+2)\lambda} \, d\lambda \\[10pt]
= {} & \frac {2^n\theta}{n!(\theta+2)^{n+1}} \int_0^\infty ((\theta+2)\lambda)^n e^{-(\theta+2)\lambda} ((\theta+2)\,d\lambda) \\[10pt]
= {} &  \frac {2^n\theta}{n!(\theta+2)^{n+1}} \int_0^\infty u^n e^{-u} \, du = \frac{2^n \theta}{(\theta+2)^{n+1}}. \tag 4
\end{align}
Dividing $(3)$ by $(4)$ we get
$$
\binom n k \frac 1 {2^n}.
$$
In other words
$$
\Big( X\mid (x+Y=n) \Big) \sim \mathrm{Binomial}\left(n, \frac 1 2 \right).
$$
Still later postscript: By hindsight I definitely did all this the hard way.  Conditional on $\Lambda$, we have $X,Y\sim\text{independent Poisson}(\Lambda)$. Supposing $X\sim\operatorname{Poisson}(\alpha)$ and $Y\sim\operatorname{Poisson}(\beta)$ and $X,Y$ are independent, then one can show that the conditional distribution of $X$ given $X+Y=n$ is $\operatorname{Binomial}\left(n,\dfrac \alpha {\alpha + \beta}\right)$.  If $\alpha=\beta$, then clearly that means it is $\operatorname{Binomial}\left(n, \dfrac 1 2 \right)$.  So conditional on $\Lambda$ we have a result that does not depend on $\Lambda$; hence it must be the same as the marginal (i.e. "unconditional") distribution.
A: Update: This answer is wrong (I leave it only because I think the error can be instructive) in that it assumes that $X$ and $Y$ are independent, as if the distribution of each one depends on different (independent) parameters (say, $\lambda_X$ , $\lambda_Y$). But this is not what the problem statement imply; rather, it makes more sense to assume that both are driven by a single parameter $\lambda$, and hence they are not independent but only conditionally independent (that is, given the value of $\lambda$). The correct answer, thus, is that of Michael Hardy

The last step looks wrong to me.
$$P\{X=k \mid X+Y=n\}=\frac{P\{X=k \cap X+Y=n\}}{P\{X+Y=n\}}=\frac{P\{X=k \cap Y=n-k\}}{P\{X+Y=n\}}=\frac{P\{X=k\} P\{Y=n-k\}}{P\{X+Y=n\}}$$
Haven't you missed the denominator?
