Tutorials › Bayesian Clinical Trials › Posterior Subgroup Response Rates Under Beta-Binomial Borrowing

Hierarchical Models and Basket Trials · Tutorial 458 of 696

Posterior Subgroup Response Rates Under Beta-Binomial Borrowing

Learn to calculate and interpret beta-binomial posterior response rates, including how shared prior hyperparameters pull subgroup estimates toward a common mean.

Advanced 11 min read

What You'll Learn

  • Write the beta-binomial model for subgroup response counts and identify its exchangeability assumption.
  • Calculate each subgroup’s posterior distribution, mean, and variance from its response count.
  • Express the posterior mean as a weighted combination of the observed rate and shared prior mean.
  • Explain how subgroup size and prior concentration affect the amount of borrowing.
  • Distinguish fixed shared hyperparameters from uncertain hyperparameters and recognize key diagnostics and limitations.

Why Subgroup Estimates Borrow Information

In a basket trial, each subgroup has its own response probability, but the subgroups may be similar enough that estimating every response rate in isolation wastes information. A beta-binomial hierarchy represents this possibility: each subgroup has a distinct response probability, and those probabilities share a common beta distribution. The resulting estimate for a subgroup is pulled toward the distribution’s mean, with the amount of pull depending on the subgroup’s data and the strength of that shared prior.

The calculation is simple when the shared hyperparameters are fixed. The interpretation requires care: borrowing is a consequence of the exchangeability assumption and the chosen hyperparameters, not proof that the subgroup response rates are equal. The introductory material on beta-binomial hierarchies establishes this model; here the emphasis is on calculating and interpreting the subgroup posteriors.

Definition: For subgroup \(j\), let \(n_j\) be the number of participants with an observed response outcome, \(y_j\) the number who respond, and \(p_j\) the subgroup response probability. The beta-binomial model with fixed shared hyperparameters \(a>0\) and \(b>0\) is $$ y_j\mid p_j \sim \operatorname{Binomial}(n_j,p_j), \qquad p_j\mid a,b \sim \operatorname{Beta}(a,b). $$ The model treats subgroup response probabilities as exchangeable: before seeing subgroup-specific outcomes, they have the same distribution. This does not require their realized values to be identical.

Subgroup Posterior Calculation

For a subgroup with \(y_j\) responses among \(n_j\) participants, the binomial likelihood is proportional to \(p_j^{y_j}(1-p_j)^{n_j-y_j}\). Multiplying by the beta prior density gives a posterior density proportional to \(p_j^{a+y_j-1}(1-p_j)^{b+n_j-y_j-1}\), which is the kernel of a beta distribution.

$$ p_j\mid y_j,n_j,a,b \sim \operatorname{Beta}(a+y_j,\ b+n_j-y_j). $$

Thus, \(a+y_j\) is the posterior first shape parameter and \(b+n_j-y_j\) is the second. The posterior mean and variance are

$$ E(p_j\mid y_j,n_j,a,b)=\frac{a+y_j}{a+b+n_j}, \qquad \operatorname{Var}(p_j\mid y_j,n_j,a,b) =\frac{(a+y_j)(b+n_j-y_j)} {(a+b+n_j)^2(a+b+n_j+1)}. $$

The posterior mean is often a useful summary of the subgroup response rate. A credible interval is obtained from the corresponding beta posterior quantiles. For example, an equal-tailed 95% credible interval has endpoints at the 2.5th and 97.5th percentiles of \(\operatorname{Beta}(a+y_j,b+n_j-y_j)\). It is a posterior probability statement conditional on the model and data, not a guarantee about the unknown rate.

How the Shared Prior Produces Shrinkage

Write \(m=a/(a+b)\) for the prior mean and \(k=a+b\) for its concentration. Here \(m\) is the common center toward which subgroup estimates are pulled, while larger \(k\) means a more concentrated prior around that center. When \(n_j>0\), let \(\hat p_j=y_j/n_j\) denote the observed response proportion. Rearranging the posterior mean gives

$$ \frac{a+y_j}{a+b+n_j} =\frac{k}{k+n_j}m+\frac{n_j}{k+n_j}\hat p_j. $$

This identity shows that the posterior mean is a weighted average of the prior mean and the observed proportion. The weight on the observed proportion is \(n_j/(k+n_j)\); the weight on the prior mean is \(k/(k+n_j)\). More subgroup observations make the data weight larger. A more concentrated shared prior makes the prior weight larger. If \(n_j=0\), the posterior remains the prior and the subgroup has no observed rate to contribute.

Justification: Since \(y_j=n_j\hat p_j\), the posterior mean can be written as $$ \frac{a+y_j}{a+b+n_j} =\frac{km+n_j\hat p_j}{k+n_j} =\frac{k}{k+n_j}m+\frac{n_j}{k+n_j}\hat p_j. $$ The two weights are nonnegative and sum to one. Therefore the posterior mean lies between \(m\) and \(\hat p_j\), unless they are equal. This is the precise sense in which the posterior mean is shrunk toward the shared prior mean.

Worked Calculations

Worked Example: Two Subgroups Under a Uniform Prior

Suppose two hypothetical subgroups have response counts \(8\) of \(12\) and \(2\) of \(10\). Use a shared \(\operatorname{Beta}(1,1)\) prior, whose mean is \(1/(1+1)=0.5\), and calculate both posterior means.

For subgroup 1, the posterior is \(\operatorname{Beta}(1+8,1+12-8)=\operatorname{Beta}(9,5)\). Its posterior mean is \(9/(9+5)=9/14=0.6429\). The observed proportion was \(8/12=0.6667\), so the posterior mean is slightly closer to 0.5.

For subgroup 2, the posterior is \(\operatorname{Beta}(1+2,1+10-2)=\operatorname{Beta}(3,9)\). Its posterior mean is \(3/(3+9)=3/12=0.2500\), compared with the observed proportion \(2/10=0.2000\). It too is moved toward 0.5. The two posterior estimates remain different; the model does not force the subgroups to have one common response rate.

Worked Example: Subgroup Size and Prior Concentration

Use the shared prior \(\operatorname{Beta}(2,8)\), with mean \(m=0.2\) and concentration \(k=10\). In one hypothetical subgroup, \(1\) of \(4\) participants responds; in another, \(10\) of \(20\) respond. Calculate each posterior mean and check it using the weighting formula.

For the first subgroup, the posterior is \(\operatorname{Beta}(3,11)\), so its mean is \(3/14=0.2143\). The weighting formula gives \(0.2+(4/14)(0.25-0.2)=0.2143\). Only \(4/14\) of the posterior-mean weight is on the observed proportion, so the estimate stays close to the prior mean.

For the second subgroup, the posterior is \(\operatorname{Beta}(12,18)\), so its mean is \(12/30=0.4000\). Equivalently, \(0.2+(20/30)(0.5-0.2)=0.4000\). This subgroup has more observations, so its posterior mean moves further from the prior mean and toward its observed rate.

Worked Example: Interpreting Several Shrunk Estimates

Suppose a hypothetical basket trial uses a fixed shared \(\operatorname{Beta}(3,7)\) prior, with mean \(0.3\) and concentration \(10\). The response counts are \(0\) of \(3\), \(9\) of \(12\), and \(4\) of \(8\) in subgroups A, B, and C. Find the posterior mean in each subgroup.

For A, the posterior is \(\operatorname{Beta}(3,10)\), giving mean \(3/13=0.2308\). Its observed proportion is \(0\), but the small sample gives the prior mean a weight of \(10/13\).

For B, the posterior is \(\operatorname{Beta}(12,10)\), giving mean \(12/22=0.5455\). The observed proportion is \(9/12=0.75\), and the data weight is \(12/22\). For C, the posterior is \(\operatorname{Beta}(7,11)\), giving mean \(7/18=0.3889\); its observed proportion is \(0.5\), and its data weight is \(8/18\).

All three posterior means are pulled toward 0.3, but by different amounts. The first estimate is particularly influenced by the shared prior because its subgroup has only three observations. The estimates are still subgroup-specific, and the calculation alone does not establish that the exchangeability assumption is adequate.

Assumptions, Diagnostics, and Alternatives

The conjugate calculation is exact under the stated model, but its clinical interpretation depends on the design and assumptions. The response outcome must be defined consistently across subgroups. Within each subgroup, outcomes are modeled as conditionally independent Bernoulli responses with a common probability \(p_j\), giving a binomial count. The shared beta distribution asserts that the subgroup probabilities are exchangeable before observing their subgroup-specific counts. For the formulas above, \(a\) and \(b\) are treated as fixed and common across subgroups.

A useful first check is to compare the observed subgroup proportions with the shared prior mean and with their posterior means. Large, systematic differences can indicate that a single shared beta distribution is an inadequate description. Examine whether subgroup definitions, follow-up, eligibility, and response assessment are genuinely comparable. A sensitivity analysis can recompute estimates under reasonable alternative values of \(a\) and \(b\), especially for small subgroups. If conclusions change materially, report that sensitivity rather than presenting one prior specification as definitive.

When \(a,b\) are uncertain and assigned a hyperprior, the conditional beta posterior formula still applies for each given pair of hyperparameter values. The marginal posterior for \(p_j\), however, averages those conditional beta distributions over the posterior distribution of \(a,b\); it is generally a mixture, not simply one beta distribution obtained by plugging in a single estimate. Consequently, a reported plug-in posterior mean or interval does not include uncertainty about the hyperparameters.

The main alternatives clarify what borrowing does. Complete pooling assigns one response probability to all subgroups, so every subgroup estimate is the same and subgroup-specific differences are not retained. No pooling estimates each subgroup independently; it avoids borrowing but can be imprecise for small counts. The beta-binomial model is partial pooling: it retains distinct \(p_j\) values while drawing sparse subgroup estimates toward a shared distribution. That compromise is useful only when the common exchangeability assumption is clinically defensible.

Common mistake: “The shared prior means all subgroup rates are equal, so I should report the pooled response proportion for every subgroup.” This confuses exchangeability with equality. Under the beta-binomial model, each subgroup has its own \(p_j\); the posterior means differ when their data differ. The shared prior induces shrinkage, not forced pooling.

A second mistake is to interpret \(a\) and \(b\) as observed pseudo-patients without qualification. Their algebraic contribution resembles adding \(a\) response counts and \(b\) nonresponse counts, but the prior is a probability distribution, not necessarily literal historical patients. Its center and concentration encode modeling assumptions. Also, shrinkage does not repair incompatible outcome measurement or guarantee that a subgroup with unusual response behavior is well represented by the common distribution.

Check Your Understanding

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

  1. With a \(\operatorname{Beta}(2,6)\) prior, a subgroup has \(3\) responses among \(8\) participants. What is its posterior distribution and posterior mean?
  2. For that prior, what are the prior mean and concentration? What fraction of the posterior-mean weight is on the observed proportion when \(n_j=8\)?
  3. A subgroup has \(0\) responses among \(5\) participants under a \(\operatorname{Beta}(1,1)\) prior. Calculate its posterior mean and explain why it is not zero.
  4. What does a larger value of \(a+b\) do to the posterior mean when the prior mean is held fixed?
  5. Does a shared beta prior require identical subgroup response probabilities? Explain.

Solutions. (1) The posterior is \(\operatorname{Beta}(2+3,6+8-3)=\operatorname{Beta}(5,11)\), with mean \(5/16=0.3125\). (2) The prior mean is \(2/8=0.25\), and the concentration is \(2+6=8\). The data weight is \(n_j/(k+n_j)=8/(8+8)=0.5\). (3) The posterior is \(\operatorname{Beta}(1,6)\), with mean \(1/7=0.1429\). The observed proportion is zero, but the prior contributes positive mass to response probabilities above zero. (4) At fixed prior mean and fixed data, increasing concentration increases the weight \(k/(k+n_j)\) on that prior mean, so the posterior mean moves closer to it. (5) No. The model gives distinct subgroup probabilities drawn from a common distribution; it encourages partial pooling but does not set the probabilities equal.

Clinical Biostats