Tutorials › Marginal Structural Models › Defining Inverse Probability Treatment Weights

Inverse Probability of Treatment Weights · Tutorial 81 of 501

Defining Inverse Probability Treatment Weights

Learn to assign the correct inverse probability to each observed treatment, verify the resulting covariate balance, and understand the assumptions needed for a causal interpretation.

Advanced 10 min read

What You'll Learn

  • Define the assignment-specific inverse probability weight for binary treatment.
  • Distinguish the probability needed for treated and untreated observations.
  • Derive the covariate-balancing identity for unstabilized weights.
  • Interpret positivity without imposing unnecessary integrability conditions.
  • Connect weighting to a causal mean under explicit identification assumptions.
  • Recognize weight instability and distinguish unstabilized from stabilized weights.

Why the Assignment-Specific Probability Matters

For a binary treatment, an inverse probability treatment weight is built from the probability of the treatment an individual actually received, conditional on the covariates used to describe treatment assignment. A treated individual and an untreated individual therefore use different probabilities. Confusing those two denominators reverses the intended correction and can produce very large errors.

Let \(A\in\{0,1\}\) denote treatment received, and let \(L\) denote measured covariates recorded before treatment. Define the conditional treatment probability \(e(L)=P(A=1\mid L)\). The probability of receiving treatment value \(a\), conditional on \(L\), is denoted by \(p_a(L)\). For binary treatment, \(p_1(L)=e(L)\) and \(p_0(L)=1-e(L)\).

Definition: The unstabilized inverse probability treatment weight for an individual assigned \(A=a\) is \(W_a=1/p_a(L)\). The observed weight is \(W=I(A=1)/e(L)+I(A=0)/[1-e(L)]\), where \(I(\cdot)\) is the indicator function. Thus, a treated individual receives \(1/e(L)\), while an untreated individual receives \(1/[1-e(L)]\).

The denominator is the probability of the observed assignment, not the probability of the alternative treatment. If \(A=1\), use \(e(L)\); if \(A=0\), use \(1-e(L)\). The weight increases the contribution of an assignment that was relatively unlikely among individuals with those covariates.

Positivity and the Meaning of a Defined Weight

The conditional probabilities must be nonzero for the assignment-specific weights to be defined. The standard positivity condition for both treatment options is \(0<e(L)<1\) almost surely in the population under study. This says that, at covariate values that occur, each treatment option has positive conditional probability. In a finite data set, estimated probabilities close to zero or one can still create very large weights even when the population condition holds.

Positivity does not require \(1/e(L)\) or \(1/[1-e(L)]\) to have finite expectation on their own. The weight actually observed in a given arm includes the indicator for receiving that arm. Conditional on \(L\), the probability of that indicator is exactly the probability in the denominator. This distinction is important: the assignment-specific weights have finite expectation under positivity, even in cases where a reciprocal-probability function has infinite expectation.

Worked Example: Choosing the Denominator From the Observed Assignment

Suppose \(e(L)=0.8\) for an individual with covariates \(L\). The probability of treatment is \(0.8\), and the probability of no treatment is \(1-0.8=0.2\).

If this individual is treated, \(A=1\), so the weight is \(1/0.8=1.25\). If this individual is untreated, \(A=0\), so the weight is \(1/0.2=5\).

The untreated weight is not \(1/0.8\): an untreated observation represents individuals with these covariates who had probability \(0.2\) of being untreated. The larger weight of 5 reflects that this assignment was less common. In either case, the probability used is the one for the assignment observed.

The Covariate-Balancing Identity

The defining algebraic property of the unstabilized weights is that, in expectation, each treatment group reproduces the covariate distribution in the full population. This statement concerns the population weights defined using the true conditional probabilities. It does not guarantee exact balance in a finite sample or when probabilities are estimated inaccurately.

Theorem: Suppose \(A\) is binary, \(p_a(L)=P(A=a\mid L)>0\) almost surely for \(a\in\{0,1\}\), and \(g(L)\) is integrable, meaning \(E[|g(L)|]<\infty\). Then \(E[I(A=a)g(L)/p_a(L)]=E[g(L)]\) for each \(a\in\{0,1\}\). In particular, each assignment-specific weight \(W_a=I(A=a)/p_a(L)\) has expectation one.

Proof. By the law of iterated expectations and the definition of \(p_a(L)\),

$$ \begin{aligned} E\left[\frac{I(A=a)g(L)}{p_a(L)}\right] &=E\left[E\left\{\left.\frac{I(A=a)g(L)}{p_a(L)}\right|L\right\}\right]\\ &=E\left[\frac{g(L)}{p_a(L)}E\{I(A=a)\mid L\}\right]\\ &=E\left[\frac{g(L)}{p_a(L)}p_a(L)\right]\\ &=E[g(L)]. \end{aligned} $$

The expectations are well-defined: conditioning on \(L\) gives \(E[I(A=a)|g(L)|/p_a(L)\mid L]=|g(L)|\), so the absolute expectation of the weighted quantity is \(E[|g(L)|]<\infty\). Taking \(g(L)=1\) gives \(E[W_a]=1\). Taking \(g(L)\) to be the indicator of any covariate set shows that the weighted covariate distribution in arm \(a\), before normalization, matches the population distribution. \(\square\)

Worked Example: Checking Balance With a Binary Covariate

Let \(L\in\{0,1\}\), with \(P(L=1)=P(L=0)=0.5\). Suppose \(P(A=1\mid L=1)=0.8\) and \(P(A=1\mid L=0)=0.2\). The assignment-specific weights are:

Covariate valueTreated weightUntreated weight
\(L=1\)\(1/0.8=1.25\)\(1/(1-0.8)=5\)
\(L=0\)\(1/0.2=5\)\(1/(1-0.2)=1.25\)

Among treated individuals with \(L=1\), the probability mass before weighting is \(P(L=1,A=1)=0.5(0.8)=0.4\). Its weighted mass is \(0.4(1.25)=0.5\). For treated individuals with \(L=0\), the mass is \(0.5(0.2)=0.1\), and its weighted mass is \(0.1(5)=0.5\). Thus the treated weighted mass is \(0.5\) at each value of \(L\), matching the population masses.

For untreated individuals, the mass with \(L=1\) is \(0.5(0.2)=0.1\), which becomes \(0.1(5)=0.5\). The mass with \(L=0\) is \(0.5(0.8)=0.4\), which becomes \(0.4(1.25)=0.5\). The same balance holds in the untreated arm. The total expected weight in each arm is \(0.5+0.5=1\), as the theorem requires.

When the Weights Identify a Causal Mean

Balancing measured covariates is not, by itself, proof that a weighted comparison is causal. For a single-time causal interpretation, let \(Y^a\) be the potential outcome under treatment \(a\). Suppose consistency holds, so \(Y=Y^A\); conditional exchangeability holds, so \(Y^a\) is independent of \(A\) given \(L\) for each \(a\); positivity holds; and \(E[|Y^a|]<\infty\). Under these assumptions, the inverse probability weighted mean in arm \(a\) identifies \(E[Y^a]\).

Result: Under consistency, conditional exchangeability, positivity, and integrability of the potential outcome, \(E[I(A=a)Y/p_a(L)]=E[Y^a]\).

Derivation. Conditional on \(L\), the weighted observed outcome has expectation

$$ \begin{aligned} E\left[\left.\frac{I(A=a)Y}{p_a(L)}\right|L\right] &=\frac{P(A=a\mid L)}{p_a(L)}E[Y\mid A=a,L]\\ &=E[Y\mid A=a,L]\\ &=E[Y^a\mid A=a,L]\\ &=E[Y^a\mid L]. \end{aligned} $$

The first equality conditions on the assignment and covariates; the second uses \(P(A=a\mid L)=p_a(L)\); the third uses consistency among those assigned \(a\); and the fourth uses conditional exchangeability. Taking expectations over \(L\) gives \(E[Y^a]\). Integrability ensures the expectations exist: by the same conditioning argument applied to absolute values, \(E[I(A=a)|Y|/p_a(L)]=E[|Y^a|]<\infty\). Thus the weighted mean targets a causal mean under the stated assumptions, rather than merely because a weighting formula was applied. \(\square\)

Worked Example: Recovering a Marginal Mean

Continue with the binary-covariate population above. Suppose the conditional mean of \(Y^1\) is 12 when \(L=1\) and 8 when \(L=0\), and the conditional mean of \(Y^0\) is 10 when \(L=1\) and 6 when \(L=0\). Under the causal identification assumptions just stated, the marginal potential-outcome means are

$$ E[Y^1]=0.5(12)+0.5(8)=10,\qquad E[Y^0]=0.5(10)+0.5(6)=8. $$

For treatment, the weighted contribution to \(E[I(A=1)Y/e(L)]\) from \(L=1\) is \(0.5(0.8)(1/0.8)(12)=0.5(12)=6\). The contribution from \(L=0\) is \(0.5(0.2)(1/0.2)(8)=0.5(8)=4\). Their sum is 10.

For no treatment, the contribution from \(L=1\) is \(0.5(0.2)(1/0.2)(10)=5\). The contribution from \(L=0\) is \(0.5(0.8)(1/0.8)(6)=3\). Their sum is 8. The weighted contrast is therefore \(10-8=2\), equal to the marginal contrast of the potential-outcome means. These are population calculations using the true probabilities, not a claim that a finite-sample estimate must equal these values exactly.

Finite Expected Weights Do Not Mean Small Weights

The identity for \(g(L)=1\) has a useful implication: \(E[I(A=a)/p_a(L)]=1\), even when the reciprocal \(1/p_a(L)\) has infinite expectation. The indicator and the denominator must be considered together. This does not imply that weights are bounded, that their variance is finite, or that a finite-sample estimate will be stable.

Worked Example: Positivity With an Infinite Reciprocal-Probability Mean

Let \(L\) be uniform on \((0,1)\), and let \(P(A=1\mid L)=e(L)=L\). Then \(0<L<1\) almost surely, so both treatment options have positive probability almost surely. However,

$$ E\left[\frac{1}{e(L)}\right] =\int_0^1\frac{1}{l}\,dl =\infty. $$

For the treated assignment-specific weight, conditioning on \(L\) gives \(E[I(A=1)/e(L)\mid L]=L/L=1\). Hence \(E[I(A=1)/e(L)]=1\), which is finite. For the untreated weight, \(P(A=0\mid L)=1-L\), and \(E[I(A=0)/(1-e(L))\mid L]=(1-L)/(1-L)=1\); its expectation is also 1. Both observed assignment-specific weights are finite almost surely, although the reciprocal treatment-probability function has infinite mean.

The weights can nevertheless be highly variable. For example, \(E[(I(A=1)/e(L))^2\mid L]=L/L^2=1/L\), whose expectation over uniform \(L\) is infinite. Thus finite expected weight does not guarantee a finite second moment or protection from unstable estimates.

Stabilization, Diagnostics, and Limitations

A commonly used alternative is a stabilized weight. For an observed assignment \(A=a\), define \(p_a=P(A=a)\), the marginal treatment probability, and use \(p_a/p_a(L)\). The numerator is constant across covariate values within an arm. Consequently, each arm’s expected stabilized weight is \(p_a\), rather than 1; the total expected stabilized weight is 1. Under the true probabilities, the weighted joint distribution of \(A\) and \(L\) factors as \(P(A=a)P(L)\), so treatment is independent of \(L\) in that weighted population. Stabilization changes the scale and can reduce variability; it does not remove the need for positivity or correct treatment probabilities.

In practice, examine the estimated assignment-specific weights separately by treatment arm. Large maximum weights, a long right tail, a small effective sample size, or poor covariate balance after weighting can indicate near-violations of positivity, model misspecification, or sparse data. These are warning signs, not proof of a single particular cause. The true probabilities are generally unknown; estimating them is a separate modeling task.

  • Wrong denominator: using \(e(L)\) for an untreated observation gives the inverse probability of the opposite assignment. Use \(1-e(L)\) when \(A=0\).
  • Confusing positivity with bounded weights: probabilities can be positive but arbitrarily close to zero. Positivity almost surely ensures definition, not a useful upper bound.
  • Demanding an unnecessary moment: \(E[1/e(L)]<\infty\) is not required for \(E[I(A=1)/e(L)]=1\). The indicator must remain in the calculation.
  • Calling balance a causal guarantee: weighted balance addresses measured covariates under the specified probabilities. Causal interpretation additionally requires consistency and conditional exchangeability, among other assumptions.

Inverse probability weighting is useful because it gives a precise population reweighting rule: each arm represents the covariate distribution of the target population. Its limitations are equally precise. Unmeasured confounding is not repaired by weighting measured covariates, and near-zero assignment probabilities can make empirical estimates unstable even when the formal population weight is defined.

Check Your Understanding

Work through each question, then compare your reasoning with the solutions below.

  1. If \(e(L)=0.3\) and an individual received no treatment, what is the unstabilized weight?
  2. Why does \(E[I(A=1)/e(L)]=1\) not imply that \(E[1/e(L)]\) is finite?
  3. Under what assumptions does the weighted mean in treatment arm \(a\) identify \(E[Y^a]\)?
  4. If all estimated probabilities are positive but some are very close to zero, what should be checked, and what does positivity alone guarantee?

Solutions. (1) The no-treatment probability is \(1-0.3=0.7\), so the weight is \(1/0.7=10/7\), approximately 1.43. (2) The expectation includes the assignment indicator: conditional on \(L\), \(E[I(A=1)/e(L)\mid L]=e(L)/e(L)=1\). The indicator offsets the small probability in the denominator, whereas \(1/e(L)\) alone need not be integrable. (3) Consistency, conditional exchangeability of \(Y^a\) and \(A\) given \(L\), positivity, and integrability of \(Y^a\) give the identification result. (4) Inspect arm-specific weight tails, extreme values, effective sample size, and weighted covariate balance. Positivity almost surely guarantees that the true assignment-specific weights are defined almost surely; it does not guarantee bounded or low-variance weights, nor does it ensure that estimated probabilities are accurate.

Clinical Biostats