Tutorials › Generalized Linear Models › When Bernoulli Records Collapse to a Binomial Count

Grouped Binomial Regression · Tutorial 389 of 981

When Bernoulli Records Collapse to a Binomial Count

Learn why a shared-probability Bernoulli sample can be represented by its success count, and what that aggregation does—and does not—retain.

Intermediate 11 min read

What You'll Learn

  • Derive the binomial probability of a success count from labeled Bernoulli outcomes
  • Distinguish the likelihood of the full record from the likelihood of the count
  • Prove that the success count is sufficient for a shared success probability
  • Show that the conditional arrangement of successes carries no further information about that probability
  • Compare the Fisher information in individual records and in the grouped count
  • Identify when a binomial count is an exact representation of Bernoulli records

From Individual Outcomes to a Count

Suppose \(m\) labeled units each produce a binary outcome: success or failure. If every unit has the same success probability \(p\), and the outcomes are independent, the record is a collection of \(m\) independent Bernoulli observations. Sometimes the individual outcomes are recorded; sometimes only the total number of successes is available. The key question is whether replacing the full record by that total changes what the data say about \(p\).

Under the stated common-probability and independence assumptions, the count has a binomial distribution. This is more than a convenient description: its likelihood contains all the dependence on \(p\) present in the labeled records. The count does discard which units succeeded, so it does not preserve every detail of the observed data.

Definition: Let \(Y_1,\ldots,Y_m\) be independent Bernoulli random variables with \(P(Y_i=1)=p\) and \(P(Y_i=0)=1-p\) for every \(i\), where \(0<p<1\). The full record is \(\mathbf{Y}=(Y_1,\ldots,Y_m)\), and its success count is \(S=\sum_{i=1}^m Y_i\). Then \(S\) is binomial with size \(m\) and success probability \(p\).

Deriving the Count Likelihood

For one particular labeled record \(\mathbf{y}=(y_1,\ldots,y_m)\), where each \(y_i\) is either 0 or 1, independence gives its probability. Write \(s=\sum_{i=1}^m y_i\). There are \(s\) factors of \(p\) and \(m-s\) factors of \(1-p\), so the likelihood of this particular record is

$$ L_{\mathrm{record}}(p;\mathbf{y})=p^s(1-p)^{m-s}. $$

That expression is not yet the probability of observing the count \(s\). The event \(S=s\) includes every labeled record with exactly \(s\) successes. There are \(\binom{m}{s}\) such records, and each has the same probability under the common-\(p\) model. Adding their probabilities gives

$$ P_p(S=s)=\binom{m}{s}p^s(1-p)^{m-s}, \qquad s=0,\ldots,m. $$

Thus, if only the count is observed, its exact likelihood includes the binomial coefficient. For likelihood comparisons or estimation of \(p\) with \(m\) fixed, that coefficient is constant in \(p\), so the count likelihood and the full-record likelihood have the same \(p\)-dependent part.

Worked Example: Four Records and Two Successes

Suppose \(m=4\), and the observed labeled record is \((1,0,1,0)\). It contains \(s=2\) successes. At \(p=0.3\), the probability of this particular record is

$$ 0.3(0.7)0.3(0.7)=0.3^2(0.7)^2=0.0441. $$

If only the count \(S=2\) is observed, there are \(\binom{4}{2}=6\) possible labeled records with two successes. Therefore

$$ P_{0.3}(S=2)=\binom{4}{2}(0.3)^2(0.7)^2 =6(0.09)(0.49)=0.2646. $$

The count probability is six times the probability of the one recorded arrangement because it includes all six arrangements. Confusing these probabilities is a common source of a missing binomial coefficient.

What the Count Retains About the Parameter

A statistic is sufficient for a parameter when the observed statistic retains all the sample information about that parameter. Here this statement can be made precise in two complementary ways: the joint probability factors through \(S\), and, given \(S\), the arrangement of successes is distributed independently of \(p\).

Theorem: Under the independent, common-probability Bernoulli model, the count \(S=\sum_{i=1}^m Y_i\) is sufficient for \(p\). In particular, conditional on \(S=s\), each labeled arrangement with \(s\) successes has probability \(1/\binom{m}{s}\), which does not depend on \(p\).

Proof. For any record \(\mathbf{y}\), its joint probability is \(p^s(1-p)^{m-s}\), where \(s=\sum_i y_i\). This factors as a function of the record through \(s\), multiplied by a factor that does not otherwise depend on \(p\):

$$ P_p(\mathbf{Y}=\mathbf{y}) =\underbrace{p^s(1-p)^{m-s}}_{\text{depends on the record through }s} \underbrace{1}_{\text{independent of }p}. $$

By the factorization theorem, \(S\) is sufficient for \(p\). For the conditional statement, take any record \(\mathbf{y}\) with \(s\) successes. Since \(0<p<1\), \(P_p(S=s)>0\), and

$$ P_p(\mathbf{Y}=\mathbf{y}\mid S=s) =\frac{P_p(\mathbf{Y}=\mathbf{y})}{P_p(S=s)} =\frac{p^s(1-p)^{m-s}}{\binom{m}{s}p^s(1-p)^{m-s}} =\frac{1}{\binom{m}{s}}. $$

The conditional distribution of the arrangement is therefore parameter-free. Once the count is known, learning which particular units succeeded gives no additional information about \(p\) in this model. \(\square\)

Worked Example: A Likelihood Ratio Depends Only on the Count

Consider two possible records of \(m=6\) outcomes: one record has four successes and two failures, and the other has those same counts in a different order. Compare the likelihood at \(p=0.6\) with the likelihood at \(p=0.3\). For either labeled record, the ratio is

$$ \frac{L(0.6)}{L(0.3)} =\frac{(0.6)^4(0.4)^2}{(0.3)^4(0.7)^2} =\left(\frac{0.6}{0.3}\right)^4 \left(\frac{0.4}{0.7}\right)^2 =16\cdot\frac{16}{49} =\frac{256}{49} \approx 5.2245. $$

For the count \(S=4\), each likelihood has the additional factor \(\binom{6}{4}=15\). It cancels in the ratio:

$$ \frac{\binom{6}{4}(0.6)^4(0.4)^2} {\binom{6}{4}(0.3)^4(0.7)^2} =\frac{256}{49}. $$

The likelihood ratio is identical whether the observation is the labeled record or the count. The ordering of the four successes does not affect the evidence comparing these two values of \(p\).

Equality of Fisher Information

Sufficiency has a direct information consequence. For \(0<p<1\), the Fisher information in a differentiable likelihood is the expected square of its score, where the score is the derivative of the log-likelihood with respect to \(p\). The full record and its count have the same Fisher information for \(p\).

Result: For \(m\) independent Bernoulli observations with common probability \(p\), the Fisher information about \(p\) is \(m/[p(1-p)]\), whether the data are represented by the full record or by \(S\).

Derivation. For the full record, the log-likelihood is \(s\log p+(m-s)\log(1-p)\). Its score is

$$ U_{\mathrm{record}}(p) =\frac{s}{p}-\frac{m-s}{1-p} =\frac{s-mp}{p(1-p)}. $$

Because \(S\) is the sum of \(m\) independent Bernoulli variables, \(E[S]=mp\) and \(\operatorname{Var}(S)=mp(1-p)\). The score has mean zero, and its expected square is

$$ E_p[U_{\mathrm{record}}(p)^2] =\frac{E_p[(S-mp)^2]}{p^2(1-p)^2} =\frac{\operatorname{Var}_p(S)}{p^2(1-p)^2} =\frac{m}{p(1-p)}. $$

For the count likelihood, the log-likelihood adds the term \(\log\binom{m}{s}\), which is constant in \(p\). Its score is consequently the same expression, \((s-mp)/[p(1-p)]\), and its expected square is the same. This proves the equality. The result concerns information about \(p\); it does not mean the count preserves the identities or ordering in the record. \(\square\)

Worked Example: Checking Information for Ten Trials

Suppose there are \(m=10\) independent trials with shared probability \(p=0.4\), and the observed count is \(s=4\). The full-record likelihood for any particular arrangement with four successes is

$$ (0.4)^4(0.6)^6 =0.0256(0.046656) =0.0011943936. $$

There are \(\binom{10}{4}=210\) such arrangements, so the count likelihood is

$$ P_{0.4}(S=4) =210(0.0011943936) =0.250822656. $$

The count and record scores at this observed value are both

$$ \frac{s-mp}{p(1-p)} =\frac{4-10(0.4)}{(0.4)(0.6)} =0. $$

A zero observed score says the likelihood is locally flat at \(p=0.4\) for this observation; it does not say the experiment has zero Fisher information. The expected information, computed across all possible records or counts, is

$$ \frac{m}{p(1-p)} =\frac{10}{(0.4)(0.6)} =\frac{10}{0.24} \approx 41.6667. $$

The same value applies to the full-record and count representations.

What Aggregation Does and Does Not Preserve

Under the model’s assumptions, replacing \((Y_1,\ldots,Y_m)\) by \(S\) preserves the likelihood information about the single common probability \(p\). It also preserves any likelihood-based comparison about \(p\) that uses these observations and this model. But aggregation is not lossless in every sense: after retaining only \(S\), one cannot recover which units succeeded.

The premise matters. The derivation used independence and the same probability \(p\) for every outcome. If probabilities differ across units, a particular arrangement can matter: placing successes on units with different probabilities can change its likelihood even when the total count stays fixed. Whether a grouped binomial model is appropriate when probabilities may vary within a group requires separate consideration; the count derivation alone does not establish that premise.

Common Mistake

  • Wrong reasoning: “The observed data contain four successes, so their likelihood is just \(p^4(1-p)^{m-4}\), whether I observed the individual records or only the count.”
  • Correction: That expression is the likelihood of one particular labeled arrangement. If the observation is only the count, its exact probability sums over all arrangements, giving \(\binom{m}{4}p^4(1-p)^{m-4}\). The coefficient is irrelevant to inference about \(p\) when \(m\) is fixed, but it is part of the count’s probability.
Key takeaway: Independent Bernoulli records with one shared probability produce a binomial count. That count is sufficient for the probability parameter: it retains all information about \(p\) in the model, while discarding the identities and ordering of the individual outcomes.

Check Your Understanding

Use the distinction between a particular record and a count likelihood to answer these questions.

  1. For \(m=5\), write the likelihood of one particular record with two successes and the probability of observing the count \(S=2\).
  2. Why does the conditional distribution of the success arrangement given \(S=s\) not depend on \(p\)?
  3. In what sense does the count retain information about \(p\), and what aspect of the observed record does it discard?
  4. For \(m=8\), explain why adding the binomial coefficient to the likelihood ratio for two values of \(p\) does not change that ratio.
  5. Which assumptions are needed for the count likelihood derived here?
Clinical Biostats