Randomized Assignment
An assignment mechanism gives the probability of each treatment vector $W=(W_1,\ldots,W_N)$. The mechanism is part of the experimental design, not merely a description of the observed groups.
Difference-in-means estimator
Let $N_1=\sum_iW_i$ and $N_0=N-N_1$. The observed treatment and control means are
\[\bar Y_1=\frac{1}{N_1}\sum_{i:W_i=1}Y_i^{obs},\] \[\bar Y_0=\frac{1}{N_0}\sum_{i:W_i=0}Y_i^{obs}.\]The difference-in-means estimator is
\[\boxed{\hat\tau=\bar Y_1-\bar Y_0}.\]Under complete randomization, it is unbiased for the finite-sample average treatment effect.
Bernoulli assignment
Each unit is independently assigned to treatment with probability $p$:
\[W_i\sim\operatorname{Bernoulli}(p), \qquad P(W_i=1)=p.\]For an assignment vector $w$,
\[P(W=w)=\prod_{i=1}^N p^{w_i}(1-p)^{1-w_i}.\]The treated count is random. An extreme realization can produce very unequal groups, and the all-treated or all-control vectors have positive probability unless the design rules them out.
Completely randomized assignment
Exactly $N_1$ of the $N$ units are treated:
\[\sum_{i=1}^N W_i=N_1.\]There are
\[\binom{N}{N_1}\]allowed treatment vectors. If each is equally likely,
\[P(W=w)=\frac{1}{\binom{N}{N_1}}\]for vectors with exactly $N_1$ treated units, and zero otherwise.
Why randomization identifies an effect
Assignment is generated independently of the fixed potential outcomes. Consequently, treatment and control means are comparable in expectation. Observed covariate imbalance can still occur by chance; it does not imply the assignment was nonrandom.
Bernoulli versus complete randomization
| Feature | Bernoulli assignment | Complete randomization |
|---|---|---|
| Treated count | Random | Fixed at $N_1$ |
| Unit assignments | Independent | Dependent because the total is fixed |
| Allowed vectors | Usually all $2^N$ | Only vectors with $N_1$ treated |
| Assignment probability | Product of unit probabilities | Uniform over allowed vectors |