1.3 Sums of independent binomial variables

Let \(X \sim B(n, p)\) and \(Y \sim B(m, p)\) be independent, with the same success probability \(p\), and let \(Z = X + Y\). Then \begin {align*} P(Z = z) &= P(X + Y = z) = \sum _{x=0}^zP(X = x, Y = z - x) \\ &= \sum _{x=0}^zP(X = x)P(Y = z - x) \\ &= \sum _{x=0}^z\binom nxp^x(1 - p)^{n-x}\binom m{z-x}p^{z-x}(1 - p)^{m-z+x} \\ &= p^z(1 - p)^{n+m-z}\sum _{x=0}^z\binom nx\binom m{z-x} \\ &= \binom {n+m}zp^z(1 - p)^{n+m-z} , \end {align*}

using Vandermonde’s identity \(\sum _x\binom nx\binom m{z-x} = \binom {n+m}z\). Thus \(Z \sim B(n + m, p)\): \(n + m\) independent trials with the same success probability.

Conditional distribution given the sum

Example 1.3.1. If \(X\) and \(Y\) are independent Poisson variables with means \(\mu _1\) and \(\mu _2\), find the conditional distribution of \(Y\) given \(X + Y = K\).

Solution. For \(y = 0, 1, \dots , K\), \begin {align*} P(Y = y \mid X + Y = K) &= \frac {P(Y = y, X + Y = K)}{P(X + Y = K)} \\ &= \frac {P(Y = y)P(X = K - y)}{P(X + Y = K)} \\ &= \frac {\mu _2^ye^{-\mu _2}}{y!}\cdot \frac {\mu _1^{K-y}e^{-\mu _1}}{(K - y)!} \\ &\qquad \times \frac {K!}{(\mu _1 + \mu _2)^Ke^{-(\mu _1+\mu _2)}} \\ &= \frac {K!}{y!\,(K - y)!}\cdot \frac {\mu _2^y\mu _1^{K-y}}{(\mu _1 + \mu _2)^K} \\ &= \binom Ky\Bigl (\frac {\mu _2}{\mu _1 + \mu _2}\Bigr )^y\Bigl (\frac {\mu _1}{\mu _1 + \mu _2}\Bigr )^{K-y} . \end {align*}

So, given \(X + Y = K\), \(Y \sim B(K, p)\) with \(p = \mu _2/(\mu _1 + \mu _2)\): each of the \(K\) events comes from \(Y\) with probability proportional to its mean.

Example 1.3.2. Let \(X\) and \(Y\) be independent binomial random variables with parameters \((n, p)\) and \((m, p)\). Find the conditional distribution of \(X\) given \(X + Y = K\).

Solution. Using \(X + Y \sim B(n + m, p)\), \begin {align*} P(X = x \mid X + Y = K) &= \frac {P(X = x, Y = K - x)}{P(X + Y = K)} \\ &= \frac {P(X = x)P(Y = K - x)}{\binom {n+m}Kp^K(1 - p)^{n+m-K}} \\ &= \frac {\binom nxp^x(1 - p)^{n-x}\,\binom m{K-x}p^{K-x}(1 - p)^{m-K+x}}{\binom {n+m}Kp^K(1 - p)^{n+m-K}} \\ &= \frac {\binom nx\binom m{K-x}}{\binom {n+m}K} , \qquad x = 0, 1, \dots , \min (K, n) . \end {align*}

With \(N = n + m\) this is \[ P(X = x \mid X + Y = K) = \frac {\binom nx\binom {N-n}{K-x}}{\binom NK} , \] the hypergeometric distribution. Remarkably, \(p\) has disappeared: given the total number of successes, how they are shared between the two groups does not depend on the success probability.

Questions on this section

Stuck on something here? Ask below and it stays attached to this topic.