Tutorials › Marginal Structural Models › Using Probabilities Rather Than Odds in Weights

Inverse Probability of Treatment Weights · Tutorial 122 of 501

Using Probabilities Rather Than Odds in Weights

See how probability-based weights recreate the target covariate distribution, and why reciprocal odds generally do not.

Advanced 12 min read

What You'll Learn

  • Define inverse probability weights for a binary treatment using fitted treatment probabilities.
  • Derive how probability weights recover the covariate distribution in each treatment group.
  • Compare probability weights with reciprocal odds using a numerical example.
  • Identify the assumptions needed to connect weighted outcomes to potential-outcome means.
  • Recognize when an odds-based weighting scheme targets a different distribution.

Why the Denominator Must Match the Assignment Probability

Inverse probability weighting aims to correct the fact that people with different covariate histories may have different probabilities of receiving each treatment. At a single decision time, the basic correction is direct: an observed treatment group is weighted by the inverse of the probability of receiving the treatment actually received. The denominator is a probability, not the odds corresponding to that probability.

This distinction is not cosmetic. Probabilities describe the fraction of a covariate-defined group assigned to a treatment. Dividing by that fraction restores the representation of the full group. Odds compare the probability of one assignment with the probability of another; their reciprocals do not perform the same correction.

Definition: Let \(A\in\{0,1\}\) be treatment at one decision time, \(H\) the observed covariate history available before that decision, and \(Y\) the outcome. Write \(p(H)=P(A=1\mid H)\). The unstabilized inverse probability of treatment weight for the observed treatment is $$ W=\frac{I(A=1)}{p(H)}+\frac{I(A=0)}{1-p(H)}. $$ Thus a treated individual receives weight \(1/p(H)\), and an untreated individual receives weight \(1/\{1-p(H)\}\).

In practice, a model supplies a fitted probability \(\hat p(H)\), and the same formula is evaluated with \(\hat p(H)\) in place of \(p(H)\). A logistic model may express its linear predictor as log odds, but it converts that predictor to a fitted probability before the inverse probability weight is formed. A fitted odds value is not a substitute for that probability.

For the usual marginal treatment contrast, the target is the population represented by the observed \(H\) distribution. If treatment probabilities depend on \(H\), the raw treatment groups generally do not each represent that distribution. Probability weights correct this imbalance, subject to the assumptions below.

The Reweighting Identity

The key calculation can be stated without reference to an outcome. For any integrable function \(g(H)\), weighting the treated observations by the inverse treatment probability recovers the population expectation of \(g(H)\). The analogous statement holds for untreated observations.

Theorem: Suppose \(0<P(A=a\mid H)<1\) almost surely for \(a\in\{0,1\}\), and \(E[|g(H)|]<\infty\). Then $$ E\left[\frac{I(A=a)g(H)}{P(A=a\mid H)}\right]=E[g(H)]. $$ Here \(P(A=1\mid H)=p(H)\) and \(P(A=0\mid H)=1-p(H)\).

Proof. Since \(g(H)\) and \(P(A=a\mid H)\) are functions of \(H\), iterated expectation gives $$ E\left[\frac{I(A=a)g(H)}{P(A=a\mid H)}\right] = E\left[ \frac{g(H)}{P(A=a\mid H)} E\{I(A=a)\mid H\} \right]. $$ By definition, \(E\{I(A=a)\mid H\}=P(A=a\mid H)\). Positivity makes the denominator nonzero, so the expression reduces to \(E[g(H)]\). The integrability assumption ensures the expectation is well-defined. \(\square\)

The identity explains why odds are not interchangeable with probabilities. Let \(q_a(H)=P(A=a\mid H)\). The probability weight is \(1/q_a(H)\). The odds of receiving \(a\) rather than the other treatment are \(q_a(H)/\{1-q_a(H)\}\), whose reciprocal is \(\{1-q_a(H)\}/q_a(H)\). If that reciprocal is used as a weight, then conditioning on \(H\) gives $$ E\left[I(A=a)\frac{1-q_a(H)}{q_a(H)}\middle|H\right] =q_a(H)\frac{1-q_a(H)}{q_a(H)} =1-q_a(H), $$ not \(1\). The covariate histories are therefore not restored to their original distribution.

Worked Examples: Probability Weights and Reciprocal Odds

Worked Example: A Two-Stratum Treatment Model

Suppose \(H\) is binary, with \(P(H=0)=P(H=1)=0.5\). Treatment probabilities are \(P(A=1\mid H=0)=0.8\) and \(P(A=1\mid H=1)=0.2\). Calculate the weighted covariate distribution among treated people using probability weights, then compare it with reciprocal odds weights.

Among treated people, the unweighted masses from the full population are \(0.5(0.8)=0.4\) at \(H=0\) and \(0.5(0.2)=0.1\) at \(H=1\). With probability weights, these become $$ 0.4\left(\frac{1}{0.8}\right)=0.5,\qquad 0.1\left(\frac{1}{0.2}\right)=0.5. $$ After normalization, the treated weighted group has \(P(H=0)=P(H=1)=0.5\), matching the population distribution.

Now weight treated people by the reciprocal of the treatment odds, \((1-p)/p\). The two weighted masses are $$ 0.4\left(\frac{0.2}{0.8}\right)=0.1,\qquad 0.1\left(\frac{0.8}{0.2}\right)=0.4. $$ Their sum is \(0.5\), so the normalized masses are \(0.2\) at \(H=0\) and \(0.8\) at \(H=1\). The odds-based weights have not recreated the population covariate distribution; they have shifted it toward \(H=1\).

Worked Example: Checking Both Treatment Groups

Use the same population and treatment probabilities. Among untreated people, the unweighted masses are \(0.5(1-0.8)=0.1\) at \(H=0\) and \(0.5(1-0.2)=0.4\) at \(H=1\). Their probability weights are \(1/0.2=5\) and \(1/0.8=1.25\), respectively. Thus the weighted masses are $$ 0.1(5)=0.5,\qquad 0.4(1.25)=0.5. $$ The untreated weighted group also has equal representation from the two values of \(H\), as required.

For untreated people, the odds of being untreated are \((1-p)/p\), so their reciprocal-odds weights are \(p/(1-p)\). At \(H=0\), this is \(0.8/0.2=4\); at \(H=1\), it is \(0.2/0.8=0.25\). The weighted masses are $$ 0.1(4)=0.4,\qquad 0.4(0.25)=0.1. $$ After normalization, the untreated group has proportions \(0.8\) at \(H=0\) and \(0.2\) at \(H=1\), the reverse of the treated group under reciprocal odds weighting. In contrast, probability weights made each group match the original \(0.5,0.5\) distribution.

Worked Example: Linking the Weights to a Causal Mean

Let \(Y^1\) and \(Y^0\) be the potential outcomes under treatment and no treatment. Assume consistency (\(Y=Y^A\)), conditional exchangeability (\(Y^a\) is independent of \(A\) given \(H\)), positivity, and finite \(E[|Y^a|]\). Show why the probability-weighted outcome for treatment \(a\) identifies \(E[Y^a]\).

For either \(a=0\) or \(a=1\), consistency gives \(Y=Y^a\) when \(A=a\). Conditional exchangeability gives \(E[Y^a\mid H,A=a]=E[Y^a\mid H]\). Therefore $$ E\left[\frac{I(A=a)Y}{P(A=a\mid H)}\middle|H\right] = \frac{P(A=a\mid H)E[Y\mid H,A=a]}{P(A=a\mid H)} =E[Y^a\mid H]. $$ The denominator is positive by positivity. Taking expectations over \(H\) yields $$ E\left[\frac{I(A=a)Y}{P(A=a\mid H)}\right] =E[E[Y^a\mid H]] =E[Y^a]. $$ The probability is what cancels the conditional chance of being observed in treatment group \(a\). Replacing it with odds leaves an extra factor \(1-P(A=a\mid H)\), so this derivation no longer identifies the stated marginal potential-outcome mean.

Assumptions, Diagnostics, and Alternatives

The algebraic covariate-recovery identity requires correctly specified probabilities and positivity; causal interpretation of a weighted outcome additionally requires consistency and conditional exchangeability given the measured pre-treatment history. In an estimated analysis, fitted probabilities must adequately approximate the relevant conditional probabilities. If some fitted probabilities are close to zero or one, inverse probabilities become large, and a few observations can dominate the weighted analysis.

Useful checks include examining the fitted probability range, the largest weights, and the effective sample size, as well as comparing weighted covariate distributions across treatment groups. A large residual imbalance, extremely large weights, or sensitivity to a small number of observations suggests problems such as poor model fit, sparse treatment support, or practical positivity violations. These checks diagnose concerns; they do not establish exchangeability or prove that the model is correct.

The principal alternatives estimate the same causal target in different ways. Standardization (the parametric g-formula) models outcomes and averages predicted outcomes over the target covariate distribution; matching constructs comparisons using similar covariate histories; doubly robust estimators combine treatment and outcome models. These methods have their own assumptions and diagnostics. None changes the definition of the ordinary inverse probability weight: it remains the reciprocal of the probability of the observed treatment.

Quantity used in weightingFor treatment level \(a\)Distribution induced within \(H\)
Inverse probability\(1/q_a(H)\)Proportional to the original distribution of \(H\)
Reciprocal odds\(\{1-q_a(H)\}/q_a(H)\)Proportional to \(\{1-q_a(H)\}\) times the original distribution

Reciprocal odds weights are not universally meaningless: a deliberately designed procedure may use them to target a different population or estimand. But they do not implement the usual inverse probability correction for a marginal treatment effect in the original population. The key question is not whether odds can be calculated from fitted probabilities; it is whether the chosen denominator corresponds to the target distribution and estimand.

Common mistake: “The fitted odds are \(p/(1-p)\), so I can weight treated people by their reciprocal and untreated people by the reciprocal odds of no treatment.” This substitutes \((1-p)/p\) and \(p/(1-p)\) for \(1/p\) and \(1/(1-p)\). As the two-stratum example shows, those weights tilt the treatment groups in opposite directions rather than making each represent the population’s covariate distribution. For ordinary inverse probability weighting, first obtain the fitted probability of the treatment actually received, then take its reciprocal.

Check Your Understanding

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

  1. If \(P(A=1\mid H)=0.7\), what is the ordinary inverse probability weight for an untreated person with that history?
  2. Why do probability weights restore the distribution of \(H\) in a treatment group?
  3. For a treatment probability \(q_a(H)\), what factor remains in the weighted conditional mass if the reciprocal odds \(\{1-q_a(H)\}/q_a(H)\) is used?
  4. Name two causal assumptions, in addition to positivity, needed to interpret the weighted outcome as a potential-outcome mean.

Solutions. (1) The probability of no treatment is \(1-0.7=0.3\), so the weight is \(1/0.3=10/3\). (2) Conditional on \(H\), the probability of entering that treatment group is \(q_a(H)\); multiplying its indicator by \(1/q_a(H)\) cancels that probability, leaving conditional mass one. (3) The factor is \(1-q_a(H)\), since \(q_a(H)\{1-q_a(H)\}/q_a(H)=1-q_a(H)\). (4) Consistency and conditional exchangeability given the measured pre-treatment history are required for the causal interpretation described here.

Clinical Biostats