Probability of X given the sum

44 Views Asked by At

I am given that $X \sim P(\lambda)$, $Y \sim P(\gamma)$, and told to calculate the distribution of $P(X | X+Y = n)$

I proceed as follows

$$ \begin{equation} \begin{split} P(X=i|X+Y=n) &= \frac{P((X=i) \cap (X+Y = n))}{P(X+Y = n)} \\ &= \frac{P(X+Y=n | X=i) P(X=i)}{P(X+Y=n)}\\ &= \frac{P(Y=n-i)P(X=i)}{P(X+Y=n)} \end{split} \end{equation}$$

We also know that $X+Y \sim P(\lambda + \gamma)$, thus:

$P(Y=n-i) = \frac{\gamma^{n-i} e^{-\gamma}}{(n-i)!}$

$P(X=i) = \frac{\lambda^i e^{-\lambda}}{i!}$

$P(X+Y=n) = \frac{(\lambda + \gamma)^n e^{\lambda + \gamma}}{n!}$

Hence,

$$ \begin{equation} \begin{split} P(X=i|X+Y = n) &= \frac{\gamma^{n-i} e^{-\gamma}}{(n-i)!} \frac{\lambda^i e^{-\lambda}}{i!} \frac{n!}{(\lambda + \gamma)^n e^{\lambda + \gamma}}\\ &= \binom{n}{k} \frac{\gamma^{n-i} \lambda^i}{(\lambda+\gamma)^n} e^{-2(\lambda + \gamma)}\\ \end{split} \end{equation}$$

However, when I want to check that this indeed does sum to one over the range of the variable (notice that $R_X = \{0, .., n\}$):

$$ \begin{equation} \begin{split} \sum_{i=0}^n \binom{n}{k} \frac{\gamma^{n-i} \lambda^i}{(\lambda+\gamma)^n} e^{-2(\lambda + \gamma)} &= \frac{e^{-2(\lambda + \gamma)}}{(\lambda+\gamma)^n} \sum_{i=0}^n \binom{n}{k} \gamma^{n-i} \lambda^i \\ &=e^{-2(\lambda + \gamma)}\\ \end{split} \end{equation}$$

Its clear that I am doing something wrong, but I'm not sure what.

2

There are 2 best solutions below

0
On BEST ANSWER

You have forgotten minus sign from

$P(X+Y=n) = \frac{(\lambda + \gamma)^n e^{\lambda + \gamma}}{n!}$

It is supposed to be

$P(X+Y=n) = \frac{(\lambda + \gamma)^n e^{-\lambda - \gamma}}{n!}$

Multiply sum with $e^{2(\lambda + \gamma)}$ and sum adds up to one.

0
On

Your error is that the correct PMF for $X+Y$ is $$\Pr[X + Y = n] = e^{-(\lambda + \gamma)} \frac{(\lambda+\gamma)^n}{n!},$$ whereas in your solution you are missing the negative sign. The resulting correction will cause the exponential terms to cancel. The result should be a binomial distribution for a suitable choice of parameters.