Why Chance Imbalance Is Expected
Complete randomization assigns a fixed number of participants to each arm by selecting an allocation uniformly from all allocations with those arm sizes. It does not require every baseline characteristic to be exactly equal between arms. Rather, it gives each participant the same assignment probability and makes the allocation itself the source of chance differences. Diagnosing imbalance means asking how large a difference the assignment mechanism could reasonably produce, not whether the observed difference is exactly zero.
For this tutorial, let \(n\) be the total number randomized, with \(n_1\) assigned to treatment and \(n_0=n-n_1\) assigned to control. A baseline covariate is measured before treatment assignment, so its \(n\) values are treated as fixed when describing the randomization distribution. The only randomness considered here is which participants are assigned to each arm.
This distinction matters: a randomized trial can have a real observed imbalance even when the assignment procedure was carried out correctly. A randomization-based calculation describes the range of differences generated by that procedure under the fixed baseline data. It does not prove that any particular allocation was fair, nor does it measure a treatment effect.
Subgroup Counts Under Complete Randomization
Suppose \(K\) of the \(n\) participants belong to a baseline subgroup, such as participants above a prespecified age threshold. Let \(X\) be the number of subgroup members assigned to treatment. Because the treatment arm is a uniformly selected set of \(n_1\) participants, \(X\) has a hypergeometric distribution: it counts how many of the \(K\) subgroup members fall in a sample of size \(n_1\) drawn without replacement from \(n\) people.
The expected treatment count is the treatment-arm size multiplied by the subgroup's overall proportion. The control count is \(K-X\), so the expected treatment-minus-control count is \((n_1-n_0)K/n\). In particular, if the arms have equal sizes, the expected count difference is zero. The expected difference in subgroup proportions, \(X/n_1-(K-X)/n_0\), is zero even when the arms are unequal.
Worked Example: A Subgroup Count in Equal-Sized Arms
Suppose 100 participants are assigned by complete randomization, with \(n_1=n_0=50\). A baseline subgroup contains \(K=20\) participants. Find the expected treatment count and its standard deviation, then interpret a hypothetical allocation with 14 subgroup members in treatment.
The treatment count \(X\) follows a hypergeometric distribution. Its expectation is \(E(X)=50(20/100)=10\) participants. Its variance is
Thus \(SD(X)=\sqrt{4.040}=2.010\) participants. With 14 subgroup members in treatment, the control arm has \(20-14=6\). The treatment-minus-control count difference is \(14-6=8\), and the subgroup proportions are \(14/50=0.28\) and \(6/50=0.12\), a difference of 0.16, or 16 percentage points.
For a familiar standardized summary, the pooled subgroup proportion is \(20/100=0.20\), giving a binary-variable standard deviation of \(\sqrt{0.20(0.80)}=0.40\). The standardized difference is \(0.16/0.40=0.400\). This describes the size of the observed difference relative to the baseline variability; it does not by itself establish that randomization failed.
Mean Differences for Quantitative Covariates
Let \(x_i\) be the fixed baseline value for participant \(i\), and define the overall mean as \(\bar{x}=n^{-1}\sum_{i=1}^n x_i\). Let \(S^2=(n-1)^{-1}\sum_{i=1}^n(x_i-\bar{x})^2\) be the finite-population variance of these \(n\) observed baseline values. Write \(\bar{x}_1\) and \(\bar{x}_0\) for the treatment and control means.
The expectation is zero because each arm is a random sample from the same fixed set of baseline values. The variance quantifies how much the difference can vary across allocations. It does not assume that the covariate values come from a normal distribution.
Why the Mean-Difference Formula Holds
A short derivation makes the role of the assignment mechanism clear. The treatment group is a simple random sample of size \(n_1\) from the \(n\) fixed values. Its sample mean has expectation \(\bar{x}\) and variance \((1-n_1/n)S^2/n_1\). Also, the control mean is determined by the treatment mean and the overall mean: \(\bar{x}_0=(n\bar{x}-n_1\bar{x}_1)/n_0\). Therefore,
so its expectation is zero. Multiplying the variance of the treatment mean by \((n/n_0)^2\) gives
Worked Example: Expected Variation in a Covariate Mean
Consider 10 hypothetical participants whose baseline measurements, in centimetres, are \(0,1,2,3,4,5,6,7,8,9\). Five are assigned to each arm by complete randomization. Calculate the randomization standard deviation of the treatment-minus-control mean difference. Then examine the allocation in which the five largest values are assigned to treatment.
The overall mean is \(\bar{x}=4.5\). The sum of squared deviations from 4.5 is 82.5, so the finite-population variance and standard deviation are \(S^2=82.5/9=9.167\) square centimetres and \(S=\sqrt{9.167}=3.028\) centimetres. The mean-difference variance is
In the specified allocation, treatment values are \(5,6,7,8,9\), with mean 7 cm; control values are \(0,1,2,3,4\), with mean 2 cm. The observed difference is therefore \(7-2=5\) cm. This is a large difference relative to the randomization standard deviation, but it is possible under the stated procedure. There are \(\binom{10}{5}=252\) possible treatment sets, each with probability \(1/252\); this particular set is one of them.
For a pooled-standard-deviation standardized difference, each arm has sample variance \(2.5\ \text{cm}^2\), so the pooled standard deviation is \(\sqrt{2.5}=1.581\) cm. The standardized difference is \(5/1.581=3.162\). It is also possible to divide by the overall finite-population standard deviation, giving \(5/3.028=1.651\). These values differ because the standardizing scales differ; a reported standardized difference should therefore state how its denominator was defined.
Standardized Differences and Diagnostic Choices
A standardized difference expresses an observed baseline difference in units of a standard deviation. For a quantitative covariate, a commonly used form is \(d=(\bar{x}_1-\bar{x}_0)/s_{\mathrm{pool}}\), where \(s_{\mathrm{pool}}=\sqrt{((n_1-1)s_1^2+(n_0-1)s_0^2)/(n_1+n_0-2)}\). For a binary covariate, a common denominator is the square root of the pooled proportion times one minus that proportion. Standardization makes differences across variables with different units easier to compare; it does not create a universal boundary between acceptable and unacceptable imbalance.
The mean-difference formula gives an exact variance when its finite-population quantities are used. By contrast, a standardized difference using observed within-arm standard deviations has a random denominator. Its numerator has randomization expectation zero, but the ratio is not generally guaranteed to have expectation exactly zero. Treat standardized differences as descriptive diagnostics, not as exact test statistics with a universal reference distribution.
Worked Example: A Rare Subgroup and an Exact Check
Suppose 40 participants are randomized, 20 per arm, and a rare baseline subgroup contains \(K=4\) people. In a hypothetical allocation, all four subgroup members are assigned to treatment. Assess this pattern using the exact count distribution rather than relying on a normal approximation.
The expected treatment count is \(E(X)=20(4/40)=2\). The variance is
The observed count of four is two above its expectation, or \((4-2)/0.9608=2.082\) standard deviations above it. But the count can only be 0, 1, 2, 3, or 4, so a normal approximation is questionable. The exact probability that all four are assigned to treatment is
The probability of all four being assigned to control is the same. Thus the probability of either extreme allocation, \(X=0\) or \(X=4\), is \(2(0.05301)=0.1060\). This illustrates why a discrepancy of about two standard deviations should not automatically be treated as compelling evidence of a problem, especially for a small subgroup.
How to Diagnose Imbalance Responsibly
A useful assessment connects the observed difference to the design and the baseline data. For a subgroup, compare its observed count with the hypergeometric expectation and, when counts are small, examine the exact distribution. For a quantitative covariate, compare the observed mean difference with the randomization standard deviation, while reporting the original-unit difference and a clearly defined standardized difference. These summaries answer related but distinct questions: the first gives context in natural units; the second helps compare covariates measured on different scales.
Several failure modes deserve attention:
- Expecting exact equality. Random assignment does not force identical baseline means or subgroup counts. A nonzero difference is not, by itself, evidence of an error.
- Using a normal approximation for sparse counts. If a subgroup has only a few members, its possible treatment counts are discrete and restricted. Use the hypergeometric distribution to describe the chance variation.
- Reading a standardized difference as a probability. A value such as 0.4 is a difference measured in standard-deviation units, not a probability that assignment was incorrect or that treatment effects are biased.
- Checking many variables as if each were the only check. If many baseline variables are inspected, it is unsurprising for one or more to show a conspicuous difference by chance. Consider the number and dependence of the checks when interpreting an isolated imbalance.
- Treating baseline significance tests as an audit of randomization. A small p-value for a baseline comparison can occur under valid randomization. The allocation procedure should be verified from its records; one covariate test does not establish whether the procedure was followed.
A large imbalance can still be practically important, particularly for a prognostic variable, and may warrant careful description and consideration in the analysis. That importance is not the same as evidence that the assignment mechanism failed. Conversely, a small standardized difference does not prove that every relevant covariate is balanced or that no other design concern exists.
What These Diagnostics Can and Cannot Establish
The calculations here condition on the observed baseline covariate values and quantify variation over the allocations allowed by complete randomization. They do not assume a model for treatment outcomes, estimate a treatment effect, or show that baseline differences caused an outcome difference. They also depend on the stated assignment mechanism: if the actual allocation was not uniform over fixed-size treatment sets, these reference calculations may not describe it.
The main alternative to a randomization-based count calculation is a rough approximation, often based on a normal distribution. That can be convenient when counts are not sparse, but it can be misleading near the boundaries of a small subgroup. For quantitative covariates, the finite-population variance formula provides a direct design-based measure of expected variation; a standardized difference provides a scale-free descriptive comparison. Neither should be interpreted without its assumptions and denominator.
Check Your Understanding
Answer each question using complete randomization and the baseline values as fixed.
- In a study with 60 participants, 30 are assigned to treatment. A baseline subgroup contains 12 participants. What is the expected treatment subgroup count?
- For a fixed quantitative covariate, what is the expected treatment-minus-control mean difference under complete randomization?
- Why can a standardized difference not automatically be interpreted as an exact randomization test statistic?
- In a study with 24 participants, 12 per arm, a subgroup contains two participants. Why is an exact count distribution preferable to relying only on a normal approximation?
Solutions. (1) The expected count is \(30(12/60)=6\) participants. (2) It is zero: each arm is selected at random from the same fixed set of baseline values. (3) A standardized difference often divides by an observed standard deviation that varies across allocations, so the ratio does not generally have the same simple exact distribution as its numerator. (4) The treatment subgroup count can only be 0, 1, or 2; this small, discrete support is poorly represented by a continuous normal approximation, so the hypergeometric distribution describes its chance variation directly.