# Difference of two discrete random variables

Given two random variables $X$ and $Z$ on non negative integers. Supposing that

• $Z$ is a Poisson distribution of Poisson constant $\lambda$.
• $X\le Z$ and that $\forall n\ge0,\ \forall k\le n,\ P(X=k|Z=n)=\displaystyle \binom nk \cdot p^k (1-p)^{n-k},\ \ 0<p<1.\$

Show that $X$ and $Y=Z-X$ are independent Poisson variables.

I was able to show that $X \sim \mathcal P(\lambda p)$

but for $Y=Z-X$, I found some problems, I tried the following

$$P(Z-X=k)=\sum^{+\infty}_{i=0}P(X=i)\cdot P(Z=k+i)$$ I got an expression that I couldn't sum to infinity and then I remembered that I assumed independence in this approach, now I'm lost and I dunno what to do.

-

A start: One can compute. Multiply the conditional probability $\Pr(X=k|Z=n)$ by $\Pr(z=n)$, which you know, to find the probability that $X=k$ and $Z=n$.

Let $Y=Z-X$. We may want to find the distribution of $Y$. As you were doing, we find an expression for $\Pr(Y=y)$. This is the sum over all $n \ge y$ of the probability that $Z=n$ and $X=n-y$. My calculation gives $$\sum_{n=y}^{\infty} e^{-\lambda} \frac{\lambda^n}{n!} \binom{n}{n-y}p^{n-y}(1-p)^y.$$ This is less fearsome than it looks. Here are some steps to the simplification.

(i) Take the $e^{-\lambda}$ outside the sum, also the $(1-p)^y$.

(ii) Write $\lambda^n$ as $\lambda^y \lambda^{n-y}$, and take the $\lambda^y$ part outside.

(iii) Look at the $\dfrac{1}{n!}\dbinom{n}{n-y}$ part. Express the binomial coefficient in terms of factorials. The $n!$ cancel, which is nice. We are left with $\dfrac{1}{(n-y)!y!}$. Take the $y!$ part outside.

Inside we are left with $\sum_{n=y}^\infty \frac{1}{(n-y)!} (\lambda p)^{n-y}$. This sum is easy to recognize. So now we know the distribution of $Y$. That will help with the independence issue.

It would be more direct to find the joint distribution function of $X$ and $Y$.

-
Thank you very much! – user31280 Dec 8 '12 at 9:58
To get $P(Y=y)$ did you use $P(Z=n \cap X=n-y)=P(X=n-y \cap Z=n) = P(X=n-y|Z=n)P(Z=n)$? – Alex Dec 9 '12 at 3:49
Yes, the conditional probability was given, so that was the natural thing to do. – André Nicolas Dec 9 '12 at 4:13
@AndréNicolas: I wonder if there's some way to do it by using the derived distribution in the first question, $Poisson(p \lambda)$. I keep getting something weird though. – Alex Dec 9 '12 at 6:57

As the last sentence in André's answer suggests, it is easier to find the joint distribution of $X$ and $Y$.

Suppose that we are given that $Z = n$. Then, the conditional distribution of $X$ is given to be $\tt{Binomial}$$(n,p), while the conditional distribution of Y = Z-X = n-X can be deduced to be \tt{Binomial}$$(n,1-p)$. Think of this as $X$ is the number of successes and $Y$ the number of failures on $n$ independent trials, where the probability of success is $p$. Notice also that $X$ and $Y$ are not conditionally independent random variables given that $Z = n$; they are very much dependent random variables since $X+Y=n$. But we do have that for $k, \ell \geq 0$, $$p_{X,Y\mid Z=n}(k,\ell\mid Z=n) = P\{X=k, Y=\ell\mid Z=n\} = \begin{cases} \binom{n}{k}p^k(1-p)^{n-k}, & 0\leq k\leq n, \ell = n-k,\\ \quad \\ 0, & \text{otherwise.}\end{cases}$$ Consequently, the unconditional joint probability mass function can be found via the law of total probability as \begin{align*} p_{X,Y\mid Z=n}(k,\ell) &= \sum_{n=0}^\infty p_{X,Y\mid Z=n}(k,\ell\mid Z=n)P\{Z=n\}\\ &= \binom{k+\ell}{k}p^k(1-p)^{\ell}\cdot \exp(-\lambda)\frac{\lambda^{k+\ell}}{(k+\ell)!}\\ &= \frac{(k+\ell)!}{k!\ell!}(\lambda p)^k(\lambda(1-p))^{\ell}\cdot(\exp(-\lambda p)\exp(-\lambda(1-p))\frac{1}{(k+\ell)!}\\ &= \exp(-\lambda p)\frac{(\lambda p)^k}{k!} \cdot\exp(-\lambda(1-p))\frac{(\lambda(1-p))^{\ell}}{\ell!} \end{align*} where, of course, we have assumed that $k, \ell \geq 0$. The result shows that $X$ and $Y$ are independent random variables; in fact, independent Poisson random variables with parameters $\lambda p$ and $\lambda(1-p)$ respectively.

-
Shouldn't unconditional probability on LHS be just $p_{X,Y}(k,l)$? – Alex Dec 9 '12 at 7:31