Interactive Graph:
Random Treatment Assignment

By Elena Llaudet, co-author of Data Analysis for Social Science (DSS)

Random treatment assignment makes treatment and control groups comparable when sample size n is large enough.

Suppose the population is composed of 20% orange individuals, 10% blue individuals, 20% pink individuals, 30% green individuals, and 20% purple individuals. If we select a sample of n individuals from this population and randomly assign them to treatment and control groups, the two groups will have similar proportions of each type of individual as long as n is large enough. Let's take a closer look:

STEP 1: Look at the graphs below. If the sample size is set to only 20 individuals, the treatment group might end up with all the pink individuals while the control group gets all the blue and purple ones, making the groups clearly not comparable even with random assignment.
STEP 2: Move the slider to increase the sample size and observe how the treatment and control groups start to look more similar. When n reaches 1000, the groups have nearly identical proportions, making them comparable.

Move the slider to see how random assignment creates comparable groups as sample size increases.

20
Treatment Group
n_t = 10
Control Group
n_c = 10

Note: n is the total sample size, n_t is the size of the treatment group, and n_c is the size of the control group. The white numbers on top of each bar show the actual count of individuals of that type in each group.