Why Predict the Two Arm Counts Together?
Before a trial begins, the treatment and control event counts are unknown both because the arm-specific event probabilities are uncertain and because individual outcomes vary even if those probabilities were known. A prior predictive check combines these sources of uncertainty to describe the event counts the proposed model could generate. Looking at the two counts jointly is useful: it checks whether the model and planned arm sizes yield plausible count patterns in both arms, rather than checking each arm in isolation.
The focus here is the joint distribution of the counts when the arm-specific event probabilities have independent priors. Independence is a modeling assumption about prior uncertainty, not a consequence of randomization by itself. The calculation also requires an appropriate sampling model for the binary outcomes.
Each beta distribution has positive shape parameters. Its density on \(0<p<1\) is proportional to \(p^{a-1}(1-p)^{b-1}\), and its mean is \(a/(a+b)\). The binomial model assumes a common event probability within each arm and conditionally independent binary outcomes. The arm sizes are treated as fixed; if they are not fixed, the allocation process must also be included in the predictive model. The independent priors assert that knowing one arm’s event probability does not change the prior distribution for the other arm’s probability.
From Arm-Specific Predictions to the Joint Distribution
For one arm with \(p\sim\operatorname{Beta}(a,b)\) and \(Y\mid p\sim\operatorname{Binomial}(n,p)\), averaging over \(p\) gives the beta-binomial predictive probability:
Here \(B(a,b)=\int_0^1p^{a-1}(1-p)^{b-1}\,dp\) is the beta function. The integral follows by collecting the powers of \(p\) and \(1-p\): the integrand’s beta-kernel exponents become \(a+y-1\) and \(b+n-y-1\). Thus the integral is \(B(a+y,b+n-y)\), multiplied by the binomial coefficient and divided by the prior normalizing constant \(B(a,b)\).
With separate priors and conditionally independent arm outcomes, the joint predictive probability is the product of the two arm-specific beta-binomial probabilities:
The factorization can be justified directly. Conditional on the probabilities, the joint likelihood is the product of the two binomial probabilities. The joint prior density is also a product because the priors are independent. Integrating their product over \(p_T\) and \(p_C\) therefore separates into one integral for each arm. Consequently, the two counts are marginally independent under this model. This conclusion would not generally hold if the arm probabilities had a dependent joint prior or if the sampling model linked outcomes across arms.
Worked Example: Expected Counts and Predictive Spread
Suppose a hypothetical trial plans 20 participants in each arm. Elicit \(p_T\sim\operatorname{Beta}(2,8)\) and \(p_C\sim\operatorname{Beta}(3,7)\), independently, and use the binomial sampling model above. Find the prior predictive mean and variance of each event count.
For a beta-binomial count, the mean is \(E(Y)=n a/(a+b)\), and the variance is \(n ab(a+b+n)/\{(a+b)^2(a+b+1)\}\). The mean follows from \(E(Y\mid p)=np\). The variance includes both binomial sampling variation and uncertainty in \(p\).
For treatment, the prior mean event probability is \(2/(2+8)=0.2000\), so \(E(Y_T)=20(0.2000)=4.000\) events. Its predictive variance is \(20(2)(8)(10+20)/\{10^2(11)\}=9600/1100=8.727\) events squared.
For control, the prior mean event probability is \(3/(3+7)=0.3000\), so \(E(Y_C)=20(0.3000)=6.000\) events. Its predictive variance is \(20(3)(7)(10+20)/\{10^2(11)\}=12600/1100=11.45\) events squared. These are predictive summaries, not guarantees about a realized trial. Under the independent-prior model, the covariance between the two counts is zero.
The standard deviations are about 2.954 treatment events and 3.384 control events, obtained by taking the square roots of the predictive variances. They describe the marginal predictive spread; they do not imply that all counts within one standard deviation are equally likely.
Joint Probabilities and a Simulation Check
The product formula gives probabilities for exact count pairs and for broader count events. For a set of pairs \(A\), its predictive probability is the sum of the joint probabilities over all pairs in \(A\). Since the support is finite, exact summation is often practical for modest arm sizes. Simulation is useful when the event of interest is more complicated, the model is extended, or the aim is to inspect many replicate-level summaries.
Worked Example: Probability of a Particular Pair of Counts
For a hypothetical trial, let \(n_T=4\), \(p_T\sim\operatorname{Beta}(2,3)\), \(n_C=3\), and \(p_C\sim\operatorname{Beta}(1,2)\), with independent priors. Calculate the probability of exactly one treatment event and no control events.
For treatment, the beta-binomial probability is \({4\choose1}B(3,6)/B(2,3)\). For positive integer arguments, \(B(r,s)=(r-1)!(s-1)!/(r+s-1)!\), so \(B(3,6)=1/168\) and \(B(2,3)=1/12\). Therefore, \(P(Y_T=1)=4(1/168)/(1/12)=4/14=2/7\).
For control, the probability of zero events is \({3\choose0}B(1,5)/B(1,2)\). Since \(B(1,5)=1/5\) and \(B(1,2)=1/2\), this is \(2/5\). Independence gives \(P(Y_T=1,Y_C=0)=(2/7)(2/5)=4/35=0.1143\).
Thus, under the stated model, about 11.43% of prior predictive trial replicates have exactly this pair of counts. This is a probability of a count pattern under the specified prior and sampling model; it is not a probability that the model is true.
Worked Example: Simulating a Joint Count Event
Suppose \(n_T=4\) and \(n_C=6\), and both event probabilities have independent \(\operatorname{Beta}(1,1)\) priors. Find the probability that \(1\leq Y_T\leq3\) and \(0\leq Y_C\leq2\), then describe a simulation check.
With a \(\operatorname{Beta}(1,1)\) prior, the beta-binomial probability of each possible count \(y=0,\ldots,n\) is \(1/(n+1)\). Therefore \(P(1\leq Y_T\leq3)=3/5\), and \(P(0\leq Y_C\leq2)=3/7\). The joint probability is \((3/5)(3/7)=9/35=0.2571\).
To simulate, repeat the following for each replicate: draw \(p_T\) and \(p_C\) independently from their beta priors; draw \(Y_T\) from a binomial distribution with size 4 and probability \(p_T\); draw \(Y_C\) from a binomial distribution with size 6 and probability \(p_C\); then record whether both count conditions hold. For 10,000 hypothetical replicates, suppose 2,590 satisfy both conditions. The estimated probability is \(2590/10000=0.2590\). Its approximate Monte Carlo standard error is \(\sqrt{0.2590(1-0.2590)/10000}=0.00438\), so this simulation result is consistent with the exact probability 0.2571. A different random run would give a somewhat different estimate.
Assumptions, Diagnostics, and Alternatives
The calculation is appropriate only when its assumptions match the proposed trial model. Check that the endpoint is coded consistently as a binary event, that the arm sizes used are the planned fixed sizes, and that a binomial model is defensible within each arm. The priors should represent plausible uncertainty about each arm’s event probability, and their independence should be intentional. Random allocation supports a design-based comparison of treatment groups, but it does not establish that prior event probabilities are independent.
A practical diagnostic is to inspect simulated replicate counts, not only their means. Check that each count lies between zero and its arm size, and examine the frequency of low, middle, and high counts against clinical expectations. If simulated counts are often implausible, investigate the prior parameters, arm sizes, endpoint definition, and sampling assumptions. A mismatch may reflect an unsuitable prior, but it may also indicate that a simple binomial model misses variation or dependence in outcomes.
The independent-prior model has a clear advantage: the joint predictive distribution is available as a product of two beta-binomial distributions. A plug-in calculation that fixes each probability at its prior mean is simpler, but it omits uncertainty in those probabilities and generally understates predictive variation. Conversely, if prior knowledge links the arm probabilities, the product formula is no longer justified; the joint prior and the corresponding joint integral must be used. Simulation can handle such models, but it does not remove the need to specify the dependence structure.
These checks concern the plausibility of the two arm counts under the model. They are distinct from checking the plausibility of a treatment contrast, which requires a different predictive summary. The central lesson is to preserve the full sequence: draw arm probabilities from the specified priors, then generate outcomes conditional on those draws, and finally assess the resulting count pair in context.
Check Your Understanding
Answer each question, then compare with the solutions below.
- If \(p_T\) and \(p_C\) have independent priors and the arm outcomes are conditionally independent, what expression gives the joint predictive probability of a count pair?
- For \(n=5\) and \(p\sim\operatorname{Beta}(1,1)\), what is the prior predictive probability of exactly two events?
- With independent priors, what additional feature of the sampling model is needed to conclude that the two counts are marginally independent?
- Why can fixing each event probability at its prior mean understate the spread of predictive counts?
Solutions. (1) Multiply the two arm-specific beta-binomial probabilities, each of the form \({n\choose y}B(a+y,b+n-y)/B(a,b)\). (2) Under a uniform beta prior, each of the six possible counts has probability \(1/(5+1)\), so the answer is \(1/6=0.1667\). (3) The conditional sampling distributions must factor across arms, with no shared latent quantity linking their outcomes; integrating the product sampling model against the product prior then preserves the factorization. (4) A plug-in calculation includes binomial sampling variation at one fixed probability but omits variation in the probability itself, which contributes additional predictive variance.