Tutorials › Econometrics (Graduate) › Grouped Outcomes and Binomial Logit Models

Binary Choice Models · Tutorial 474 of 952

Grouped Outcomes and Binomial Logit Models

Build and interpret logit models for grouped success counts while keeping the binomial denominator and sampling assumptions explicit.

Intermediate 10 min read

What You'll Learn

  • Define a grouped binomial response using its success count and trial denominator.
  • Construct the binomial likelihood and log-likelihood under a logit link.
  • Explain when grouped counts preserve the likelihood information in individual Bernoulli records.
  • Interpret logit coefficients through odds ratios and group probabilities.
  • Calculate predicted probabilities and expected group success counts.

Why Grouped Outcomes Need Their Denominators

Many data sets report outcomes by group rather than by individual: a hospital may report how many of its patients were readmitted, or a laboratory may report how many of a batch of specimens tested positive. A count such as “8 successes” is not enough to specify the response. Eight successes among 10 trials represents a different success rate, and a different amount of information, from 8 among 100.

A grouped binomial logit model uses both the success count and the number of trials in each group. Its regression structure models the probability of success for a trial with the group’s covariates. The resulting likelihood accounts for the number of successes and failures, rather than treating a group’s proportion as if it were a single binary observation.

Definition: For group \(j\), let \(Y_j\) be the number of successes among \(m_j\) trials, where \(m_j\) is the denominator. A grouped binomial response assumes \(Y_j\mid x_j\sim\operatorname{Binomial}(m_j,p_j)\). In a binomial logit model, the success probability satisfies \(\log\{p_j/(1-p_j)\}=x_j^\top\beta\), so \(p_j=\exp(x_j^\top\beta)/\{1+\exp(x_j^\top\beta)\}\).

Here \(x_j\) is the vector of predictors for group \(j\), typically including an intercept, and \(\beta\) is the coefficient vector. The model says that trials in a group share a probability \(p_j\) conditional on the predictors. The group’s expected success count is \(m_jp_j\), and its expected success proportion is \(p_j\).

Likelihood for Grouped Counts

The binomial probability of observing exactly \(y_j\) successes among \(m_j\) trials is the number of possible arrangements of those successes times the probability of any one such arrangement. Therefore,

$$ P(Y_j=y_j\mid x_j) = \binom{m_j}{y_j}p_j^{y_j}(1-p_j)^{m_j-y_j}. $$

If groups are independent conditional on their covariates, the likelihood for \(J\) groups is the product of these probabilities. Substituting the logit model gives a likelihood in terms of \(\beta\):

$$ L(\beta) = \prod_{j=1}^{J} \binom{m_j}{y_j} \left(\frac{\exp(x_j^\top\beta)}{1+\exp(x_j^\top\beta)}\right)^{y_j} \left(\frac{1}{1+\exp(x_j^\top\beta)}\right)^{m_j-y_j}. $$

Taking logarithms yields the log-likelihood. Its binomial-coefficient term depends on the observed data but not on \(\beta\). It must be included when calculating the probability of the observed grouped counts; it can be omitted when maximizing the log-likelihood over \(\beta\), because it does not change which value maximizes it.

$$ \ell(\beta) = \sum_{j=1}^{J} \left[ \log\binom{m_j}{y_j} +y_jx_j^\top\beta -m_j\log\{1+\exp(x_j^\top\beta)\} \right]. $$

Worked Example: Evaluating a Grouped Logit Likelihood

Suppose, hypothetically, three groups each contain 10 trials. Their predictor values are \(x_j=0,2,4\), and their observed success counts are \(y_j=2,5,8\). Consider the specified model \(\operatorname{logit}(p_j)=-2+0.5x_j\). Calculate the fitted probabilities and the log-likelihood at these coefficients.

For \(x=0\), the linear predictor is \(\eta=-2\), so \(p=1/(1+\exp(2))\approx0.1192\). For \(x=2\), \(\eta=-1\), so \(p\approx0.2689\). For \(x=4\), \(\eta=0\), so \(p=0.5000\).

Using \(\ell_j=\log\binom{10}{y_j}+y_j\eta_j-10\log(1+\exp(\eta_j))\), the first group contributes \(\log(45)+2(-2)-10\log(1+\exp(-2))\approx-1.463\). The second contributes \(\log(252)+5(-1)-10\log(1+\exp(-1))\approx-2.603\). The third contributes \(\log(45)+8(0)-10\log(2)\approx-3.125\).

Thus the total log-likelihood is approximately \(-1.463-2.603-3.125=-7.191\). This is the log probability of the three observed grouped counts under the specified model. The coefficients were supplied for this calculation; the result does not claim that they maximize the likelihood.

What Grouping Preserves—and What It Changes

Suppose that, within a group, each individual trial has the same covariates and the same success probability, and trials are conditionally independent. Then the individual outcomes are Bernoulli observations with probability \(p_j\). Their sum has a binomial distribution with denominator \(m_j\). Grouping those outcomes retains the count of successes and failures needed for the likelihood of \(\beta\).

The individual-data likelihood for a particular ordering of the outcomes is \(p_j^{y_j}(1-p_j)^{m_j-y_j}\). The grouped-count probability is larger by the factor \(\binom{m_j}{y_j}\), because the count can arise from that many orderings. This factor does not depend on \(\beta\); consequently, with the same covariates for every trial in a group, maximizing the individual-data likelihood or the grouped-data likelihood gives the same coefficient estimates.

Worked Example: One Count or Several Bernoulli Records?

In a hypothetical group of four trials, three are successes and one is a failure. Suppose each trial has success probability \(p=0.6\), conditional on the group’s covariates. Compare the probability of one specified ordering with the probability of the grouped count.

For a particular ordering, such as success, success, failure, success, the Bernoulli likelihood is \(0.6^3(0.4)=0.0864\).

The probability of observing three successes in any ordering is \(\binom{4}{3}(0.6)^3(0.4)=4(0.0864)=0.3456\). The grouped probability includes all four possible placements of the single failure.

The count is not one Bernoulli observation: it records three successes out of four trials. If every trial has the same covariates, the factor of four changes the likelihood value but not the coefficient estimate. If covariates differ across the four trials, however, a single group probability generally cannot represent their individual probabilities; the records cannot be aggregated into this one binomial count without losing information relevant to the model.

A proportion \(y_j/m_j\) can summarize a group, but it does not by itself retain the denominator. For example, a proportion of \(0.5\) could represent 1 success out of 2 trials or 50 out of 100. Those groups have the same observed proportion but different binomial likelihood contributions. A grouped model therefore needs both \(y_j\) and \(m_j\), or an equivalent representation that explicitly preserves the denominator.

How the Coefficients Are Estimated

The assumptions behind the likelihood are substantive. Conditional on the predictors, trials are Bernoulli with a common group probability; the group counts are independent across groups; and that probability follows the specified logit form. In particular, this binomial likelihood does not allow trials in a group to share additional dependence beyond what is represented by the predictors. These conditions justify using the product of binomial probabilities; they should be considered before interpreting fitted coefficients.

The likelihood generally has no closed-form maximizer when predictors vary. Numerical maximum likelihood methods find coefficient values that maximize \(\ell(\beta)\). The score equation can be obtained directly by differentiating the log-likelihood. Write \(p_j=\exp(x_j^\top\beta)/\{1+\exp(x_j^\top\beta)\}\). Since the derivative of \(\log\{1+\exp(\eta)\}\) with respect to \(\eta\) is \(p\), the contribution from group \(j\) has derivative \(x_j(y_j-m_jp_j)\). Summing gives:

$$ \frac{\partial\ell(\beta)}{\partial\beta} = \sum_{j=1}^{J}x_j(y_j-m_jp_j). $$

At an interior maximum, this score is zero. In words, the fitted model balances covariate-weighted observed success counts against covariate-weighted expected counts. The second derivative is

$$ \frac{\partial^2\ell(\beta)}{\partial\beta\,\partial\beta^\top} = -\sum_{j=1}^{J}m_jp_j(1-p_j)x_jx_j^\top. $$

This matrix is negative semidefinite, as \(m_jp_j(1-p_j)\geq0\) and each \(x_jx_j^\top\) is positive semidefinite. Thus the log-likelihood is concave. Under suitable identification and finite-estimate conditions, its maximum is unique. In particular, if the predictors perfectly separate groups with successes from groups with failures, a finite maximum may not exist; software warnings or coefficients that grow extremely large should not be treated as ordinary finite estimates.

Interpreting Effects on Group Probabilities

A logit coefficient describes a change in log-odds, not a constant change in probability. If \(x_k\) is a continuous predictor and the other predictors are held fixed, increasing \(x_k\) by one unit changes the log-odds by \(\beta_k\) and multiplies the odds by \(\exp(\beta_k)\). The corresponding probability change depends on the starting probability. In the grouped model, these are statements about a trial’s group-conditional success probability \(p_j\), not about the group count independently of its denominator.

For a continuous predictor, the local probability slope is \(\beta_kp_j(1-p_j)\). A group with denominator \(m_j\) has expected count \(m_jp_j\), so the local change in expected successes per unit increase in \(x_k\) is \(m_j\beta_kp_j(1-p_j)\). Both quantities depend on the group covariates; the latter also depends on the denominator.

Worked Example: Translating a Coefficient Into Group Probabilities

Suppose, hypothetically, a fitted model for a group’s success probability is \(\operatorname{logit}(p)=-1.5+0.4x\), where \(x\) is years of experience. Compare the predicted success probabilities at 2 and 3 years, holding other covariates fixed.

At 2 years, \(\eta=-1.5+0.4(2)=-0.7\), giving \(p=1/(1+\exp(0.7))\approx0.3318\). At 3 years, \(\eta=-1.5+0.4(3)=-0.3\), giving \(p=1/(1+\exp(0.3))\approx0.4256\). The one-year increase corresponds to a probability change of approximately \(0.4256-0.3318=0.0938\), or 9.38 percentage points.

The coefficient also implies an odds ratio of \(\exp(0.4)\approx1.492\): for a one-year increase in experience, the odds of success are multiplied by about 1.492, holding the other covariates fixed. This is not a 49.2-percentage-point increase in probability. If each group has 20 trials, the expected counts at these two experience levels are \(20(0.3318)=6.636\) and \(20(0.4256)=8.512\), a difference of about 1.876 expected successes per group of 20. These are model expectations, not guaranteed observed counts.

Common Mistake: Treating a Group Proportion as One Outcome

A common error is to enter \(y_j/m_j\) as though each group supplied one binary observation, or to analyze the proportions without their denominators. That reasoning discards how many trials produced each proportion: it treats 1 success out of 2 as equally informative as 50 out of 100. The correction is to use the binomial count and denominator in the likelihood. If the data are entered as proportions in software, the number of trials must still be supplied as the binomial denominator or equivalent weight.

A related mistake is to interpret \(\beta_k\) as the change in probability for every group. The coefficient is a log-odds change; the probability change depends on the group’s starting probability. Report predicted probabilities or probability differences at specified covariate values when the question concerns changes in success probability.

Key takeaway: A grouped binomial logit model combines each group’s success count \(y_j\), denominator \(m_j\), and covariates \(x_j\). Its likelihood is justified when trials share a conditional probability within each group and groups are conditionally independent. Coefficients shift log-odds, while group probabilities and expected counts depend on the covariates and denominator.

Check Your Understanding

Answer each question using the grouped count and its denominator explicitly.

  1. A group has 12 successes among 30 trials. What are \(y_j\), \(m_j\), and the observed proportion?
  2. Why does a grouped-count likelihood contain the factor \(\binom{m_j}{y_j}\), and why can that factor be dropped when maximizing over \(\beta\)?
  3. Under what condition on individual covariates can Bernoulli records be aggregated into one binomial count without changing the coefficient estimates?
  4. A logit coefficient is \(0.2\). What does \(\exp(0.2)\) describe, and why is it not a fixed probability increase?
  5. If two groups both have an observed proportion of \(0.5\), why might their grouped likelihood contributions differ when their denominators differ?
Clinical Biostats