Set balancing

From HandWiki

The set balancing problem in mathematics is the problem of dividing a set to two subsets that have roughly the same characteristics. It arises naturally in design of experiments.[1]:71–72

There is a group of subjects. Each subject has several features, which are considered binary. For example: each subject can be either young or old; either black or white; either tall or short; etc. The goal is to divide the subjects to two sub-groups: treatment group (T) and control group (C), such that for each feature, the number of subjects that have this feature in T is roughly equal to the number of subjects that have this feature in C. E.g., both groups should have roughly the same number of young people, the same number of black people, the same number of tall people, etc.

Matrix representation

Formally, the set balancing problem can be described as follows.

m is the number of subjects in the general population.

n is the number of potential features.

The subjects are described by A, an n×m matrix with entries in 0,1. Each column represents a subject and each row represents a feature. ai,j=1 if subject j has feature i, and ai,j=0 if subject j does not have feature i.

The partition to groups is described by b, an m×1 vector with entries in 1,1. bj=1 if subject j is in the treatment group T and bj=1 is subject j is in the control group C.

The balance of features is described by c=Ab. This is an n×1 vector. The numeric value of ci is the imbalance in feature i: if ci>0 then there are more subjects with i in T and if ci<0 then there are more subjects with i in C.

The imbalance of a given partition is defined as:

I(b)=||Ab||=maxi1,n|ci|

The set balancing problem is to find a vector b which minimizes the imbalance I(b).

Randomized algorithm

An approximate solution can be found with the following very simple randomized algorithm:

Send each subject to the treatment group with probability 1/2.

In matrix formulation:

Choose the elements of b randomly with probability 1/2 to each value in {1,-1}.

Surprisingly, although this algorithm completely ignores the matrix A, it achieves a small imbalance with high probability when there are many features. Formally, for a random vector b:

Prob[I(b)4mlnn]2n

PROOF:

Let ki be the total number of subjects that have feature i (equivalently, the number of ones in the i-th of the matrix A). Consider the following two cases:

Easy case: ki4mlnn. Then, with probability 1, the imbalance in feature i (that we marked by ci) is at most 4mlnn.

Hard case: ki>4mlnn. For every j, let Xj=ai,jbj. Each such Xj is a random variable that can be either 1 or -1 with probability 1/2. The imbalance in feature i is: ci=j=1mXj. Since the Xj are independent random variables, by the Chernoff bound, for every a>0:

Prob[|ci|a]2exp(a2/2m)

Select: a=4mlnn and get:

Prob[|ci|4mlnn]2n2

By the union bound,

Prob[i:|ci|4mlnn]2n.

References