DescriptionThis applet provides a list of random numbers that can be used to assign participants to conditions in an experiment with many conditions, such as a factorial experiment. (Read more about factorial experiments.) Enter the number of participants N, and the number of conditions C, for the experiment you are planning. This applet will then provide a random number for each participant. This will be a number from 1 to C. For example, if the 4th number in the list is 7, the 4th subject is randomly assigned to experiment condition 7. Random numbers will be generated so that the experiment is approximately balanced. 
Generate list of random numbers for assignment 
If you are randomizing individual subjects to conditions, the number of participants is simply the number of subjects in the study. However, if you are instead randomizing to preexisting clusters of individuals, such as schools or clinics, the number of participants is the number of clusters in the study. For more information, see Dziak, NahumShani, and Collins (2012).
The number of conditions is equal to the number of cells in the experiment. For example, in a 2×2×2 factorial experiment, there are 8 conditions because there are 8 possible combination of assignments to the factors, as in the table below.
Sample 2x2x2 experiment 


Factor 

Condition # 
A 
B 
C 
1 
Off 
Off 
Off 
2 
Off 
Off 
On 
3 
Off 
On 
Off 
4 
Off 
On 
On 
5 
On 
Off 
Off 
6 
On 
Off 
On 
7 
On 
On 
Off 
8 
On 
On 
On 
Read an explanation of factorial experiments and an introductory example.
The applet generates N/C sets of integers, each a random permutation of the integers 1 through C. Each set will contain the numbers 1 through C in random order. If N is not evenly divisible by C, then there will be a few leftover numbers at the end, which do not form a complete set; this is not problematic. By keeping the number of participants in each condition as close to equal as is possible, the applet causes the experiment to be approximately balanced, which is usually beneficial for the power and precision of the results. The sets do not necessarily represent a “blocking” or “matching” factor or any other part of the actual design or analysis; they are simply a convenience for keeping the design balanced. This applet will work for full factorial, fractional factorial, and oneway comparative experiments. For more information on these designs, see Collins, Dziak, and Li (2009).