Tutorials › Bayesian Clinical Trials › Zero-Response And All-Response Baskets

Hierarchical Models and Basket Trials · Tutorial 472 of 696

Zero-Response And All-Response Baskets

Calculate how beta-binomial borrowing changes estimates at the zero- and all-response boundaries, including when uncertainty in shared hyperparameters is taken into account.

Advanced 11 min read

What You'll Learn

  • Derive the beta posterior for a basket with zero responses or responses for every participant.
  • Express the posterior mean as a weighted average of the prior mean and the observed response rate.
  • Distinguish conditional borrowing from borrowing that accounts for uncertainty in shared hyperparameters.
  • Calculate a basket’s posterior response rate under a mixture of hyperparameter values.
  • Compare hierarchical estimates with independent-basket and complete-pooling analyses.
  • Recognize the assumptions and diagnostics that matter when observed rates are at a boundary.

Why Boundary Counts Need Care

In a small basket, observing no responses or observing a response for every participant is possible even when the underlying response probability is not exactly zero or one. The raw proportion is then at a boundary: zero responses gives an observed rate of 0, and all responses gives an observed rate of 1. Those proportions describe the data, but they can be unstable estimates of the basket’s response probability, particularly when the sample is small.

A beta-binomial hierarchy can temper these extreme estimates by relating basket-specific response probabilities through a shared distribution. The amount and direction of that adjustment depend on the model’s assumptions and on information from other baskets. The calculation is not a rule that replaces a zero or one with a fixed correction; it follows from the prior distribution and the observed counts.

Model and Posterior at the Boundaries

Definition: For basket \(j\), let \(Y_j\) be the number of responses among \(n_j\) participants and let \(p_j\) be its response probability. The beta-binomial hierarchy specifies \(Y_j\mid p_j\sim\operatorname{Binomial}(n_j,p_j)\) and \(p_j\mid\alpha,\beta\sim\operatorname{Beta}(\alpha,\beta)\), where \(\alpha>0\) and \(\beta>0\). Conditional on \(\alpha,\beta\), basket outcomes are independent given their response probabilities. The common prior mean is \(m=\alpha/(\alpha+\beta)\), and its concentration is \(s=\alpha+\beta\).

This model assumes that participants within a basket have a common response probability and that the binomial sampling model is appropriate. Conditional on fixed \(\alpha,\beta\), the baskets share a prior distribution, not a single response probability. Thus, the model allows basket rates to differ. If \(\alpha,\beta\) are unknown, a hyperprior is required; data from other baskets can then inform them, and uncertainty about them should be carried into the target basket’s posterior.

For a basket with \(y_j\) responses, multiplying the binomial likelihood by the beta prior gives the conjugate posterior \(p_j\mid y_j,\alpha,\beta\sim\operatorname{Beta}(\alpha+y_j,\beta+n_j-y_j)\). Its posterior mean is the posterior estimate of the response probability under squared-error loss.

$$ E(p_j\mid y_j,\alpha,\beta) =\frac{\alpha+y_j}{\alpha+\beta+n_j} =\frac{s}{s+n_j}m+\frac{n_j}{s+n_j}\frac{y_j}{n_j}. $$

The last expression shows the weight structure: the prior mean receives weight \(s/(s+n_j)\), while the observed rate receives weight \(n_j/(s+n_j)\). At either boundary, this gives a finite posterior mean as long as \(\alpha\) and \(\beta\) are positive:

$$ y_j=0:\quad E(p_j\mid y_j,\alpha,\beta)=\frac{\alpha}{s+n_j}, \qquad y_j=n_j:\quad E(p_j\mid y_j,\alpha,\beta)=\frac{\alpha+n_j}{s+n_j}. $$

These are conditional results: they use specified values of \(\alpha,\beta\). If those parameters are estimated from other baskets, the estimate for basket \(j\) may move as the other baskets inform the shared distribution. If they are uncertain, the posterior mean must average over that uncertainty as well.

Worked Boundary-Count Calculations

Worked Example: Zero Responses in a Small Basket

Suppose a hypothetical basket has \(n_j=8\) participants and \(y_j=0\) responses. For illustration, condition on a \(\operatorname{Beta}(2,3)\) prior. Its mean is \(2/(2+3)=0.4\), and its concentration is \(s=5\).

The posterior distribution is \(\operatorname{Beta}(2+0,3+8)=\operatorname{Beta}(2,11)\). Therefore,

$$ E(p_j\mid y_j=0,\alpha=2,\beta=3) =\frac{2}{2+3+8} =\frac{2}{13} =0.1538. $$

The observed response rate is 0/8, or 0%, but the posterior mean is 15.38%. This estimate is pulled toward the prior mean of 40%; the eight participants still have substantial influence, so the posterior mean is far below 40%. The result does not claim that a response occurred in this basket. It estimates the underlying response probability under the stated model and prior.

Worked Example: Responses for Every Participant

Now suppose a different hypothetical basket has \(n_j=6\) participants, all of whom respond, so \(y_j=6\). Use the same \(\operatorname{Beta}(2,3)\) prior, with mean 0.4 and concentration 5.

The posterior is \(\operatorname{Beta}(2+6,3+0)=\operatorname{Beta}(8,3)\), and its mean is

$$ E(p_j\mid y_j=6,\alpha=2,\beta=3) =\frac{2+6}{2+3+6} =\frac{8}{11} =0.7273. $$

The raw response rate is 6/6, or 100%, while the posterior mean is 72.73%. The estimate is below 1 because the prior assigns positive probability to response probabilities below 1. The posterior remains compatible with a high response probability; the posterior mean simply avoids treating six responses as proof that the underlying probability is exactly one.

What “Borrowing” Means When Hyperparameters Are Uncertain

With fixed \(\alpha,\beta\), the posterior calculation for one basket uses its own count and the specified shared prior. The other baskets do not directly appear in that conditional formula. In a fully Bayesian hierarchy, however, the other baskets contribute information about the shared hyperparameters. The target basket’s posterior is then a mixture of beta posteriors over the posterior distribution of \(\alpha,\beta\).

$$ E(p_j\mid \mathbf{y}) = \int \frac{\alpha+y_j}{\alpha+\beta+n_j} \,\pi(\alpha,\beta\mid\mathbf{y})\,d\alpha\,d\beta. $$

Here \(\mathbf{y}\) denotes the counts from all baskets, and \(\pi(\alpha,\beta\mid\mathbf{y})\) is the posterior distribution of the shared hyperparameters. The target basket’s count also updates that distribution. Consequently, one cannot generally calculate the fully Bayesian answer by estimating \(\alpha,\beta\) from the other baskets alone and then treating those estimates as known. That plug-in calculation can be a useful approximation, but it omits hyperparameter uncertainty.

Worked Example: A Zero-Response Basket Updates Shared Hyperparameter Weights

Consider a hypothetical two-component model for the shared prior, with concentration \(s=5\). After observing other baskets, suppose the posterior probability is 0.75 for a prior \(\operatorname{Beta}(1,4)\) and 0.25 for a prior \(\operatorname{Beta}(3,2)\). The corresponding prior means are 0.2 and 0.6. Now observe a target basket with \(n_j=4\) and \(y_j=0\). The target count must update the component probabilities.

Under \(\operatorname{Beta}(1,4)\), the probability of zero responses in four participants is

$$ P(Y_j=0\mid\alpha=1,\beta=4) =\frac{B(1,8)}{B(1,4)} =\frac{4\cdot5\cdot6\cdot7}{5\cdot6\cdot7\cdot8} =\frac{1}{2}. $$

Under \(\operatorname{Beta}(3,2)\), that probability is

$$ P(Y_j=0\mid\alpha=3,\beta=2) =\frac{B(3,6)}{B(3,2)} =\frac{2\cdot3\cdot4\cdot5}{5\cdot6\cdot7\cdot8} =\frac{1}{14}. $$

Weighting these likelihoods by the probabilities from the other baskets gives unnormalized weights \(0.75(1/2)=0.375\) and \(0.25(1/14)=0.017857\). After normalization, the component probabilities are \(21/22=0.9545\) and \(1/22=0.04545\). The zero count makes the lower-mean component more plausible.

The conditional posterior means for the target basket are \(1/(5+4)=1/9\) under the first component and \(3/(5+4)=1/3\) under the second. Averaging with the updated weights gives

$$ E(p_j\mid \mathbf{y}) =\frac{21}{22}\frac{1}{9}+\frac{1}{22}\frac{1}{3} =\frac{4}{33} =0.1212. $$

This example isolates two parts of borrowing: information from other baskets sets the pre-target component weights, and the target’s zero count updates those weights as well as its conditional posterior. A different hyperprior or different data from other baskets could produce a different estimate.

Derivation and the Boundary Likelihood

The posterior calculation follows directly from the likelihood. For observed count \(y_j\), the likelihood as a function of \(p_j\) is proportional to \(p_j^{y_j}(1-p_j)^{n_j-y_j}\). Multiplying by the beta density, proportional to \(p_j^{\alpha-1}(1-p_j)^{\beta-1}\), adds the exponents:

$$ p_j^{y_j}(1-p_j)^{n_j-y_j} p_j^{\alpha-1}(1-p_j)^{\beta-1} \ \propto\ p_j^{\alpha+y_j-1}(1-p_j)^{\beta+n_j-y_j-1}. $$

These are the exponents of a \(\operatorname{Beta}(\alpha+y_j,\beta+n_j-y_j)\) density. At zero responses, the likelihood is proportional to \((1-p_j)^{n_j}\); at all responses, it is proportional to \(p_j^{n_j}\). Each likelihood favors a boundary, but a proper beta prior with positive parameters yields a proper posterior with finite parameters. For a zero count, the posterior has positive first shape parameter \(\alpha\); for an all-response count, it has positive second shape parameter \(\beta\).

The beta-binomial marginal likelihood also makes explicit how a basket informs the shared parameters:

$$ P(Y_j=y_j\mid\alpha,\beta) =\binom{n_j}{y_j} \frac{B(\alpha+y_j,\beta+n_j-y_j)}{B(\alpha,\beta)}. $$

For zero responses this reduces to \(B(\alpha,\beta+n_j)/B(\alpha,\beta)\); for all responses it is \(B(\alpha+n_j,\beta)/B(\alpha,\beta)\). These probabilities enter the posterior update of the hyperparameters. They do not mean that every basket’s observed responses are simply pooled into one binomial count.

Comparisons, Diagnostics, and Limitations

ApproachBoundary-count behaviorMain trade-off
Independent basket with a beta priorA zero or all-response count yields a finite posterior mean.No learning across baskets unless the prior itself is externally informed.
Beta-binomial hierarchyProduces finite basket-specific estimates and can adapt the shared distribution using all basket data.Results depend on the exchangeability assumption and hyperprior; sparse data can leave hyperparameters uncertain.
Complete poolingUses a common response rate, so an individual basket’s estimate is the pooled rate.Can conceal genuine differences between baskets by assuming there is no basket-level variation.

The hierarchy is most useful when partial sharing is clinically and statistically defensible: baskets are sufficiently comparable to inform a shared distribution, but their response probabilities need not be identical. Exchangeability is an assumption about the model’s treatment of baskets, not a guarantee that their biology or treatment effects are the same.

A few checks help identify fragile boundary estimates. First, inspect the posterior distribution, not only its mean: at small sample sizes, uncertainty may remain wide even when the mean is pulled away from zero or one. Second, examine how the estimate changes under plausible hyperprior choices and under an analysis with little or no borrowing. A large change signals that conclusions rely strongly on the sharing assumptions. Third, check whether the shared distribution is plausible in light of the basket-level response patterns. If baskets show patterns inconsistent with a common distribution, borrowing may be misleading. Finally, distinguish the conditional posterior at fixed hyperparameters from the fully Bayesian posterior that integrates their uncertainty.

A frequent mistake is to say, “This basket had zero responses, so its response probability is zero,” or, conversely, “The prior prevents zero, so the basket must have a positive response rate.” The first statement confuses a sample proportion with an unknown probability; the second treats a prior assumption as observed evidence. The correction is to report the observed count and rate, then describe the posterior estimate and uncertainty under the stated model. A posterior mean above zero does not establish that responses will occur, and borrowing does not remove the need to assess model fit and clinical relevance.

Key takeaway: With a proper beta prior, zero and all-response counts lead to finite posterior means: \(\alpha/(\alpha+\beta+n_j)\) and \((\alpha+n_j)/(\alpha+\beta+n_j)\). In a hierarchy, the amount of borrowing also depends on how the shared hyperparameters are learned and how their uncertainty is handled.

Check Your Understanding

Answer each question using the stated model. Short solutions follow the questions.

  1. A hypothetical basket has \(n_j=5\), \(y_j=0\), and a \(\operatorname{Beta}(1,1)\) prior. What is the posterior distribution and posterior mean?
  2. With a \(\operatorname{Beta}(2,2)\) prior, what is the posterior mean for a basket with \(n_j=4\) and \(y_j=4\)?
  3. For a fixed \(\operatorname{Beta}(\alpha,\beta)\) prior, explain why the posterior mean for a zero-response basket is positive when \(\alpha>0\).
  4. Why might a fully Bayesian estimate differ from a calculation that fixes \(\alpha,\beta\) at estimates obtained from other baskets?
  5. What assumption is made by complete pooling that differs from the beta-binomial hierarchy?

Solutions. 1. The posterior is \(\operatorname{Beta}(1,6)\), with mean \(1/(1+6)=1/7=0.1429\). 2. The posterior is \(\operatorname{Beta}(6,2)\), with mean \(6/(6+2)=0.75\). 3. The mean is \(\alpha/(\alpha+\beta+n_j)\); its numerator is positive and its denominator is positive, so the mean is positive. 4. The fully Bayesian calculation averages over the posterior distribution of \(\alpha,\beta\), including its uncertainty; fixing them at estimates omits that uncertainty and may also fail to account for the target basket’s contribution to their posterior. 5. Complete pooling assumes all baskets share one response probability, whereas the hierarchy allows basket-specific probabilities drawn from a shared distribution.

Clinical Biostats