Let $X_1 \sim B_{n,p}$ and $X_2 \sim B_{m,p}$ be binomially distributed and independent.
How can I determine $P(X_1=k|X_1+X_2=j)$?
Let $X_1 \sim B_{n,p}$ and $X_2 \sim B_{m,p}$ be binomially distributed and independent.
How can I determine $P(X_1=k|X_1+X_2=j)$?
Copyright © 2021 JogjaFile Inc.
If $j < k$, clearly that probability is zero. Otherwise, by definition of conditional probabilities:
$$\mathbb P[X_1 = k | X_1 + X_2 = j] = \frac {\mathbb P[X_1 = k \text{ and } X_1+X_2 = j]}{\mathbb P[X_1+X_2=j]}.$$
You assume the random variables to be independent, so:
$$\mathbb P[X_1 = k \text{ and } X_1+X_2 = j] = \mathbb P[X_1=k]\mathbb P[X_2=j-k] = \binom nkp^k(1-p)^{n-k} \times \binom m{j-k}p^{j-k}(1-p)^{m-(j-k)} = \binom nk\binom m{j-k}p^j(1-p)^{m+n-j}.$$
Also, about the distribution of the sum $X_1+X_2$, you can use the fact that the sum of two binomial random variables $B_{n,p}$ and $B_{m,p}$ is a binomial $B_{m+n,p}$ (note that it is required that the probability $p$ is the same for both variables). To convince yourself that this is true:
$$\mathbb P[X_1+X_2 = j] = \sum_{\ell=0}^j\mathbb P[X_1 = \ell \text{ and } X_2 = j-\ell].$$
Again, by independence:
$$\begin{aligned}\mathbb P[X_1+X_2 = j] &= \sum_{\ell=0}^j\mathbb P[X_1 = \ell]\mathbb P[X_2 = j-\ell] = \sum_{\ell = 0}^j\binom n\ell p^\ell(1-p)^{n-\ell}\binom m{j-\ell}p^{j-\ell}(1-p)^{m-(j-\ell)} \\ &= \left(\sum_{\ell = 0}^j\binom n\ell\binom m{j-\ell}\right)p^j(1-p)^{m+n-j} = \binom {m+n}jp^j(1-p)^{m+n-j}. \end{aligned}$$
Just put all of this together:
$$\mathbb P[X_1 = k | X_1 + X_2 = j] = \frac {\binom nk\binom m{j-k}p^j(1-p)^{m+n-j}}{\binom {m+n}jp^j(1-p)^{m+n-j}} = \frac {\binom nk\binom m{j-k}}{\binom {m+n}j}$$