Tutorials › Response-Adaptive Randomization › Deriving Allocation Probabilities Under Complete Randomization

Randomization Basics · Tutorial 20 of 501

Deriving Allocation Probabilities Under Complete Randomization

Learn to count possible assignments and calculate subgroup treatment probabilities when a fixed number of participants is randomized to treatment.

Beginner 9 min read

What You'll Learn

  • Define the subgroup treatment count under complete randomization.
  • Derive its probability mass function by counting assignments.
  • Determine the possible values of the count from the design constraints.
  • Calculate subgroup treatment probabilities and moments.
  • Recognize when a hypergeometric model does not match the randomization design.
  • Distinguish fixed-total complete randomization from independent Bernoulli assignment.

Why Count Assignments Within a Subgroup?

Complete randomization fixes the total number assigned to treatment but does not generally fix how those assignments fall within a particular baseline subgroup. For example, if a trial randomizes a fixed number of participants, the number of participants with a given baseline characteristic assigned to treatment can vary from one valid allocation to another. The distribution of that count describes the assignment uncertainty created by the design.

This is a probability calculation about the randomization itself. It does not require assumptions about treatment effects or participant outcomes. The key requirements are that the subgroup is defined before assignment and that every allocation with the specified total number treated is equally likely, as in complete randomization.

Definition: Suppose \(N\) participants are assigned by complete randomization, with exactly \(M\) assigned to treatment. Let \(S\) be a fixed baseline subgroup containing \(n\) participants. Write \(A_i=1\) if participant \(i\) is assigned to treatment and \(A_i=0\) otherwise. The subgroup treatment count is \(X=\sum_{i\in S} A_i\). Under complete randomization, each of the \(\binom{N}{M}\) possible sets of \(M\) treated participants has probability \(1/\binom{N}{M}\).

Deriving the Distribution by Counting

To find \(P(X=x)\), count how many valid assignments put exactly \(x\) of the \(n\) subgroup members in treatment. Choose those \(x\) participants from the subgroup, then choose the remaining \(M-x\) treated participants from the \(N-n\) people outside it. Divide this number of favorable assignments by the total number of valid assignments.

$$ P(X=x)=\frac{\binom{n}{x}\binom{N-n}{M-x}}{\binom{N}{M}}. $$

The count \(x\) must be feasible under both the subgroup size and the total number treated. It cannot be negative or exceed \(n\), and there must be enough people outside the subgroup to fill the other treatment positions. Thus the support is

$$ \max\{0,\ M-(N-n)\}\ \leq x\leq \min\{n,\ M\}, $$

where \(x\) is an integer. This is the hypergeometric distribution: it counts the number of selected members from a specified group when a fixed-size sample is selected without replacement from a finite set. The formula assigns probability zero to values outside the support.

The probabilities sum to one. Each allocation of \(M\) treated participants belongs to exactly one category, determined by how many treated participants are in \(S\). Counting all allocations by that category gives

$$ \sum_x \binom{n}{x}\binom{N-n}{M-x}=\binom{N}{M}. $$

Dividing both sides by \(\binom{N}{M}\) verifies that the probabilities over the feasible values of \(x\) add to one.

Worked Example: The Full Distribution in a Small Trial

Consider a hypothetical trial with \(N=12\) participants, exactly \(M=6\) assigned to treatment, and a baseline subgroup of \(n=4\). Find the distribution of the number \(X\) of subgroup members assigned to treatment.

There are \(\binom{12}{6}=924\) possible treatment sets. The support is \(0\leq x\leq4\): all six treated participants could be outside the four-person subgroup, and all four subgroup members could be treated. For each value, count the assignments and divide by 924:

$$ \begin{aligned} P(X=0)&=\frac{\binom{4}{0}\binom{8}{6}}{\binom{12}{6}} =\frac{1(28)}{924}=\frac{1}{33},\\ P(X=1)&=\frac{\binom{4}{1}\binom{8}{5}}{\binom{12}{6}} =\frac{4(56)}{924}=\frac{8}{33},\\ P(X=2)&=\frac{\binom{4}{2}\binom{8}{4}}{\binom{12}{6}} =\frac{6(70)}{924}=\frac{5}{11},\\ P(X=3)&=\frac{\binom{4}{3}\binom{8}{3}}{\binom{12}{6}} =\frac{4(56)}{924}=\frac{8}{33},\\ P(X=4)&=\frac{\binom{4}{4}\binom{8}{2}}{\binom{12}{6}} =\frac{1(28)}{924}=\frac{1}{33}. \end{aligned} $$

The probabilities sum to \((28+224+420+224+28)/924=1\), as required. The distribution is symmetric here because the subgroup and its complement have sizes four and eight while the total treatment count is six: the formula gives the same counts for \(x\) and \(4-x\). This symmetry is specific to these numbers, not a general property of every subgroup allocation distribution.

Expected Count and Variability

The mean and variance summarize the distribution, but their formulas can also be justified directly from the assignment indicators. By symmetry under complete randomization, any one participant has probability \(M/N\) of being assigned to treatment. For two distinct participants, the probability both are treated is \(M(M-1)/(N(N-1))\), because after one treated participant is specified, \(M-1\) of the remaining \(N-1\) positions are treatment positions.

$$ E(X)=n\frac{M}{N}, \qquad \operatorname{Var}(X) =n\frac{M}{N}\left(1-\frac{M}{N}\right)\frac{N-n}{N-1}. $$

For a justification of the variance, write \(X\) as the sum of the \(n\) indicators in the subgroup. Each has variance \((M/N)(1-M/N)\). For distinct \(i\) and \(j\), their covariance is

$$ \operatorname{Cov}(A_i,A_j) =\frac{M(M-1)}{N(N-1)}-\left(\frac{M}{N}\right)^2 =-\frac{(M/N)(1-M/N)}{N-1}. $$

There are \(n\) individual variances and \(n(n-1)\) ordered covariance terms in the variance of the sum. Therefore,

$$ \begin{aligned} \operatorname{Var}(X) &=n\frac{M}{N}\left(1-\frac{M}{N}\right) -n(n-1)\frac{(M/N)(1-M/N)}{N-1}\\ &=n\frac{M}{N}\left(1-\frac{M}{N}\right)\frac{N-n}{N-1}. \end{aligned} $$

The covariance is negative: assigning one person to treatment leaves one fewer treatment position for everyone else. The factor \((N-n)/(N-1)\) reduces the variance relative to treating subgroup indicators as independent Bernoulli variables. If \(n=N\), the subgroup is the whole trial and \(X=M\) is fixed, so the variance is zero, consistent with the formula.

Worked Example: Probability of at Least Two Subgroup Members Treated

In a hypothetical trial, \(N=10\) participants include a fixed baseline subgroup of \(n=3\), and exactly \(M=4\) participants are assigned to treatment. Find the probability that at least two subgroup members are treated.

There are \(\binom{10}{4}=210\) valid treatment sets. The feasible subgroup counts are \(0,1,2,3\). The favorable counts are

$$ \begin{aligned} P(X\geq2) &=P(X=2)+P(X=3)\\ &=\frac{\binom{3}{2}\binom{7}{2}+\binom{3}{3}\binom{7}{1}}{\binom{10}{4}}\\ &=\frac{3(21)+1(7)}{210} =\frac{70}{210} =\frac{1}{3}. \end{aligned} $$

Thus, under this randomization scheme, the probability that at least two of the three subgroup members receive treatment is \(1/3\). As a check on the scale of the distribution, the expected subgroup count is \(E(X)=3(4/10)=1.2\). The event “at least two” is possible but is not the most common outcome.

Worked Example: A Restricted Support

Suppose a hypothetical trial has \(N=8\) participants, exactly \(M=6\) assigned to treatment, and a baseline subgroup of \(n=5\). Find the possible subgroup counts and the probability that exactly four subgroup members are treated.

Only three participants are outside the subgroup. Since six participants must be treated, at least \(6-3=3\) subgroup members must be treated; no more than five can be treated. Hence the support is \(x=3,4,5\), not \(0,1,2,3,4,5\). There are \(\binom{8}{6}=28\) possible treatment sets, so

$$ P(X=4) =\frac{\binom{5}{4}\binom{3}{2}}{\binom{8}{6}} =\frac{5(3)}{28} =\frac{15}{28} \approx 0.5357. $$

The mean is \(E(X)=5(6/8)=3.75\), which is compatible with the support: the count must be at least three. Omitting the lower support constraint would not change this particular calculation at \(x=4\), but it would incorrectly suggest that counts such as zero or one have positive probability.

Assumptions, Alternatives, and Failure Modes

The hypergeometric calculation follows from the assignment mechanism, not merely from the fact that a subgroup exists. It applies when the \(N\) participants and the subgroup membership are fixed before assignment, exactly \(M\) participants receive treatment, and all \(\binom{N}{M}\) treatment sets are equally likely. These are the defining features of complete randomization with a fixed treatment total.

The calculation does not automatically apply if assignments are made independently with a fixed probability, because then the total number treated is random. Under independent Bernoulli assignment with treatment probability \(p\), each subgroup member is independently treated with probability \(p\), so the subgroup count has a binomial distribution instead. A binomial distribution with \(p=M/N\) can sometimes approximate the hypergeometric distribution, but it ignores the dependence created by fixing the total.

Assignment mechanismWhat is fixed?Subgroup count model
Complete randomizationExactly \(M\) of \(N\) participants are treated; all such sets are equally likelyHypergeometric
Independent Bernoulli assignmentEach participant is independently treated with probability \(p\); the total treated count can varyBinomial for a fixed subgroup

A useful check is to confirm the randomization method before inserting numbers into the formula. If the design restricts which assignments are possible—for example, through a different assignment procedure—then the denominator and favorable-assignment count may not describe the actual design. Likewise, a subgroup defined using post-assignment information is not the fixed baseline subgroup assumed here; its membership may depend on assignment or outcomes.

Common mistake: Treating the \(n\) subgroup assignments as independent and using a binomial distribution with probability \(M/N\), even though the design fixes the total number treated. Under complete randomization, the subgroup indicators have negative dependence. Use the hypergeometric count unless an approximation is justified or the assignment mechanism is actually independent Bernoulli assignment.

These probabilities are useful for understanding what a design permits and how much assignment variation a subgroup can experience. They quantify the chance of a particular subgroup treatment count without making any claim about treatment benefit or outcomes. The calculation is exact for the stated complete-randomization mechanism, but it is only as appropriate as the assumptions about the subgroup and assignment process.

Check Your Understanding

For each question, use the fixed-total, uniform-assignment model unless the question says otherwise. Worked solutions follow the questions.

  1. A trial has \(N=9\), \(M=3\), and a fixed baseline subgroup of \(n=2\). What is the support of \(X\)?
  2. For the same trial, calculate \(P(X=1)\).
  3. A hypothetical trial has \(N=14\), \(M=7\), and a subgroup of \(n=4\). What is \(E(X)\)?
  4. Why is a binomial model not the exact model for the subgroup count under complete randomization with fixed \(M\)?

Solutions. (1) The lower endpoint is \(\max\{0,3-(9-2)\}=0\), and the upper endpoint is \(\min\{2,3\}=2\). Thus \(X\in\{0,1,2\}\). (2) There are \(\binom{9}{3}=84\) valid treatment sets. Exactly one subgroup member is treated in \(\binom{2}{1}\binom{7}{2}=2(21)=42\) sets, so \(P(X=1)=42/84=0.5\). (3) \(E(X)=nM/N=4(7/14)=2\) subgroup members. (4) A binomial model assumes independent subgroup assignment indicators. With exactly \(M\) treated overall, those indicators are negatively dependent because one treatment position used by a participant is unavailable to others; the exact count distribution is hypergeometric.

Clinical Biostats