Tutorials › Bayesian Clinical Trials › Overdispersion In Binary Trial Outcomes

Calibrating Operating Characteristics · Tutorial 212 of 696

Overdispersion In Binary Trial Outcomes

Model extra-binomial variation in binary trial outcomes and use simulation to assess and recalibrate the operating characteristics of a Bayesian decision rule.

Advanced 13 min read

What You'll Learn

  • Explain when binary outcomes are overdispersed relative to a binomial model.
  • Derive the variance of a beta-binomial cluster count and interpret its intracluster correlation.
  • Simulate clustered trial outcomes under a specified overdispersion scenario.
  • Estimate the false-positive rate and Monte Carlo uncertainty of a Bayesian trial decision.
  • Compare binomial and overdispersion-aware analyses and identify important model limitations.

Why Overdispersion Matters

A binomial model assumes that, within a treatment arm, each patient has the same event probability and outcomes are independent. Under those assumptions, if \(n\) patients each have event probability \(p\), the event count \(S\) has variance \(np(1-p)\). If outcomes are more alike within clinics, sites, or other groups than that model permits, the observed event counts can vary more across repeated trials than the binomial variance predicts. This is overdispersion relative to the binomial model.

That extra variability matters for operating characteristics. A Bayesian decision rule is applied to trial data, and its false-positive rate, power, and other performance measures are estimated by repeating the trial simulation. If the simulated data omit relevant clustering, the estimated frequency of decisions can be misleading. The issue is not resolved merely by using Bayesian inference: calibration depends on whether the simulation represents the variation present in the intended trial setting.

A useful model for this setting is the beta-binomial model. In a clinical trial, it can represent patients grouped in clinics: each clinic has a latent event probability, and patients in that clinic have conditionally independent outcomes given that probability. The shared clinic probability induces positive dependence among outcomes from the same clinic.

Definition: In a beta-binomial cluster model, clinic \(j\) has a latent event probability \(Q_j\sim\operatorname{Beta}(a,b)\). Conditional on \(Q_j\), the outcomes \(Y_{ij}\) of the \(m\) patients in that clinic are independent Bernoulli variables with probability \(Q_j\). The clinic event count is \(S_j=\sum_{i=1}^{m}Y_{ij}\). Different clinics are assumed independent and to share the same beta distribution.

Write \(\mu=a/(a+b)\) for the mean event probability and \(\rho=1/(a+b+1)\) for the within-clinic intracluster correlation. The parameter \(\rho\) measures the correlation between two distinct outcomes in the same clinic under this model. When \(\rho=0\), the model approaches the binomial case; positive \(\rho\) increases the variability of the count. The beta distribution is a modelling assumption, not a guarantee that every form of heterogeneity or dependence in a real trial has been captured.

Deriving the Extra-Binomial Variance

The variance follows from conditioning on the clinic probability. Given \(Q_j\), the count is binomial, so its conditional mean is \(mQ_j\) and its conditional variance is \(mQ_j(1-Q_j)\). The law of total variance separates variation within clinics from variation in their latent probabilities:

$$ \begin{aligned} \operatorname{Var}(S_j) &=E\{\operatorname{Var}(S_j\mid Q_j)\} +\operatorname{Var}\{E(S_j\mid Q_j)\}\\ &=mE\{Q_j(1-Q_j)\}+m^2\operatorname{Var}(Q_j)\\ &=m\mu(1-\mu)\{1+(m-1)\rho\}. \end{aligned} $$

To see the last equality, use \(\operatorname{Var}(Q_j)=\mu(1-\mu)\rho\) and \(E\{Q_j(1-Q_j)\}=\mu(1-\mu)-\operatorname{Var}(Q_j)\). Substitution gives \(m\mu(1-\mu)-m\operatorname{Var}(Q_j)+m^2\operatorname{Var}(Q_j)\), which is \(m\mu(1-\mu)\{1+(m-1)\rho\}\). For \(g\) independent, equally sized clinics, the total event count has variance \(g\) times this quantity. The factor \(1+(m-1)\rho\) is the variance inflation relative to an independent binomial count with the same total number of patients.

It is important to distinguish this model from independent patient-specific probabilities. If each patient independently draws a risk from the same distribution and then has an outcome conditional on that risk, the resulting patient outcomes are still independent Bernoulli variables with the common marginal event probability. That construction alone does not produce an overdispersed total count. For extra-binomial variation, the model must induce dependence, for example by sharing a latent clinic probability among patients.

Worked Example: Calculating Cluster-Level Variance

Suppose a hypothetical trial has 40 patients per arm, in four clinics of 10 patients each. The mean event probability is \(\mu=0.20\), and the within-clinic correlation is \(\rho=0.05\). Calculate the beta parameters and compare the variance of the arm’s total event count with the independent binomial variance.

The beta concentration is \(a+b=1/\rho-1=1/0.05-1=19\). Thus \(a=\mu(a+b)=0.20(19)=3.8\) and \(b=(1-\mu)(a+b)=0.80(19)=15.2\). These parameters give the stipulated mean and correlation.

For one clinic, the variance is \(10(0.20)(0.80)\{1+(10-1)(0.05)\}=1.6(1.45)=2.32\) events squared. The four independent clinics therefore give total-count variance \(4(2.32)=9.28\). An independent binomial model for 40 patients would instead give \(40(0.20)(0.80)=6.40\). The variance inflation is \(9.28/6.40=1.45\), consistent with the cluster size of 10 and \(\rho=0.05\). The expected total is 40(0.20)=8 events under either model; it is the variability, not the mean, that differs.

Simulating Decisions Under Overdispersion

An operating characteristic is a repeated-trial probability or expectation, such as the probability that a decision rule declares treatment benefit under a specified scenario. To estimate it, simulate many complete trials from a stated data-generating model, apply the same analysis and decision rule planned for the trial, and record the result. For a false-positive rate, the scenario must specify a null condition. For example, the two arms can have the same mean event probability, while clinic probabilities vary independently between clinics within each arm.

Consider a Bayesian analysis that treats outcomes as independent within each arm, with independent \(\operatorname{Beta}(1,1)\) priors on the arm event probabilities \(p_C\) and \(p_T\). If \(x_C\) and \(x_T\) events are observed among \(n_C\) and \(n_T\) patients, respectively, the posterior distributions under that analysis are \(\operatorname{Beta}(1+x_C,1+n_C-x_C)\) and \(\operatorname{Beta}(1+x_T,1+n_T-x_T)\). Suppose the decision is to declare benefit when \(P(p_T<p_C\mid\text{data})>0.95\). This definition makes the decision rule explicit; it does not imply that its repeated-trial false-positive rate is 5%.

For each simulated replicate, generate clinic probabilities from the specified beta distribution, generate patient outcomes conditional on those probabilities, calculate the posterior probability using the planned analysis, and apply the cutoff. Under a null scenario, the fraction of replicates crossing the decision threshold estimates the false-positive rate. The simulated outcome model and the analysis model need not be the same: comparing them is precisely how one can assess the calibration of a planned rule under extra-binomial variation.

Worked Example: Estimating a False-Positive Rate

Suppose 10,000 hypothetical trials are simulated under equal mean event probabilities of 0.20 in both arms. Each arm has four clinics of 10 patients, with \(\rho=0.05\). The independent-binomial Bayesian analysis and decision rule described above are applied to every replicate. Assume the simulation records 617 benefit declarations.

The estimated false-positive rate is the number of declarations divided by the number of simulated trials:

$$ \widehat{R}=\frac{617}{10{,}000}=0.0617. $$

Thus, in this hypothetical simulation, 6.17% of trials under the equal-mean scenario cross the decision threshold. The Monte Carlo standard error, which quantifies simulation noise in this estimated rate, is approximately \(\sqrt{0.0617(1-0.0617)/10{,}000}=0.00241\), or 0.241 percentage points. This uncertainty reflects the finite number of simulated trials; it does not capture uncertainty about whether the data-generating assumptions are realistic. The result suggests that the rule’s false-positive rate under this scenario exceeds 5%, although the Monte Carlo standard error should be considered when judging the size of that difference.

A careful calibration study can also vary the decision cutoff while keeping the scenario and data-generation procedure fixed. A more stringent posterior-probability cutoff will generally lead to fewer declarations, though the resulting rate must be measured rather than assumed. If a cutoff is selected using one batch of simulations, its performance should not be reported as if it had been independently validated by that same batch.

Worked Example: Choosing a Cutoff for a Target Rate

Continue with the hypothetical null scenario above. A simulation study of 10,000 trials gives 710 declarations at posterior cutoff 0.94, 617 at 0.95, 530 at 0.96, and 441 at 0.97. Estimate the false-positive rate at each cutoff and assess which is closest to a 5% target.

The estimates are \(710/10{,}000=0.0710\), \(617/10{,}000=0.0617\), \(530/10{,}000=0.0530\), and \(441/10{,}000=0.0441\). The 0.96 cutoff is closest to 0.05 among these choices: its estimated rate is 5.30%, 0.30 percentage points above the target. Its Monte Carlo standard error is \(\sqrt{0.0530(0.9470)/10{,}000}=0.00224\), or 0.224 percentage points. The 0.97 cutoff is 0.59 percentage points below the target, with standard error approximately \(\sqrt{0.0441(0.9559)/10{,}000}=0.00205\). These results do not establish that either cutoff achieves exactly 5%; they show how the chosen rule performed in the stated simulated scenario, subject to Monte Carlo error and model assumptions.

Model Choices, Diagnostics, and Limitations

The beta-binomial model is one way to represent clustered binary outcomes; it is not the only one. The appropriate approach depends on the trial design and on the source of extra variability.

ApproachWhat it representsCalibration consideration
Independent binomialCommon event probability and independent outcomes within an armCan understate count variability when outcomes share cluster-level risks
Beta-binomial or related hierarchical modelLatent clinic probabilities with variation between clinicsRequires defensible assumptions about the distribution and dependence structure
Cluster-aware analysisDependence arising from the actual grouping structureMust reflect the design, including cluster sizes and the number of clusters

Diagnostics for a simulation study begin with the model specification, not only with its output. Check that the simulated mean event rate matches its target, that cluster sizes and allocation match the planned design, and that the generated within-clinic dependence agrees with the chosen \(\rho\). Across many replicates, compare the empirical event-count variance with the model’s predicted variance. For \(g\) clinics of size \(m\), that prediction is \(g m\mu(1-\mu)\{1+(m-1)\rho\}\). A discrepancy can signal an implementation error or a mismatch between the intended and simulated model.

Also inspect decision rates across relevant null and benefit scenarios, rather than treating one simulated rate as a general property of the rule. A result can be unstable when there are few simulations, few clinics, or rare events. In particular, increasing the number of patients within a small number of clinics does not provide the same information about between-clinic variation as adding clinics. The beta-binomial model also imposes a particular form of heterogeneity: it does not automatically represent covariate effects, unequal clinic sizes, more complex dependence, or all forms of treatment-effect variation.

A common mistake is to assign each patient an independent random event probability and conclude that the resulting total count must be overdispersed. If those probabilities are independently drawn from the same distribution, the marginal outcomes are independent Bernoulli variables with a common mean, so their total count remains binomial. The correction is to specify the dependence that creates extra variation, such as a shared latent probability for patients in the same clinic, and then verify that the simulated structure matches the intended trial.

Key takeaway: Overdispersion changes the distribution of trial outcomes and can change the operating characteristics of a Bayesian decision rule. Specify the source of dependence, simulate it at the correct level, and estimate decision performance with Monte Carlo uncertainty reported alongside the result.

Check Your Understanding

Answer each question, then compare your reasoning with the solutions.

  1. In the beta-binomial model, what creates positive correlation between two patients in the same clinic?
  2. For \(m=8\) patients per clinic and \(\rho=0.10\), calculate the variance inflation factor relative to a binomial count with the same total number of patients.
  3. A simulation has 400 benefit declarations in 8,000 trials under a null scenario. Calculate the estimated false-positive rate.
  4. Why does independently drawing a risk for every patient not, by itself, create an overdispersed total count?

Solutions. 1. The patients share the same latent clinic probability \(Q_j\); variation in that probability induces covariance between their outcomes. 2. The factor is \(1+(m-1)\rho=1+7(0.10)=1.70\). 3. The estimate is \(400/8{,}000=0.0500\), or 5.00%. 4. Independent risk draws produce independent marginal Bernoulli outcomes with a common mean, so their sum has a binomial distribution rather than extra-binomial variance.

Clinical Biostats