Why use known probabilities?
In a randomized trial, the treatment-assignment mechanism is specified by the design. If assignment probabilities depend on a measured history, the probability of each treatment given that history may therefore be known rather than estimated from the observed assignments. Inverse probability weighting uses those design probabilities to reweight observations, so that a treatment group represents the target population rather than the subset that happened to receive that treatment.
The essential distinction is between a probability assigned by the randomization procedure and a proportion observed in the realized sample. Even if every participant has a one-half chance of treatment, a finite trial will not generally assign exactly half its participants to treatment. The known probability defines the weighting rule; the realized allocation is a random outcome of the design.
These expressions assume the assignment probability for each person is available from the design, including any dependence on strata or other pre-assignment history. A basic requirement is positivity: for every history \(h\) in the target population and every treatment value being evaluated, \(g(a\mid h)>0\). If a treatment is impossible in a history stratum, weighting cannot create information about its outcome there.
The marginal causal identity
For a binary treatment, let \(Y^a\) denote the potential outcome that would be observed under treatment \(a\), and let \(Y\) be the observed outcome. The identity below relies on consistency (\(Y=Y^A\)), randomization conditional on \(H\) (\(A\) is independent of \(Y^a\) given \(H\)), positivity, and integrability of \(Y^a\). These conditions include the relevant no-interference interpretation of the potential outcomes.
To prove the outcome identity, condition first on \(H\). Consistency lets us replace \(Y\) by \(Y^a\) among those with \(A=a\), and randomization lets us separate the assignment indicator from the potential outcome conditional on \(H\):
Taking expectations over \(H\) gives the first equality. For the balance identity, the same conditioning calculation gives
Taking expectations proves the second equality. These are population identities: they describe what the weights achieve in expectation over repetitions of the randomized design, not a guarantee of exact balance in the realized trial. \(\square\)
Worked Example: Recovering a Marginal Mean From a Stratified Trial
Suppose \(H\) has two strata, with \(P(H=0)=0.6\) and \(P(H=1)=0.4\). The design assigns treatment with probabilities \(g(1\mid 0)=0.8\) and \(g(1\mid 1)=0.25\). Assume the stratum-specific potential-outcome means under treatment are \(E[Y^1\mid H=0]=10\) and \(E[Y^1\mid H=1]=20\). Find the marginal mean under treatment and show what the weighted expectation gives.
The target marginal mean is \(E[Y^1]=0.6(10)+0.4(20)=6+8=14\). For a treated participant, the weights are \(1/0.8=1.25\) in stratum 0 and \(1/0.25=4\) in stratum 1. The expected weighted contribution from stratum 0 to the treatment numerator is \(0.6(0.8)(1.25)(10)=6\). The stratum 1 contribution is \(0.4(0.25)(4)(20)=8\). Their sum is \(14\), the marginal causal mean.
Without weighting, the treated group’s stratum proportions are \(0.48/(0.48+0.10)=0.8276\) in stratum 0 and \(0.10/0.58=0.1724\) in stratum 1. Its expected treated mean is therefore approximately \(0.8276(10)+0.1724(20)=11.724\), not the target 14. The treatment group over-represents the stratum with the larger assignment probability.
Known probabilities versus estimated probabilities
When the randomization protocol supplies \(g(a\mid h)\), using it directly avoids fitting a treatment model to the realized assignment data. An estimated probability instead substitutes a fitted value, such as \(\hat g(a\mid h)\), for the design probability. That substitution can be appropriate when the actual mechanism is unknown, but it is not needed merely because observed treatment proportions differ from the protocol probabilities.
The difference is visible in finite samples. Suppose there are 10 participants in each of two strata. The design assigns treatment with probability 0.5 in both strata, but the realized allocations are 6 treated and 4 untreated in stratum 0, and 4 treated and 6 untreated in stratum 1. Design-based treatment weights are 2 for every treated participant, and control weights are also 2. These weights do not make the weighted counts equal across treatment groups within each stratum in this particular sample.
Worked Example: A Realized Imbalance Is Not a New Design Probability
Continue with the allocation just described. Calculate the stratum-specific weighted counts using (a) the known design probability and (b) the observed treatment fraction as an estimated probability.
Using the known probability. In stratum 0 the treated weighted count is \(6/0.5=12\), and the control weighted count is \(4/0.5=8\). In stratum 1 those counts are \(4/0.5=8\) and \(6/0.5=12\), respectively. The imbalance is a feature of this realization. Under repeated assignments, the design-based weighted counts have the target stratum total in expectation.
Using the observed fractions. In stratum 0, the observed treatment fraction is \(6/10=0.6\), so the treated weight is \(1/0.6=1.667\) and the control weight is \(1/0.4=2.5\). The weighted counts are \(6(1.667)\approx10\) and \(4(2.5)=10\). In stratum 1, the observed treatment fraction is \(4/10=0.4\), so the weights are \(1/0.4=2.5\) for treatment and \(1/0.6=1.667\) for control. The counts are \(4(2.5)=10\) and \(6(1.667)\approx10\).
The estimated fractions force these particular within-stratum totals to agree; that exact finite-sample feature is not evidence that the protocol used probabilities 0.6 and 0.4. Here the stated randomization probabilities are known to be 0.5. Substituting observed fractions changes the weighting rule and introduces estimation variability. In a design with known probabilities, use the probabilities the design actually specified.
For a randomized trial, these weights ordinarily concern treatment assignment. If participants do not adhere, the known probability of assignment is not automatically the probability of receiving the treatment they were assigned. An intention-to-treat analysis targets effects of assignment; a per-protocol analysis involving treatment received needs additional assumptions and methods. The randomization probability alone does not correct nonadherence.
Sequential randomization and accumulated weights
In a study with repeated decisions, assignment probabilities can be known at each decision time. Let \(A_t\) be treatment at time \(t\), \(H_t\) the measured history available just before that assignment, and \(g_t(a_t\mid H_t)\) the probability specified by the randomization algorithm. For a treatment sequence \(\bar a=(a_1,\ldots,a_T)\), the weight for following that sequence is the reciprocal of the product of its conditional assignment probabilities:
Here \(\bar A=\bar a\) means that every observed assignment matches the specified sequence. The product form requires that each probability correspond to the actual history at that decision time. It also requires sequential positivity: each specified action must have positive probability at every history that can arise under the sequence. Under sequential randomization, consistency, and integrability, the weighted outcome expectation for this sequence equals the mean potential outcome under the sequence. This follows because the observed joint distribution along the sequence contains the same conditional assignment-probability factors; multiplying by their reciprocals cancels those factors, leaving the distribution of histories under the specified sequence.
Worked Example: Calculating Weights for Two Randomized Decisions
At time 1, treatment is assigned with probability \(0.5\). At time 2, the probability of treatment is \(0.75\) if \(A_1=1\), and \(0.25\) if \(A_1=0\). Find the cumulative inverse-probability weight for each of the four possible assignment sequences.
For sequence \((1,1)\), the assignment probability is \(0.5(0.75)=0.375\), so its weight is \(1/0.375=8/3\). For \((1,0)\), it is \(0.5(1-0.75)=0.125\), giving weight \(1/0.125=8\).
For \((0,1)\), the assignment probability is \(0.5(0.25)=0.125\), giving weight \(8\). For \((0,0)\), it is \(0.5(1-0.25)=0.375\), giving weight \(8/3\). The two different assignment probabilities at time 2 matter: treating both decision probabilities as one-half would give incorrect weights for three of the four sequences.
The sequential identity can be justified by the factorization of the observed-data distribution. Conditional on baseline information, each time point contributes a treatment-assignment factor \(g_t(a_t\mid H_t)\) and a factor for subsequent measured history and outcome. Restricting to \(\bar A=\bar a\) contributes the product of the assignment factors. Multiplication by \(W_{\bar a}\) cancels that product. The remaining factors are precisely the history and outcome distribution under the fixed sequence, by sequential randomization and consistency. Integrating the outcome against that distribution yields \(E[Y^{\bar a}]\). Positivity ensures the cancellation is defined, and the assumed integrability ensures the expectations exist. \(\square\)
Diagnostics, alternatives, and limitations
Known probabilities remove the need to estimate an assignment model, but they do not guarantee a precise estimate. A small \(g(a\mid h)\) produces a large weight. For the treatment-specific contribution, conditioning on \(H=h\) gives
Thus rare assignments can create high variability even when their probabilities are known perfectly. In a sequential design, small probabilities multiply, so a treatment sequence may have a very large weight. Review the protocol, confirm that the probability used matches each participant’s decision history, check for probability values near zero, and inspect the distribution of the resulting weights. A mismatch between recorded strata and the randomization algorithm, or a probability entered for treatment received instead of assignment, is a design implementation error rather than a problem that a fitted model automatically repairs.
In observational studies, the treatment mechanism is generally not known, so estimated propensity scores are used under assumptions about measured confounding and model adequacy. In randomized studies with genuinely known probabilities, design-based weights are the direct alternative. Neither method guarantees exact balance in a finite sample. Weight truncation or stabilization are different operations and do not change what the original known probability was; they also change the estimator or its interpretation. Very rare assignment patterns may require a different target or a design with better support, not merely a more elaborate calculation.
Common mistakes
- Replacing the protocol probability with the observed fraction. Random variation can make the two differ. Use the known probability when it is genuinely specified and available.
- Claiming exact balance from the population identity. The identity is an expectation over randomization. A finite sample can remain imbalanced, as the worked example shows.
- Using the probability of the wrong event. In an intention-to-treat analysis, the relevant probability is usually the probability of assignment, not the probability of adherence or treatment received.
- Ignoring small probabilities because they are known. Knowledge eliminates probability-model estimation error, not the variability caused by large inverse weights.
Check Your Understanding
Answer each question, then compare with the solutions.
- A trial assigns treatment with probability \(0.4\) in a stratum. What is the treatment weight for a participant assigned treatment and for one assigned control?
- Why can the weighted treatment and control groups fail to have identical covariate distributions in an observed randomized trial?
- At two decision times, the probability of the specified action is \(0.5\) at time 1 and \(0.2\) at time 2. What is the weight for a participant following both specified actions?
- What additional issue arises if a randomized participant does not receive the assigned treatment?
Solutions. (1) The treatment weight is \(1/0.4=2.5\); the control probability is \(1-0.4=0.6\), so the control weight is \(1/0.6=5/3\). (2) The balancing identity is an expectation over repeated random assignments, not a guarantee for each realized sample; finite-sample allocation variation remains. (3) The joint probability is \(0.5(0.2)=0.1\), so the weight is \(1/0.1=10\). (4) Assignment and treatment received differ. The known randomization probability supports inference about assignment, but an analysis of treatment received needs additional assumptions and methods for nonadherence.