Tutorials › Bayesian Clinical Trials › Boundary Mass From Extreme Binary Priors

Prior Predictive Checks · Tutorial 78 of 696

Boundary Mass From Extreme Binary Priors

Learn to calculate and interpret the prior predictive probability of an all-zero or all-event trial under a beta prior, and to diagnose when those outcomes are implausibly common.

Intermediate 11 min read

What You'll Learn

  • Derive the prior predictive probabilities of zero events and events in every participant under a beta-binomial model.
  • Distinguish predictive probability at a count boundary from a prior point mass at a boundary value of the event probability.
  • Assess how beta-prior shape and trial size affect the probability of all-zero or all-event outcomes.
  • Interpret asymmetric boundary probabilities in a clinical trial context.
  • Identify diagnostic warning signs and compare exact calculations with simulation-based checks.
  • Evaluate whether a boundary-heavy prediction is compatible with clinical knowledge and the trial design.

Why Boundary Outcomes Deserve a Separate Check

For a binary endpoint, the event count can range from zero to the number of participants. The counts at the two extremes—no events and an event for everyone—are especially easy to overlook when checking a prior. A prior may have a clinically plausible mean event rate and still assign substantial predictive probability to one or both of these outcomes. In a trial, that can imply that an empty event count or a universal event count is not unusual before any data have been observed.

Here, boundary probability means the prior predictive probability of observing one of those extreme counts. It does not mean that the prior assigns probability to the event rate being exactly zero or exactly one. That distinction matters: a beta distribution with positive parameters is continuous on the interval from zero to one, yet it can still predict all-zero or all-event data with appreciable probability.

Definition: Suppose \(K\) is the number of participants with the event among \(n\) participants, and the common event probability \(p\) has a Beta(\(a,b\)) prior, with \(a>0\) and \(b>0\). The all-zero boundary probability is \(P(K=0)\); the all-event boundary probability is \(P(K=n)\). Their sum, \(P(K=0)+P(K=n)\), is the predictive probability of either boundary outcome. For \(n>0\), these are disjoint outcomes.

Model and Exact Boundary Probabilities

The calculation assumes a fixed trial size \(n\), a single event probability \(p\) shared by all participants, and conditionally independent Bernoulli outcomes given \(p\). The prior is \(p\sim\text{Beta}(a,b)\). Thus \(K\mid p\sim\text{Binomial}(n,p)\). These assumptions are important: changing the trial size, introducing variation in event probabilities across participants, or using a different sampling structure changes the predictive calculation.

Under this model, the probability of no events conditional on \(p\) is \((1-p)^n\). Averaging over the prior gives the prior predictive probability. Similarly, the conditional probability of an event for every participant is \(p^n\). With the beta density and beta function \(B(\cdot,\cdot)\), these integrals can be written as ratios of beta functions.

$$ \begin{aligned} P(K=0) &=\int_0^1 (1-p)^n \frac{p^{a-1}(1-p)^{b-1}}{B(a,b)}\,dp =\frac{B(a,b+n)}{B(a,b)} =\frac{(b)_n}{(a+b)_n},\\ P(K=n) &=\int_0^1 p^n \frac{p^{a-1}(1-p)^{b-1}}{B(a,b)}\,dp =\frac{B(a+n,b)}{B(a,b)} =\frac{(a)_n}{(a+b)_n}. \end{aligned} $$

Here \((x)_n=x(x+1)\cdots(x+n-1)\) is the rising factorial. These expressions follow by combining the powers of \(p\) and \(1-p\) in each integrand, then applying the beta-function integral. In particular, the all-zero probability has \(b\) in its numerator because no events are more likely at smaller values of \(p\); the all-event probability has \(a\) because it is more likely at larger values of \(p\).

The formula also makes the role of symmetry clear. If \(a=b\), the two boundary probabilities are equal. If \(a\) and \(b\) differ, the probabilities need not be equal: a prior favoring low event rates generally raises \(P(K=0)\) relative to \(P(K=n)\). The probability of either boundary is their sum, not twice one of them unless the prior is symmetric.

Interpretation: \(P(K=0)\) is the probability, before observing trial outcomes and averaging over uncertainty in \(p\), that all \(n\) participants have no event. It is not the probability that \(p=0\), nor the probability that the event is impossible.

Worked Boundary Checks

Worked Example: A Symmetric Prior With Moderate Boundary Probability

Suppose a hypothetical trial plans to observe \(n=8\) participants for a binary endpoint, and the prior is \(p\sim\text{Beta}(2,2)\). Calculate both boundary probabilities and their sum.

Because \(a=b=2\), the two extreme outcomes have equal probability. For all zero events,

$$ \begin{aligned} P(K=0) &=\frac{(2)_8}{(4)_8} =\prod_{j=0}^{7}\frac{2+j}{4+j}\\ &=\frac{2}{4}\frac{3}{5}\frac{4}{6}\frac{5}{7} \frac{6}{8}\frac{7}{9}\frac{8}{10}\frac{9}{11} =\frac{3}{55} \approx 0.05455. \end{aligned} $$

By symmetry, \(P(K=8)=3/55\approx0.05455\). Therefore,

$$ P(K=0\text{ or }K=8)=\frac{3}{55}+\frac{3}{55} =\frac{6}{55}\approx0.1091. $$

Under this model, the hypothetical trial has about an 10.91% prior predictive probability of observing either no events or events in all eight participants. Whether that is acceptable depends on the endpoint and clinical context; the calculation itself is a diagnostic, not a decision rule.

Worked Example: A Prior Favoring a Low Event Rate

Consider a hypothetical 10-participant trial with \(p\sim\text{Beta}(1,19)\). This prior has mean \(1/(1+19)=0.05\), so it favors low event rates. Calculate the probabilities of no events, events in all participants, and either boundary outcome.

For no events, the rising-factorial ratio telescopes:

$$ P(K=0)=\frac{(19)_{10}}{(20)_{10}} =\frac{19}{29} \approx0.6551724. $$

For events in all 10 participants,

$$ P(K=10)=\frac{(1)_{10}}{(20)_{10}} =\frac{10!}{20\cdot21\cdots29} =\frac{1}{\binom{29}{10}} =\frac{1}{20{,}030{,}010} \approx 0.00000004993. $$

Thus the combined boundary probability is

$$ P(K=0\text{ or }K=10) =\frac{19}{29}+\frac{1}{20{,}030{,}010} \approx0.65517246, $$

or about 65.52%. The two boundary probabilities are extremely unequal. This is consistent with a prior concentrated toward low event rates: no events are common, while events in every participant are extraordinarily unlikely. A high all-zero probability is not automatically a defect, but it should agree with the intended clinical prior knowledge and the planned sample size.

Worked Example: A U-Shaped Prior and Both Extremes

For a hypothetical trial with \(n=4\), suppose \(p\sim\text{Beta}(0.5,0.5)\). The prior is symmetric and U-shaped, placing more density near zero and one than near the center. Calculate the boundary probabilities.

For all-zero outcomes,

$$ \begin{aligned} P(K=0) &=\frac{(0.5)_4}{(1)_4}\\ &=\frac{0.5\cdot1.5\cdot2.5\cdot3.5}{1\cdot2\cdot3\cdot4} =\frac{6.5625}{24} =\frac{35}{128} =0.2734375. \end{aligned} $$

Symmetry gives \(P(K=4)=35/128=0.2734375\). Consequently,

$$ P(K=0\text{ or }K=4)=\frac{70}{128} =\frac{35}{64} =0.546875. $$

The prior mean event probability is \(0.5\), but the probability of either extreme count is about 54.69%. A mean alone would conceal this feature. The example illustrates why a prior predictive check should examine the count distribution, not only the prior mean.

Why the Shape of the Prior Matters

The beta prior's parameters affect both its center and its concentration. Its mean is \(a/(a+b)\), while its total concentration is \(a+b\). For a fixed mean, smaller total concentration can allow more prior weight near the extremes of the interval; larger concentration typically concentrates \(p\) more closely around its mean. The boundary formulas show how that shape becomes a probability of extreme trial data after integrating over \(p\).

A beta density with \(a<1\) or \(b<1\) can diverge near an endpoint, but it remains a continuous distribution when both parameters are positive. The probability of the single value \(p=0\), or \(p=1\), is still zero. Yet if the prior places substantial density near zero, a finite sample can readily produce \(K=0\); if it places substantial density near one, \(K=n\) can be common. Predictive boundary probability is therefore about the data distribution, not literal prior point mass.

The dependence on \(n\) should also be interpreted carefully. A larger trial generally makes an all-zero result less likely for a fixed event rate bounded away from zero. But the prior predictive probability averages over rates arbitrarily close to zero, and its change with \(n\) is governed by the full prior distribution. Use the formula at the planned sample size rather than extrapolating from intuition alone.

Diagnostics, Failure Modes, and Alternatives

A useful check starts with the clinical interpretation of both extremes. Ask whether it would be reasonable, before seeing data, for a trial of this size to have no events, or for every participant to experience the event. If either probability seems surprisingly large, inspect the prior shape and its event-rate implications, as well as the assumed sample size and outcome model. Compare the calculated probabilities with clinical knowledge and with the prior elicitation rationale.

The exact formula is also a check on simulation. Simulate \(p\) from the beta prior, then simulate \(K\) conditionally from a binomial distribution, repeating the process many times. The fraction of replicates with \(K=0\) should be close to \((b)_n/(a+b)_n\); the fraction with \(K=n\) should be close to \((a)_n/(a+b)_n\). Large discrepancies suggest an implementation error, such as reversing the beta parameters, using the wrong sample size, or simulating outcomes without first drawing a shared \(p\).

Exact calculation and simulation serve related but different purposes. The formula gives an accurate boundary probability directly under the stated model. Simulation can show the whole predictive distribution and help check more complicated models, but its estimates have Monte Carlo error, especially for very rare all-event outcomes. Neither approach establishes that the model is clinically appropriate: both calculate consequences of the assumptions supplied.

A common failure is to check only the prior mean. For example, the Beta(0.5,0.5) prior in the worked example has mean 0.5, but over half of the prior predictive probability is on the two extreme counts in a four-person trial. The correction is to examine predictive outcomes, including boundary counts, rather than treating a plausible mean as sufficient evidence of a plausible prior.

Another failure is to call \(P(K=0)\) a prior probability that the event rate is zero. The correct reasoning integrates \((1-p)^n\) across possible event rates: many small but positive values of \(p\) can make a zero count plausible. A prior with an actual point mass at \(p=0\) is a different model and requires an additional mixture component; the continuous beta formulas alone do not describe that model.

The principal alternative to this exact diagnostic is a broader prior predictive check using simulated trial replicates or the complete beta-binomial count distribution. That broader view can reveal implausible interior counts as well as boundary counts. The focused boundary calculation is valuable because it is transparent and easy to audit, but it is not a substitute for checking the rest of the predictive distribution, design assumptions, or endpoint constraints.

Key takeaway: Under a shared beta-binomial model, calculate \(P(K=0)=(b)_n/(a+b)_n\) and \(P(K=n)=(a)_n/(a+b)_n\) separately. Their magnitudes and asymmetry reveal whether the prior makes extreme trial outcomes unexpectedly common.

Check Your Understanding

Answer each question using the beta-binomial assumptions stated above. Complete solutions follow the questions.

  1. For \(p\sim\text{Beta}(3,3)\) and \(n=2\), what are \(P(K=0)\), \(P(K=2)\), and the probability of either boundary?
  2. For \(p\sim\text{Beta}(2,8)\) and \(n=1\), calculate the two boundary probabilities. Which one is larger, and why?
  3. Does a continuous Beta(\(a,b\)) prior with positive parameters assign positive probability to \(p=0\)? Explain how \(P(K=0)\) can nevertheless be positive.
  4. A reviewer says that a prior is safe because its mean event rate is clinically plausible. What additional diagnostic is needed for this tutorial's topic?
  5. Why can simulation be less reliable than the exact formula for estimating a very small all-event probability?

Solutions. (1) \(P(K=0)=(3)_2/(6)_2=(3\cdot4)/(6\cdot7)=2/7\), and symmetry gives \(P(K=2)=2/7\). Their sum is \(4/7\approx0.5714\). (2) \(P(K=0)=8/10=0.8\) and \(P(K=1)=2/10=0.2\); the all-zero outcome is more likely because the prior favors lower event rates. (3) No. A continuous beta prior assigns probability zero to any single value, including zero. But \(P(K=0)=E[(1-p)^n]\) is positive because \((1-p)^n\) is positive for \(0<p<1\). (4) Calculate and assess both all-zero and all-event prior predictive probabilities at the planned sample size; a plausible mean alone does not describe the predictive shape. (5) If the outcome is rare, a finite number of simulated replicates may contain few or no such outcomes, producing a noisy estimate; the exact formula has no Monte Carlo error under the model.

Clinical Biostats