Tutorials › Generalized Linear Models › Zero-Success and All-Success Groups

Grouped Binomial Regression · Tutorial 401 of 981

Zero-Success and All-Success Groups

See why groups with no successes or no failures can be valid binomial observations, and trace their effects on likelihood scores and fitted probabilities.

Intermediate 10 min read

What You'll Learn

  • Check whether a zero-success or all-success count is valid for its recorded trial total
  • Write the grouped-binomial likelihood contribution at either extreme
  • Derive the score and information contribution of an extreme group
  • Explain how zero-success and all-success groups push fitted probabilities
  • Understand why an extreme count does not automatically make its fitted probability zero or one
  • Identify data-entry problems that count-range checks alone cannot detect

Why Extreme Counts Need Careful Interpretation

A group of ten trials with no successes may look unusual, but it is a possible outcome of a binomial experiment. The same is true of ten successes in ten trials. Neither count is automatically an error, and neither should be altered simply because it lies at an endpoint. The key questions are whether the recorded counts describe the trials correctly and how the likelihood uses the observation.

In grouped binomial regression, group \(i\) has a trial total \(m_i\), a success count \(y_i\), and a success probability \(p_i\). Conditional on its covariates, the count is modeled as \(Y_i\sim\operatorname{Binomial}(m_i,p_i)\). Under logistic regression, \(p_i=\exp(\eta_i)/(1+\exp(\eta_i))\), where \(\eta_i=x_i^\mathsf{T}\beta\). A zero-success group has \(y_i=0\); an all-success group has \(y_i=m_i\).

Definition: A grouped-binomial observation \((y_i,m_i)\) is within the binomial support when \(m_i\) is a nonnegative integer and \(y_i\) is an integer satisfying \(0\leq y_i\leq m_i\). A zero-success group has \(y_i=0\); an all-success group has \(y_i=m_i\). These are valid outcomes, including when \(m_i>0\).

For any probability strictly between zero and one, both endpoint counts have positive probability: \(P(Y_i=0)=(1-p_i)^{m_i}\) and \(P(Y_i=m_i)=p_i^{m_i}\). Their probabilities may be small for some \(p_i\) and trial totals, but “unlikely under a proposed model” is not the same as “impossible” or “incorrect.”

Likelihood Contributions at the Endpoints

For a binomial group, the likelihood contribution is the probability of the observed count. Its log-likelihood contribution, including the binomial coefficient, is

$$ \ell_i(p_i) =\log {m_i\choose y_i}+y_i\log(p_i)+(m_i-y_i)\log(1-p_i). $$

When \(y_i=0\), the success term is zero; when \(y_i=m_i\), the failure term is zero. The convention \(0\log(0)=0\) is used when evaluating the likelihood at an endpoint probability. In logistic regression with finite linear predictor, however, \(0<p_i<1\), so the logarithms in the expression are finite.

Worked Example: A Valid Zero-Success Group

Suppose eight independent trials produce no successes, and the model assigns each trial success probability \(p=0.2\). The observed count is \(y=0\), with \(m=8\), which satisfies \(0\leq y\leq m\). Its likelihood contribution is

$$ P(Y=0)={8\choose 0}(0.2)^0(0.8)^8 =(0.8)^8=0.16777216. $$

The log-likelihood contribution is \(8\log(0.8)\), approximately \(-1.7851\). The outcome is compatible with the model: it has positive probability, even though the model's success probability is not zero.

Worked Example: A Valid All-Success Group

Suppose six trials all succeed and the model assigns \(p=0.7\). Here \(y=6=m\), so this is also within the binomial support. Its likelihood contribution and log-likelihood contribution are

$$ P(Y=6)={6\choose 6}(0.7)^6(0.3)^0 =(0.7)^6=0.117649, \qquad \ell=6\log(0.7)\approx -2.1401. $$

This observation does not establish that the underlying success probability is one. It records six successes in six trials, an outcome that has positive probability when \(p=0.7\).

Score and Information from an Extreme Group

The score describes the local change in log likelihood as the model's linear predictor changes. Write \(\eta_i=\log\{p_i/(1-p_i)\}\), so that \(p_i\) is the logistic function of \(\eta_i\). For fixed \(m_i\) and \(y_i\), the group contribution is

$$ \ell_i(\eta_i) =\log {m_i\choose y_i} +y_i\eta_i-m_i\log(1+\exp(\eta_i)). $$
Theorem: For a binomial group with fixed \(m_i\), \(0\leq y_i\leq m_i\), and logistic probability \(p_i\), the score with respect to \(\eta_i\) is \(y_i-m_ip_i\), and the negative second derivative is \(m_ip_i(1-p_i)\). Thus, for \(m_i>0\) and finite \(\eta_i\), the information contribution is positive. In particular, a zero-success group has score \(-m_ip_i\), and an all-success group has score \(m_i(1-p_i)\).

Proof. Since \(p_i=\exp(\eta_i)/(1+\exp(\eta_i))\), its derivative with respect to \(\eta_i\) is \(p_i(1-p_i)\). Differentiating the displayed log likelihood gives

$$ \frac{\partial\ell_i}{\partial\eta_i} =y_i-\frac{m_i\exp(\eta_i)}{1+\exp(\eta_i)} =y_i-m_ip_i. $$

Differentiating again gives

$$ \frac{\partial^2\ell_i}{\partial\eta_i^2} =-m_i\frac{\partial p_i}{\partial\eta_i} =-m_ip_i(1-p_i). $$

For \(m_i>0\) and finite \(\eta_i\), \(0<p_i<1\), so \(m_ip_i(1-p_i)>0\). Substituting \(y_i=0\) or \(y_i=m_i\) into the score yields the two endpoint expressions. \(\square\)

In a regression model with \(\eta_i=x_i^\mathsf{T}\beta\), the group's contribution to the coefficient score is \(x_i(y_i-m_ip_i)\), and its contribution to the negative Hessian is \(m_ip_i(1-p_i)x_ix_i^\mathsf{T}\). A zero-success group therefore pulls its linear predictor downward locally, while an all-success group pulls it upward. The pull depends on the current fitted probability, the number of trials, and the covariates; it does not mean that the group independently sets its fitted probability to zero or one.

Worked Example: Direction and Size of the Score

At a current fitted probability \(p=0.2\), consider a zero-success group with \(m=8\). Its score for \(\eta\) is \(0-8(0.2)=-1.6\), and its information is \(8(0.2)(0.8)=1.28\). The negative score indicates that increasing the log likelihood locally calls for a lower \(\eta\), hence a lower fitted probability.

Now consider an all-success group with \(m=6\) at a current fitted probability \(p=0.7\). Its score is \(6-6(0.7)=1.8\), and its information is \(6(0.7)(0.3)=1.26\). The positive score points toward a higher \(\eta\) and a higher fitted probability. These are local contributions, not separate fitted probabilities: in regression, coefficients are estimated from the combined contributions of all groups.

What Shared Fitted Probabilities Do with Extreme Groups

A group’s endpoint count is an observation, not a command to set the model probability to the same endpoint. When several groups share a probability under a common-intercept model, their evidence is combined. The following result makes that point precise, including the cases where the combined count itself is at an endpoint.

Result: Suppose independent groups have a common binomial probability \(p\), with fixed positive integer trial totals \(m_i\) and observed counts \(0\leq y_i\leq m_i\). Let \(M=\sum_i m_i\) and \(Y=\sum_i y_i\). For \(0<Y<M\), the likelihood is maximized at \(\hat p=Y/M\). If \(Y=0\), it is maximized at \(p=0\); if \(Y=M\), it is maximized at \(p=1\).

Proof. Independence gives the likelihood, up to factors that do not depend on \(p\), as

$$ L(p)\ \propto\ \prod_i p^{y_i}(1-p)^{m_i-y_i} =p^Y(1-p)^{M-Y}. $$

For \(0<Y<M\) and \(0<p<1\), its log likelihood, omitting constants, is \(Y\log(p)+(M-Y)\log(1-p)\). Its derivative is \(Y/p-(M-Y)/(1-p)\), which is zero exactly when \(Y(1-p)=(M-Y)p\), or \(p=Y/M\). Its second derivative is \(-Y/p^2-(M-Y)/(1-p)^2<0\), so this is the unique maximum. If \(Y=0\), the likelihood is proportional to \((1-p)^M\), which is maximized at \(p=0\). If \(Y=M\), it is proportional to \(p^M\), which is maximized at \(p=1\). \(\square\)

Worked Example: A Zero Group Does Not Force a Zero Shared Probability

Suppose two groups have the same covariates and therefore share a probability \(p\). The first has \(0\) successes in \(10\) trials; the second has \(8\) successes in \(10\) trials. The combined totals are \(Y=0+8=8\) successes in \(M=10+10=20\) trials. Since \(0<8<20\), the common-probability maximum-likelihood estimate is

$$ \hat p=\frac{Y}{M}=\frac{8}{20}=0.4. $$

The zero-success group contributes real evidence for a lower probability, but the other group also contributes evidence. The fitted common probability is \(0.4\), not zero. In a regression with different covariates, the same principle applies through the shared coefficient estimates, though the fitted probability need not equal a simple pooled proportion.

Checking Records Without “Fixing” Valid Extremes

A useful first check is mechanical: for each record, verify that the trial total is a nonnegative integer and that the success count is an integer between zero and that total. For example, \(y=12,m=10\) is outside the binomial support and cannot be a success count for ten trials. It must be investigated before fitting the model. By contrast, \(y=0,m=10\) and \(y=10,m=10\) pass the support check.

Passing the range check does not prove that a record was entered correctly. A valid-looking count may still have the wrong denominator, an incorrectly assigned group, or a reversed success/failure coding. Check the data definition and source records when the context suggests a problem. Do not replace a zero by one, reduce an all-success count, or discard an extreme group merely to avoid an endpoint. Such changes alter the data and the likelihood and require a justified correction, not a preference for less extreme counts.

Extreme observations can also have substantial influence. The score magnitude for a zero-success group is \(m_ip_i\), and for an all-success group it is \(m_i(1-p_i)\). Thus the effect depends on both the group size and the current model probability. Their influence should be interpreted with the covariate pattern and the other observations in mind. A single extreme group is not, by itself, enough to determine its regression probability; the model fits probabilities jointly through its specified predictors.

Common Pitfall

Wrong reasoning: “There were no successes, so the success probability for this group must be zero; I should enter a zero probability or add a small count so the model can be fit.” This confuses the observed count with the probability that generated it. Under a binomial model with \(0<p_i<1\), zero successes in \(m_i\) trials has probability \((1-p_i)^{m_i}>0\). The correction is to retain the valid count, check the record, and let the specified model combine its likelihood contribution with those of the other groups. If an actual count or denominator is inconsistent, correct it from its source rather than applying an arbitrary adjustment.

Key takeaway: Zero-success and all-success groups are legitimate grouped-binomial outcomes when their counts are in range. They contribute directional evidence through the likelihood score; their effect on fitted probabilities depends on the full model and the other groups.

Check Your Understanding

Answer each question using the grouped-binomial likelihood and its regression interpretation.

  1. For a group with \(m=12\) and \(y=0\), write its likelihood contribution as a function of \(p\). Is the observation valid?
  2. For a group with \(m=7\), \(y=7\), and current fitted probability \(p=0.6\), calculate the score with respect to \(\eta\) and state its direction.
  3. Why does observing all successes in a group not prove that its success probability equals one?
  4. Two groups share a common probability and have counts \(0/5\) and \(6/10\). Find the maximum-likelihood estimate of their shared probability.
  5. A record has \(y=9\) and \(m=8\). What should be checked before fitting, and why is this different from a valid \(0/8\) record?
Clinical Biostats