Tutorials › Statistical Theory I - Probability and Distribution Theory › Binomial Counts Given Their Total

Conditional Distribution Theory · Tutorial 263 of 994

Binomial Counts Given Their Total

See how fixing a total changes the distribution of counts across groups or categories, and work out the resulting conditional probabilities.

Intermediate 10 min read

What You'll Learn

  • Derive the conditional allocation of equal-probability binomial counts given their sum
  • Identify the hypergeometric distribution and its feasible support
  • Calculate conditional probabilities for specified count configurations
  • Derive the conditional multinomial law for categories within a fixed aggregate
  • Distinguish equal-probability allocations from allocations with group-specific probabilities
  • Check that the conditioning event has positive probability and that conditional probabilities normalize

Why Fixing a Total Changes the Question

Suppose several groups each contribute a count of successes. If the total number of successes is known, the question is no longer how many successes occur overall; it is how those successes are allocated among the groups. This conditional allocation has a simple form when all trials share the same success probability. In multinomial sampling, a related principle describes how a known total in a collection of categories is split among those categories.

The key is to specify what is being conditioned on. A total of independent binomial counts with a common success probability leads to a hypergeometric allocation. A total within a subset of categories in a multinomial sample leads to a conditional multinomial distribution. If binomial groups have different success probabilities, the allocation generally is not hypergeometric.

Definition: Let \(X_1,\ldots,X_k\) be counts and let \(T=\sum_{j=1}^k X_j\). A conditional allocation law specifies the probabilities of feasible vectors \((x_1,\ldots,x_k)\) given \(T=m\). It is defined only when \(P(T=m)>0\), and its support consists of vectors satisfying both the individual count constraints and \(\sum_{j=1}^k x_j=m\).

Equal-Probability Binomial Counts

Let \(X_j\sim\operatorname{Bin}(n_j,p)\), independently, for \(j=1,\ldots,k\), with \(0<p<1\). Write \(N=\sum_{j=1}^k n_j\) and \(T=\sum_{j=1}^k X_j\). The total \(T\) has a binomial distribution with parameters \(N\) and \(p\); for every integer \(m\) from 0 to \(N\), \(P(T=m)>0\). Given that total, every set of \(m\) successful trial positions among the \(N\) positions is equally likely. Consequently, the group counts have a multivariate hypergeometric allocation law.

Theorem: Under the assumptions above, for integers \(x_j\) satisfying \(0\leq x_j\leq n_j\) and \(\sum_{j=1}^k x_j=m\), $$ P(X_1=x_1,\ldots,X_k=x_k\mid T=m) = \frac{\prod_{j=1}^k {n_j\choose x_j}}{{N\choose m}}. $$ For any vector outside these constraints, the conditional probability is zero.

To prove the formula, independence gives the joint probability of a feasible vector:

$$ P(X_1=x_1,\ldots,X_k=x_k) = \prod_{j=1}^k {n_j\choose x_j}p^{x_j}(1-p)^{n_j-x_j} = \left(\prod_{j=1}^k {n_j\choose x_j}\right)p^m(1-p)^{N-m}. $$

The sum \(T\) is binomial with parameters \(N,p\), so \(P(T=m)={N\choose m}p^m(1-p)^{N-m}\). Dividing the joint probability by this positive conditioning probability cancels the factors involving \(p\) and gives the stated conditional mass. The conditional probabilities sum to one: the identity \(\sum_{\sum_j x_j=m}\prod_j {n_j\choose x_j}={N\choose m}\) counts the ways to choose \(m\) positions from \(N\) positions, first by the number chosen from each group and then without distinguishing groups. This proves the formula and its normalization. \(\square\)

For two groups, \(X_1\mid(T=m)\) therefore has a hypergeometric distribution: \(m\) successes are allocated among \(N\) positions, of which \(n_1\) belong to group 1. Its feasible values are \(\max(0,m-n_2)\leq x_1\leq\min(n_1,m)\). Once \(x_1\) is known, the second count must be \(m-x_1\).

Worked Example: A Common Success Probability

Suppose \(X_1\sim\operatorname{Bin}(4,0.3)\) and \(X_2\sim\operatorname{Bin}(3,0.3)\) independently. Given that there are exactly 3 successes altogether, find the probability that group 1 has exactly 2.

Here \(N=4+3=7\) and \(m=3\). If group 1 has 2 successes, group 2 must have \(3-2=1\). This is feasible, and the conditional probability is

$$ P(X_1=2,X_2=1\mid X_1+X_2=3) = \frac{{4\choose2}{3\choose1}}{{7\choose3}} = \frac{6\cdot3}{35} = \frac{18}{35} \approx 0.5143. $$

The denominator counts all ways to choose the 3 successful positions among 7. The numerator counts the ways to choose 2 of the 4 group-1 positions and 1 of the 3 group-2 positions. The original value \(p=0.3\) does not appear because, conditional on the total, every set of 3 successful positions has the same probability.

Counts Within a Multinomial Sample

Now suppose \(N\) independent observations fall into \(K\) categories with probabilities \(\pi_1,\ldots,\pi_K\), where \(\pi_i\geq0\) and \(\sum_{i=1}^K\pi_i=1\). Let \(X_i\) be the count in category \(i\), so the count vector has a multinomial distribution. Choose a nonempty subset \(A\) of categories and define \(T=\sum_{i\in A}X_i\) and \(\pi_A=\sum_{i\in A}\pi_i\).

Theorem: If \(\pi_A>0\) and \(P(T=m)>0\), then, conditional on \(T=m\), the counts in \(A\) have a multinomial distribution with total \(m\) and category probabilities \(\pi_i/\pi_A\), \(i\in A\). In particular, for nonnegative integers \(x_i\) with \(\sum_{i\in A}x_i=m\), $$ P\bigl((X_i=x_i)_{i\in A}\mid T=m\bigr) = \frac{m!}{\prod_{i\in A}x_i!} \prod_{i\in A}\left(\frac{\pi_i}{\pi_A}\right)^{x_i}. $$

For a direct derivation, write \(A^c\) for the remaining categories and \(\pi_{A^c}=1-\pi_A\). When \(0<\pi_A<1\), the multinomial mass of a full count vector factors into the mass for the total \(T\) and the allocation within each part. In particular, summing over the allocations in \(A^c\) gives

$$ P\bigl((X_i=x_i)_{i\in A},T=m\bigr) = \frac{N!}{(N-m)!\prod_{i\in A}x_i!} \pi_{A^c}^{\,N-m}\prod_{i\in A}\pi_i^{x_i}, \qquad \sum_{i\in A}x_i=m. $$

Indeed, the omitted counts in \(A^c\) sum to \(N-m\), and their multinomial probabilities sum to \(\pi_{A^c}^{\,N-m}\) by the multinomial theorem. Also \(T\sim\operatorname{Bin}(N,\pi_A)\), so \(P(T=m)={N\choose m}\pi_A^m\pi_{A^c}^{N-m}\). Dividing yields the displayed conditional mass. If \(\pi_A=1\), then \(T=N\) with probability one; conditional on this total, the same formula holds with category probabilities \(\pi_i\) for \(i\in A\), since \(\pi_A=1\). If \(\pi_A=0\), only \(T=0\) can occur, and the conditional allocation for \(m=0\) is degenerate at all counts zero; conditioning on any other \(m\) is not defined. These cases make explicit the positive-probability requirement. \(\square\)

Worked Example: Splitting a Fixed Multinomial Total

In each of 10 trials, an observation falls in category 1 with probability \(0.2\), category 2 with probability \(0.3\), or category 3 with probability \(0.5\). Given that exactly 4 observations fall in categories 1 or 2, find the probability that exactly 1 is in category 1.

Within the subset \(\{1,2\}\), the total probability is \(0.2+0.3=0.5\). Conditional on falling in that subset, an observation is in category 1 with probability \(0.2/0.5=2/5\), and in category 2 with probability \(0.3/0.5=3/5\). Thus the conditional count in category 1 is binomial with parameters 4 and \(2/5\):

$$ P(X_1=1\mid X_1+X_2=4) = {4\choose1}\left(\frac25\right)\left(\frac35\right)^3 = 4\cdot\frac25\cdot\frac{27}{125} = \frac{216}{625} = 0.3456. $$

The four observations in the specified subset are allocated between categories 1 and 2. The other six observations are in category 3, and their allocation does not alter the conditional split within the subset.

When Group Probabilities Differ

The cancellation that produced the hypergeometric law depended on a common success probability. If independent binomial counts have different probabilities, conditioning on their total still gives a valid allocation law, but it generally has unequal weights. Assume \(X_j\sim\operatorname{Bin}(n_j,p_j)\) independently, with \(0<p_j<1\) for every \(j\). For a feasible vector with total \(m\), its joint mass is proportional, as a function of the allocation, to \(\prod_j {n_j\choose x_j}(p_j/(1-p_j))^{x_j}\). More precisely, its conditional mass is that expression divided by the sum of the expression over all feasible vectors with total \(m\). The denominator is positive because the assumptions make every feasible vector have positive joint probability. If some \(p_j\) is 0 or 1, the corresponding count is forced to 0 or \(n_j\); those fixed counts must be handled separately, and conditioning remains meaningful only if the specified total has positive probability.

Worked Example: Unequal Group Probabilities

Let \(X_1\sim\operatorname{Bin}(2,0.8)\) and \(X_2\sim\operatorname{Bin}(1,0.2)\) independently. Given \(X_1+X_2=1\), find the probability that the single success is in group 1.

There are exactly two possible allocations: \((X_1,X_2)=(1,0)\) and \((0,1)\). For the first, the joint probability includes both one success in group 1 and no success in group 2:

$$ P(X_1=1,X_2=0) = \left[{2\choose1}(0.8)(0.2)\right](1-0.2) = 0.32\cdot0.8 = 0.256. $$

For the second allocation, group 1 must have no successes, which has probability \((1-0.8)^2=0.04\), and group 2 must have its one success, with probability \(0.2\). Hence

$$ P(X_1=0,X_2=1) = (1-0.8)^2(0.2) = 0.04\cdot0.2 = 0.008. $$

These are the only allocations consistent with a total of 1, so \(P(X_1+X_2=1)=0.256+0.008=0.264\). Therefore

$$ P(X_1=1\mid X_1+X_2=1) = \frac{0.256}{0.264} = \frac{32}{33} \approx 0.9697. $$

This is not the common-probability hypergeometric calculation: group 1's trials are much more likely to succeed than group 2's. The group-specific success probabilities affect the conditional allocation.

Common Mistake and Why the Result Matters

A frequent error is to calculate the probability of a specified allocation while forgetting the probability of the required outcomes in the other groups. In the unequal-probability example, “one success in group 1 and none in group 2” is not just \(P(X_1=1)=0.32\); it also requires \(X_2=0\), contributing a factor of \(0.8\). Likewise, “none in group 1 and one in group 2” includes the factor \(P(X_1=0)=(0.2)^2\). The conditional probability must be formed from complete joint probabilities of the competing allocations, then divided by their sum.

The practical value of these results is that conditioning removes information irrelevant to the allocation. With equal-probability trials, once the total number of successes is fixed, the common probability no longer matters; the group sizes determine the distribution. With multinomial categories, a fixed aggregate total is split according to the original probabilities renormalized within that aggregate. This distinction is useful whenever a total is observed or controlled but its distribution across groups or categories is the quantity of interest.

Key takeaway: First identify the sampling structure and verify \(P(T=m)>0\). Equal-probability independent binomial counts give a hypergeometric allocation; a fixed total within multinomial categories gives a multinomial allocation with probabilities normalized within the chosen subset. Unequal binomial success probabilities require group-specific weights.

Check Your Understanding

For each question, identify the conditioning event and use only allocations that can satisfy it.

  1. Independent \(X_1\sim\operatorname{Bin}(5,0.4)\) and \(X_2\sim\operatorname{Bin}(4,0.4)\) have total 3. What is the conditional probability that \(X_1=2\)?
  2. Why does the common success probability cancel when equal-probability binomial counts are conditioned on their sum?
  3. Three multinomial categories have probabilities \(0.1,0.2,0.7\). Given that 5 observations fall in the first two categories, what is the conditional probability for category 1 within that subset?
  4. In the unequal-probability example, what factor would be omitted by using \(P(X_1=1)\) as the joint probability of \((X_1,X_2)=(1,0)\)?
  5. For independent binomial counts with group-specific probabilities, why must the conditioning event have positive probability before a conditional allocation law is defined?