Finding conditional distribution X|X+Y

71 Views Asked by At

I have a (I think quite simple) question, but I have some problems in understanding this topic (in general) so I hope you can help me!

The problem is about conditional probability. Let be $X~B_{n,p}$ and $Y~B_{m,p}$. I need to calculate the conditional distribution $X|X+Y$.

First of all I calculated $X+Y$ out of $X = \binom{n}{k} p^k(1-p)^{n-k}$ and $Y=\binom{m}{k}p^k(1-p)^{m-k}$. My result was $X+Y = \binom{n+m}{k}p^k(1-p)^{n+m-k}$

But now I don't know how to get the distribution $X|X+Y$, which is originally asked for.

I would be very glad if some of you can help me understanding this topic!

Thank you very much!

2

There are 2 best solutions below

0
On

Assume that $X$ and $Y$ are independent, then we have

$P(X=k_1)=\binom{n}{k_1} p^{k_1}(1-p)^{n-k_1}$, denoted as $P_{X}(k_1)$

$P(Y=k_2)=\binom{m}{k_2} p^{k_2}(1-p)^{m-k_2}$, denoted as $P_{Y}(k_2)$

Then \begin{equation} \begin{aligned} P(X=x|X+Y=z) &= \frac{P(X=x,X+Y=z)}{P(X+Y=z)}\\ &=\frac{P(X=x,Y=z-x)}{P(X+Y=z)}\\ &=\frac{P(X=x)P(Y=z-x)}{P(X+Y=z)}\\ &=\frac{P_X{(x)} P_Y(z-x)}{P(X+Y=z)} \end{aligned} \end{equation}

Now, we turn to calculate $P(X+Y=z)$, which is \begin{equation} \begin{aligned} P(X+Y=z)= \sum_{t=0}^{z} P_{X}(t)P_{Y}(z-t). \end{aligned} \end{equation}

The final result can be obtained.

0
On

It is direct that:$$P(X=r\mid X+Y=k)=\frac{\binom{n}{r}\binom{m}{k-r}}{\binom{n+m}{k}}$$

You can think of it like this: there are $n+m$ independent events that can succeed or fail and they have equal probability to succeed.

We number the experiments: $1,2,\dots,n+m$.

Now the actual question is: if there are exactly $k$ successes in total then what is the probability that exactly $r$ of them occurred by the first $n$ events?

So this can be calculated with hypergeometric distribution (as done in $(1)$).