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.
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.
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
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
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:
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.
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
There are \(n\) individual variances and \(n(n-1)\) ordered covariance terms in the variance of the sum. Therefore,
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
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
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 mechanism | What is fixed? | Subgroup count model |
|---|---|---|
| Complete randomization | Exactly \(M\) of \(N\) participants are treated; all such sets are equally likely | Hypergeometric |
| Independent Bernoulli assignment | Each participant is independently treated with probability \(p\); the total treated count can vary | Binomial 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.
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.
- A trial has \(N=9\), \(M=3\), and a fixed baseline subgroup of \(n=2\). What is the support of \(X\)?
- For the same trial, calculate \(P(X=1)\).
- A hypothetical trial has \(N=14\), \(M=7\), and a subgroup of \(n=4\). What is \(E(X)\)?
- 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.