Tutorials › Generalized Linear Models › Quasi-Binomial Versus Beta-Binomial Inference

Negative-Binomial and Beta-Binomial · Tutorial 735 of 981

Quasi-Binomial Versus Beta-Binomial Inference

Learn when the two approaches agree on mean effects, why their uncertainty estimates differ, and how beta-binomial likelihood handles varying trial totals.

Advanced 12 min read

What You'll Learn

  • Write the quasi-binomial estimating equation for grouped successes and identify when it matches the binomial coefficient estimate.
  • Derive the beta-binomial variance and interpret its intraclass correlation.
  • Compare quasi-binomial and beta-binomial uncertainty estimates.
  • Explain why beta-binomial coefficient estimates can differ from quasi-binomial estimates.
  • Assess how unequal trial totals affect the relationship between the two dispersion models.
  • Distinguish likelihood comparisons from quasi-likelihood inference.

Two Models for Extra-Binomial Variation

For group \(i\), let \(Y_i\) be the number of successes in \(m_i\) trials, and let \(\mu_i\) be the success probability described by covariates. A binomial regression assumes \(Y_i\sim\operatorname{Binomial}(m_i,\mu_i)\), so \(\operatorname{Var}(Y_i)=m_i\mu_i(1-\mu_i)\). When observed variation is larger than this variance allows, a quasi-binomial model and a beta-binomial model offer different ways to account for it.

The key distinction is structural. Quasi-binomial inference specifies a mean and a variance but does not, by itself, specify a probability distribution for the counts. The beta-binomial specifies a full distribution by allowing the success probability to vary between groups. That distinction affects coefficient estimates, standard errors, predictions, and which model-comparison tools are available.

Definition: In a quasi-binomial regression, the conditional mean is \(E[Y_i]=m_i\mu_i\), and the variance is specified as \(\operatorname{Var}(Y_i)=\phi m_i\mu_i(1-\mu_i)\), where \(\phi>0\) is a common dispersion parameter. In a beta-binomial regression, each group has a latent success probability \(P_i\sim\operatorname{Beta}(\alpha_i,\beta_i)\), and, conditional on \(P_i\), \(Y_i\mid P_i\sim\operatorname{Binomial}(m_i,P_i)\). Groups are assumed independent.

For either model, a common regression specification is \(g(\mu_i)=\mathbf{x}_i^\mathsf{T}\boldsymbol{\beta}\), where \(g\) is a link function and \(\mathbf{x}_i\) is the covariate vector. In the beta-binomial model, a convenient mean-correlation parameterization sets \(E[P_i]=\mu_i\) and \(\operatorname{Corr}(I_{ij},I_{ik})=\rho\) for two distinct trials in the same group. For \(0<\rho<1\), this corresponds to \(\alpha_i=\mu_i(1-\rho)/\rho\) and \(\beta_i=(1-\mu_i)(1-\rho)/\rho\). At \(\rho=0\), the beta-binomial reduces to the binomial as a limiting case.

What Happens to the Regression Coefficients?

Under a quasi-binomial variance with one common \(\phi\), the usual quasi-score equation for \(\boldsymbol{\beta}\) is the binomial score equation multiplied by \(1/\phi\). This means the coefficient estimates agree with the binomial estimates when the same link, design matrix, and grouped observations are used, and the same score equations are solved. The dispersion changes the estimated uncertainty, not the solution to that equation. This is a feature of the common scalar variance inflation, not a general rule for all overdispersed models.

Result: For independent grouped observations with \(E[Y_i]=m_i\mu_i\), \(\operatorname{Var}(Y_i)=\phi m_i\mu_i(1-\mu_i)\), and a differentiable link \(g\), the quasi-score is \(U_Q(\boldsymbol{\beta})=\phi^{-1}\sum_i \mathbf{x}_i\frac{d\mu_i}{d\eta_i}\frac{Y_i-m_i\mu_i}{\mu_i(1-\mu_i)}\), where \(\eta_i=\mathbf{x}_i^\mathsf{T}\boldsymbol{\beta}\). It is \(1/\phi\) times the binomial score.

To verify this, the mean of \(Y_i\) is \(m_i\mu_i\), whose derivative with respect to \(\boldsymbol{\beta}\) is \(m_i(d\mu_i/d\eta_i)\mathbf{x}_i\). The quasi-score contribution is this derivative multiplied by the residual \(Y_i-m_i\mu_i\) and divided by \(\operatorname{Var}(Y_i)\). Substituting the stated variance cancels \(m_i\) and gives the displayed expression. The binomial log-likelihood score has the same expression without \(1/\phi\). Since \(\phi\) is a positive scalar, multiplying the score equation by it does not change its roots. \(\square\)

The beta-binomial likelihood is not obtained by multiplying the binomial score by a constant. Its likelihood accounts for the extra clustering through the distribution of the count, and its coefficient estimates can therefore differ from binomial and quasi-binomial estimates. They may coincide in particular data sets or special cases, but should not be assumed identical.

Worked Example: A Quasi-Binomial Intercept Estimate and Its Standard Error

Suppose three independent groups each have \(m_i=10\) trials, with observed success counts \(Y_i=2,5,8\). Fit an intercept-only model with the logit link and use a specified quasi-binomial dispersion \(\phi=2\).

The grouped binomial score for the intercept \(\beta_0\), with \(\mu=\operatorname{logit}^{-1}(\beta_0)\), is \(\sum_i(Y_i-m_i\mu)=0\). Here this gives \(2+5+8-30\mu=0\), so \(\hat{\mu}=15/30=0.5\), and \(\hat{\beta}_0=\log(0.5/0.5)=0\). The quasi-binomial score has the same root.

The model-based quasi-binomial variance of the intercept estimate is \(\phi/\sum_i m_i\hat{\mu}(1-\hat{\mu})\). The denominator is \(3(10)(0.5)(0.5)=7.5\), so the estimated variance is \(2/7.5=0.2667\), and the standard error is approximately \(0.516\). With \(\phi=1\), the corresponding binomial standard error would be \(\sqrt{1/7.5}\approx0.365\). The fitted mean is unchanged, while the inflated variance makes the quasi-binomial interval wider.

How the Beta-Binomial Represents Dispersion

The beta-binomial construction gives a direct interpretation of extra variation: trials within a group share the same random probability \(P_i\). Conditional on \(P_i\), the trials are binomial; across groups, the latent probabilities vary. That shared group-level probability induces positive association between trials in the same group.

Result: Under the beta-binomial model, \(E[Y_i]=m_i\mu_i\) and \(\operatorname{Var}(Y_i)=m_i\mu_i(1-\mu_i)\{1+(m_i-1)\rho\}\). The variance inflation relative to the binomial is therefore group-specific when the trial totals \(m_i\) vary.

For a derivation, write \(Y_i\) as the sum of \(m_i\) trial indicators. A single indicator has marginal mean \(\mu_i\) and variance \(\mu_i(1-\mu_i)\), so linearity of expectation gives \(E[Y_i]=m_i\mu_i\). Two distinct indicators in the same group have covariance \(\operatorname{Var}(P_i)\), because they are independent conditional on \(P_i\). The beta distribution in this parameterization has \(\operatorname{Var}(P_i)=\rho\mu_i(1-\mu_i)\). Thus \(\operatorname{Var}(Y_i)=m_i\mu_i(1-\mu_i)+m_i(m_i-1)\rho\mu_i(1-\mu_i)\), which factors into the stated formula. \(\square\)

This variance formula also clarifies how the models relate. For a beta-binomial group, the inflation relative to the binomial variance is \(1+(m_i-1)\rho\). If every group has the same trial total \(m\), the beta-binomial variance has the same mean-variance form as a quasi-binomial variance with \(\phi=1+(m-1)\rho\). With varying \(m_i\), however, a single common \(\phi\) cannot match all those group-specific inflation factors unless \(\rho=0\) or the trial totals are equal. Similar variance at one group size does not make the full probability models equivalent.

Worked Example: Beta-Binomial Variance and a Zero Count

Suppose a group has \(m=4\) trials, mean success probability \(\mu=0.3\), and intraclass correlation \(\rho=0.2\). The beta parameters are \(\alpha=0.3(0.8)/0.2=1.2\) and \(\beta=0.7(0.8)/0.2=2.8\).

The mean count is \(4(0.3)=1.2\). The variance is \(4(0.3)(0.7)\{1+3(0.2)\}=0.84(1.6)=1.344\). The binomial variance at the same mean is \(0.84\); the beta-binomial variance is larger by a factor of \(1.6\).

The probability of observing no successes is \(P(Y=0)=\beta(\alpha,\beta+4)/\beta(\alpha,\beta)\), where \(\beta(\cdot,\cdot)\) denotes the beta function. Using the rising-product form, this equals \((2.8)(3.8)(4.8)(5.8)/[(4)(5)(6)(7)]\approx0.3526\). The binomial probability is \((1-0.3)^4=0.2401\). The larger beta-binomial probability of an extreme count illustrates how shared variation in the success probability can produce more group-to-group variability.

Uncertainty and Likelihood-Based Comparisons

Quasi-binomial standard errors account for the chosen dispersion specification. In the usual model-based calculation, the binomial covariance estimate is multiplied by an estimate of \(\phi\); for a logit model it has the form \(\hat{\phi}\{\sum_i m_i\hat{\mu}_i(1-\hat{\mu}_i)\mathbf{x}_i\mathbf{x}_i^\mathsf{T}\}^{-1}\). A common estimate of \(\phi\) is the Pearson statistic divided by residual degrees of freedom. This is an estimating-model approach: it does not turn the quasi-binomial specification into a full probability distribution for \(Y_i\).

The beta-binomial has a likelihood, obtained by integrating the binomial probability over the beta distribution. For independent groups, its likelihood is \(L(\boldsymbol{\beta},\rho)=\prod_i {m_i\choose Y_i}\frac{B(Y_i+\alpha_i,m_i-Y_i+\beta_i)}{B(\alpha_i,\beta_i)}\), with \(\alpha_i=\mu_i(1-\rho)/\rho\) and \(\beta_i=(1-\mu_i)(1-\rho)/\rho\). Its standard errors can be based on likelihood information, with care near boundaries or other irregularities. Likelihood-based comparisons, such as a likelihood-ratio comparison of binomial and beta-binomial models, are available for these specified distributions, subject to the appropriate boundary theory. A quasi-binomial fit has no ordinary likelihood, so ordinary likelihood-ratio tests and AIC comparisons cannot be applied to it as if it did.

Worked Example: Different Coefficient Estimates at Fixed Dispersion

Consider three groups, each with \(m=2\), and observed counts \(0,0,2\). Fit an intercept-only model. The quasi-binomial score equation is \(0+0+2-6\mu=0\), giving \(\hat{\mu}=1/3\), regardless of the positive common dispersion estimate.

Now fit a beta-binomial model with \(\rho=0.2\) held fixed. For a group of size two, the probabilities of zero and two successes are \(P(Y=0)=(1-\mu)\{\rho+(1-\rho)\mu\}/(1+\rho)\) and \(P(Y=2)=\mu\{1-(1-\rho)\mu\}/(1+\rho)\). The likelihood for these observations is \(P(Y=0)^2P(Y=2)\). Its log-likelihood derivative with respect to \(\mu\) is \(2[-1/(1-\mu)+(1-\rho)/\{\rho+(1-\rho)\mu\}]+1/\mu-(1-\rho)/\{1-(1-\rho)\mu\}\).

At \(\mu=1/3\), substituting \(\rho=0.2\) gives a positive derivative (approximately \(2.34\)), so the quasi-binomial estimate is not the beta-binomial likelihood maximizer. Numerical maximization gives a beta-binomial estimate of approximately \(\hat{\mu}=0.461\), corresponding to an intercept of \(\log(0.461/0.539)\approx-0.156\). This example holds \(\rho\) fixed to isolate the effect of the likelihood form; estimating \(\rho\) as well would require maximizing over both parameters.

Varying Trial Totals: A Practical Consequence

When trial totals differ, the two dispersion descriptions diverge in a particularly visible way. Under a beta-binomial model, groups with more trials have a larger variance inflation factor \(1+(m_i-1)\rho\), because more pairs of trials share the latent probability. A quasi-binomial model instead uses the same multiplier \(\phi\) for each group. Its mean model may still be useful, but its variance assumption cannot reproduce the beta-binomial relationship across distinct trial totals with one common dispersion value.

Worked Example: Unequal Trial Totals Give Unequal Inflation

Suppose two groups have \(m_1=2\) and \(m_2=10\), with \(\mu_1=\mu_2=0.4\) and beta-binomial correlation \(\rho=0.1\). The inflation factors are \(1+(2-1)(0.1)=1.1\) and \(1+(10-1)(0.1)=1.9\).

The binomial variances are \(2(0.4)(0.6)=0.48\) and \(10(0.4)(0.6)=2.4\). The beta-binomial variances are therefore \(0.48(1.1)=0.528\) and \(2.4(1.9)=4.56\). A quasi-binomial model with one \(\phi\) would multiply both binomial variances by the same number; it cannot equal both 1.1 and 1.9. This difference matters for uncertainty and predictive probabilities, not just for how a dispersion parameter is labelled.

Choosing an Interpretation Without Confusing the Models

The choice is not simply between two ways to compute the same standard error. Quasi-binomial inference is useful when the mean regression is the main target and a variance adjustment is sufficient. It is comparatively simple, and under its common dispersion assumption it retains the binomial score estimates. But it does not specify the complete distribution of grouped counts. The beta-binomial is appropriate when a shared, varying group probability is a meaningful representation of dependence and when a full count distribution or likelihood inference is needed.

For either analysis, report the mean model and the dispersion interpretation. A quasi-binomial \(\phi\) is a common variance multiplier, not a within-group correlation. A beta-binomial \(\rho\) is an intraclass correlation for trials within the same group, and the implied variance multiplier depends on \(m_i\). When trial totals vary substantially, this difference should inform the modeling decision rather than being hidden by a single reported “overdispersion” number.

  • Mistake: Treating quasi-binomial and beta-binomial as interchangeable because both allow variance above the binomial variance. Correction: One specifies a mean and variance; the other specifies a probability distribution with a latent group probability.
  • Mistake: Assuming the coefficient estimates must match because quasi-binomial coefficients match binomial coefficients. Correction: The beta-binomial likelihood generally has a different score equation, so its coefficient estimates can differ.
  • Mistake: Using a single quasi-binomial \(\phi\) as though it were the beta-binomial correlation \(\rho\). Correction: For a beta-binomial group, the variance multiplier is \(1+(m_i-1)\rho\), which changes with the trial total.
  • Mistake: Comparing quasi-binomial fits using ordinary likelihood-ratio tests or AIC. Correction: Quasi-binomial inference does not provide an ordinary likelihood for those comparisons.
Key takeaway: A common quasi-binomial dispersion inflates uncertainty while leaving the binomial score equation unchanged. A beta-binomial model represents group-level probability variation, gives trial-total-dependent variance inflation, and supports likelihood inference—but may produce different regression coefficient estimates.

Check Your Understanding

Use the model structure, not just the word “overdispersion,” to answer these questions.

  1. Why do quasi-binomial and binomial coefficient estimates agree under the same mean model and common dispersion multiplier?
  2. For a beta-binomial group with \(m_i=8\) and \(\rho=0.15\), what is the variance inflation factor relative to the binomial variance?
  3. Why can a beta-binomial intercept estimate differ from the quasi-binomial intercept estimate?
  4. What feature of varying trial totals prevents one common quasi-binomial \(\phi\) from matching a beta-binomial variance relationship with \(\rho>0\)?
  5. Which of the two models supplies an ordinary likelihood for likelihood-ratio comparisons, and why?
Clinical Biostats