# 8.2 - Constrained Randomization

8.2 - Constrained Randomization*Randomization in permuted blocks* is one approach to achieve balance across treatment groups. The randomization scheme consists of a sequence of blocks such that each block contains a pre-specified number of treatment assignments in random order. The purpose of this is so that the randomization scheme is balanced at the completion of each block. For example, suppose equal allocation is planned in a two-armed trial (groups A and B) using a randomization scheme of permuted blocks. The target sample size is 120 patients (60 in A and 60 in B) and the investigator plans to enroll 12 subjects per week. In this situation, blocks of size 12 are natural, so the randomization plan looks like

Week #1 |
BABABAABABAB |

Week #2 |
ABBBAAABAABB |

Week #3 |
BBBABABAABAA |

Each week the patients are assigned a treatment based on a randomly assigned option specified for the week. Notice that there are exactly six As and six Bs within each block, so that at the end of each week there is balance between the two treatment arms. If the trial is terminated, say after 64 patients have been enrolled, there may not be exact balance *but it will be close*.

Ordinarily, a natural block size is not evident, so logistical procedures may suggest a block size. A variation of blocked randomization is to use block sizes of unequal length. This might be helpful for a trial where the investigator is unmasked. For example, if the investigator knows that the block size is six, and within a particular block treatment A already has been assigned to three patients, then it is obvious that the remaining patients in the block will be assigned treatment B. If the investigator knows the treatment assignment prior to evaluating the eligibility criteria, then this could lead to procedure selection bias. It is not good to use a discoverable assignment of treatments. A next step to take would be to vary the block size in order to keep the investigator's procedure selection bias minimized.

To illustrate that randomization with permuted blocks is a form of constrained randomization, let \(N_A\) and \(N_B\) denote the number of As and Bs, respectively, to be contained within each block. Suppose that when an eligible patient is ready to be randomized there are \(n_A\) and \(n_B\) patients already randomized to groups A and B, respectively. Then the probability that the patient is randomized to treatment A is:

\(Pr[A]=\begin{cases} 0 & \text{ if } n_A=N_A \\ \dfrac{N_A-n_A}{N_A+N_B-n_A-n_B}& \text{ if } 0<n_A<N_A \\ 1 & \text{ if } n_B=N_B \end{cases}\)

This probability rule is based on the model of \(N_A\) "A" balls and \(N_B\)_{ }"B" balls in an urn or jar which are sampled without replacement. The probability of being assigned treatment A changes according to how many patients already have been assigned treatment A and treatment B within the block.

As an example, suppose each block is supposed to have \(N_A = N_B = 6\) and \(n_A = 3\) and \(n_B = 2\) already have been assigned. Thus, there are \(N_A - n_A = 3\) A balls left in the urn and \(N_B - n_B = 4\) B balls left in the urn, so the probability of the next eligible patient being assigned treatment A is 3/7.