Tutorials › Introduction to Statistics › Random Assignment and Its Purpose

Observational Studies and Experiments · Tutorial 55 of 996

Random Assignment and Its Purpose

See how random assignment creates treatment groups by chance, and why its balancing benefit is real but not guaranteed in every experiment.

Beginner 9 min read

What You'll Learn

  • Define random assignment and distinguish it from random sampling.
  • Find the number and probabilities of possible treatment allocations.
  • Explain why random assignment balances characteristics on average, not necessarily in one study.
  • Work out how a characteristic may be distributed across treatment groups by chance.
  • Recognize what random assignment can and cannot protect against.

Why the Way Treatments Are Assigned Matters

Suppose an investigator wants to compare two treatments. If the units receiving one treatment already differ from the units receiving the other, their later outcomes could reflect those pre-existing differences as well as the treatments. Assigning treatments by chance offers a way to make the groups comparable before treatment begins. It does not make them identical, but it gives each unit a fair chance of entering each group and prevents the investigator from deliberately steering particular units toward a preferred treatment.

The units receiving treatments are the experimental units. They may be people, animals, schools, or other units. A treatment is the condition assigned to an experimental unit. The earlier material on treatments and comparison groups distinguishes the roles of those conditions; here the focus is on the allocation process itself.

Definition: Random assignment is the use of a chance mechanism to allocate experimental units to treatments according to a specified set of possible allocations. In an equal-probability assignment, each permitted allocation is equally likely. Random assignment concerns which treatment a unit receives; random sampling concerns which units are selected from a population.

A chance mechanism might be a computer-generated random list, a shuffled set of treatment labels, or another procedure that gives the intended allocations their specified probabilities. The method must be carried out as planned: if an investigator changes assignments after seeing the random result, the final allocation is no longer governed solely by that stated chance process.

What Random Assignment Does—and Does Not—Guarantee

If treatment labels are assigned by chance, each experimental unit has a known probability of receiving each treatment. Therefore, before the assignment is made, no unit is systematically favored for one treatment because of its age, health, experience, or another characteristic. This applies to characteristics the investigator has measured and to characteristics the investigator has not measured.

That statement is about the assignment procedure across its possible outcomes. In any one experiment, chance may put more units with a particular characteristic in one group than in another. Random assignment is not a promise that treatment groups will be identical or even closely matched on every characteristic. Its benefit is that it avoids a systematic allocation rule that consistently links a characteristic to a particular treatment, and it makes group differences at the start attributable to chance rather than deliberate selection.

This is different from random sampling. Random sampling is a chance-based way to select units from a population and can support conclusions about that population when the sampling procedure is appropriate. Random assignment allocates the units already in an experiment to treatment groups. One procedure does not substitute for the other: a study may use random assignment without random sampling, or random sampling without random assignment.

Worked Example: Counting Equally Likely Allocations

Four experimental units, A, B, C, and D, are to be assigned to two treatments. Exactly two will receive Treatment 1, and the other two will receive Treatment 2. Suppose every permitted allocation is equally likely. How many allocations are possible, and what is the probability that unit A receives Treatment 1?

An allocation is determined by choosing which two of the four units receive Treatment 1. The number of such choices is

$$ \binom{4}{2}=\frac{4!}{2!2!}=6. $$

The six possible Treatment 1 groups are AB, AC, AD, BC, BD, and CD. Three of these six groups contain A: AB, AC, and AD. Therefore,

$$ P(\text{A receives Treatment 1})=\frac{3}{6}=\frac{1}{2}. $$

The same count applies to each unit, so each unit has probability \(1/2\) of receiving either treatment. This result follows from the specified equal-probability allocation, not from an assumption that the units will end up with identical characteristics.

Why Chance Can Balance Characteristics

A useful way to understand the balancing effect is to focus on one characteristic, such as whether a unit has a certain baseline condition. Imagine \(N\) units, of which \(K\) have the characteristic, and suppose \(m\) units are assigned to a particular treatment. Under an equal-probability assignment of \(m\) units to that treatment, each of the \(N\) units has probability \(m/N\) of being assigned there.

Let \(I_i\) equal 1 if unit \(i\) has the characteristic and 0 otherwise, and let \(A_i\) equal 1 if unit \(i\) receives the treatment and 0 otherwise. The number of units with the characteristic in that treatment group is the sum of \(I_iA_i\) over all units. The expectation of each product is \(I_iP(A_i=1)\), because \(I_i\) is fixed before assignment. Adding these expectations gives the average count over repeated assignments:

$$ E\left(\sum_{i=1}^{N} I_iA_i\right) =\sum_{i=1}^{N} I_iE(A_i) =\sum_{i=1}^{N} I_i\frac{m}{N} =K\frac{m}{N}. $$

Thus, the expected number of units with the characteristic in the treatment group is the group’s share of all units, \(m/N\), multiplied by the total number \(K\) with the characteristic. This is an average across the possible random allocations. It does not say that every realized allocation has exactly that count, nor that separate characteristics will all be balanced at once.

Worked Example: A Recorded Baseline Characteristic

Eight hypothetical participants are assigned equally at random, with four receiving Treatment A and four receiving Treatment B. Before assignment, four participants have a recorded high baseline risk and four do not. What is the chance that exactly two high-risk participants receive Treatment A?

There are \(\binom{8}{4}=70\) equally likely ways to choose the four participants for Treatment A. To have exactly two high-risk participants in that group, choose two of the four high-risk participants and two of the four others:

$$ P(\text{exactly 2 high-risk participants in A}) =\frac{\binom{4}{2}\binom{4}{2}}{\binom{8}{4}} =\frac{6\cdot 6}{70} =\frac{36}{70} \approx 0.5143. $$

The expected number of high-risk participants in Treatment A is \(K(m/N)=4(4/8)=2\). The probability calculation shows, however, that an expected count of two is not a guarantee of exactly two: the chance of exactly two is about 51.4%, not 100%. Random assignment gives a fair allocation process, while a particular assignment can still produce an imbalance.

How the Same Logic Applies to Unknown Characteristics

The characteristic in the calculation need not be known when assignments are made. For example, a participant could have an unrecorded feature that affects the response to treatment. If the assignments are genuinely determined by chance, each participant still has the specified probability of entering each treatment group. The expected distribution of that feature follows the same allocation logic, even if the investigator cannot calculate it from recorded data.

This is one reason random assignment is valuable: it does not depend on an investigator having identified every potentially relevant characteristic in advance. But it cannot ensure that every unknown feature is balanced in the groups that happen to result. When an important difference occurs by chance, it can still complicate the comparison. Randomization reduces the risk of systematic allocation differences; it does not abolish all uncertainty about group composition.

Worked Example: An Unrecorded Characteristic

Six hypothetical experimental units will be assigned to Treatment A or Treatment B, with three units per treatment. Suppose, unknown to the investigator, two units share a characteristic that might affect the response. Every choice of three units for Treatment A is equally likely. Find the probability that Treatment A receives exactly one of the two units with that characteristic.

There are \(\binom{6}{3}=20\) possible Treatment A groups. For exactly one of the two characteristic-positive units to be in Treatment A, choose one of those two and two of the remaining four units:

$$ P(\text{exactly 1 of the 2 is in A}) =\frac{\binom{2}{1}\binom{4}{2}}{\binom{6}{3}} =\frac{2\cdot 6}{20} =\frac{12}{20} =0.600. $$

The expected number of these two units in Treatment A is \(K(m/N)=2(3/6)=1\). The chance of exactly one is 0.600, so even for this small group it is not assured. The investigator did not need to know the characteristic for every unit to have a fair chance of assignment; nevertheless, the realized groups could contain zero or two such units in Treatment A instead.

Using the Allocation Procedure Carefully

To make the role of random assignment clear, an experiment should specify the units, treatments, and allocation rule before outcomes are compared. For a simple assignment of a fixed number of units to each treatment, the rule should state how the treatment group is chosen and ensure that all permitted groups receive the intended probabilities. A reproducible computer-generated assignment or a properly shuffled set of labels can serve this purpose.

1
Identify the units and treatments.
State which units are being assigned and what each treatment means. The chance process cannot be interpreted unless the eligible units and possible conditions are clear.
2
Specify the permitted allocations.
For example, state that four of eight units will receive Treatment A and the remaining four will receive Treatment B. This determines what counts as a possible assignment.
3
Use the chance mechanism as specified.
Generate or draw the allocation without choosing, swapping, or revising assignments in response to unit characteristics or expected outcomes.
4
Keep the interpretation within scope.
Random assignment supports a fair treatment comparison among the assigned units, but it does not by itself make those units representative of a broader population or prevent problems such as incomplete outcome measurement.

Common Mistakes and Why This Matters

A common mistake is to reason, “The groups were randomly assigned, so they must have been balanced.” The correction is that random assignment makes group membership depend on chance and gives a known distribution over possible allocations. The resulting groups may still differ, as the calculations above show. Balance is an expected tendency across possible assignments, not a guaranteed feature of one assignment.

Another mistake is to call a study randomized because participants were randomly selected. Selection and assignment answer different questions: random selection concerns who enters the study, while random assignment concerns which treatment those enrolled units receive. A study can do one without doing the other.

Random assignment matters because allocation based on convenience or judgment can systematically place units with different starting characteristics into different treatments. A chance process breaks that deliberate link, including for features the investigator has not thought to measure. It therefore strengthens the fairness of the treatment comparison. It does not guarantee a perfect comparison, a representative sample, or a particular result; those questions require attention to the full study design and how outcomes are measured.

Key takeaway: Random assignment allocates experimental units to treatments by a defined chance process. Each unit has a known chance of receiving each treatment, which can balance recorded and unrecorded characteristics on average. Any one allocation may still be imbalanced.

Check Your Understanding

Use the definitions and allocation reasoning from this tutorial to answer these questions.

  1. In your own words, distinguish random assignment from random sampling.
  2. Five units are to be assigned to Treatment A, with exactly two receiving it. How many equally likely Treatment A groups are possible?
  3. If six of twelve units have a recorded characteristic and six are assigned to one treatment by equal-probability random assignment, what is the expected number with that characteristic in the treatment group?
  4. Why does an expected count of three not mean that every assignment will place exactly three such units in the group?
  5. How can random assignment help with a characteristic the investigator has not measured? What does it fail to guarantee about that characteristic in the realized groups?