Why Invert a Treatment Probability?
In an observational study, treatment assignment may depend on measured characteristics. A treated unit with characteristics rarely seen among treated units can carry different information from a treated unit with a common treatment profile. Inverse probability weighting (IPW) represents this difference by assigning each unit a weight based on the probability of receiving the treatment actually observed for that unit.
The weight is determined by two ingredients: the unit’s observed treatment status and its propensity score. A propensity score is a treatment probability conditional on measured, pre-treatment covariates; an estimated propensity score is used in practice. The purpose here is to define that unit-level weight and make its arithmetic consequences explicit. A weight is not, by itself, proof that a weighted comparison has a causal interpretation.
Thus, a treated unit is weighted by the reciprocal of its estimated probability of treatment, while an untreated unit is weighted by the reciprocal of its estimated probability of remaining untreated. The denominator is always the probability of the treatment status actually observed—not the probability of the status that was not observed.
These formulas require \(0<\hat e_i<1\) for every unit whose weight is calculated. More fundamentally, the corresponding treatment probabilities in the population must be positive for the treatment status under consideration. If a covariate profile makes one treatment status impossible, its inverse probability is undefined; if that probability is merely very small, its reciprocal can be very large.
From a Weight to an Analysis Contribution
A weighted calculation multiplies each unit’s contribution by its weight. For example, if \(Y_i\) is an outcome and a calculation sums weighted outcomes, unit \(i\) contributes \(w_iY_i\), rather than \(Y_i\). A large weight magnifies that unit’s contribution; a weight near one leaves it close to its unweighted contribution. This arithmetic description applies to weighted sums and many weighted estimating procedures, but it does not specify which causal estimand an analysis targets.
The reciprocal has a simple justification. Suppose the true propensity score is \(e(X)\) and is strictly between zero and one. Conditional on \(X\), the chance that \(A=1\) is \(e(X)\). Therefore the expected treated contribution weighted by \(1/e(X)\), before considering an outcome, is one. The corresponding expected untreated contribution weighted by \(1/\{1-e(X)\}\) is also one:
This calculation explains why the observed treatment probability is inverted: on average, the reciprocal offsets the chance of observing that treatment status for a given covariate profile. It is an algebraic justification for the weighting factor, not a demonstration that a particular weighted outcome contrast identifies a causal effect. Replacing \(e(X)\) by an estimated score also means that the weights depend on the fitted propensity model.
Worked Example: Calculating Weights for Both Treatment Groups
Consider four hypothetical units. Their treatment statuses and estimated propensity scores are shown below. Calculate each unit’s weight using the probability of its observed treatment status.
| Unit | \(A_i\) | \(\hat e_i\) | Calculation | \(w_i\) |
|---|---|---|---|---|
| 1 | 1 | 0.80 | \(1/0.80\) | 1.25 |
| 2 | 0 | 0.80 | \(1/(1-0.80)\) | 5.00 |
| 3 | 1 | 0.25 | \(1/0.25\) | 4.00 |
| 4 | 0 | 0.25 | \(1/(1-0.25)\) | 1.333 |
For unit 1, treatment was likely according to the estimated score, so its weight is \(1.25\). Unit 2 has the same score but was untreated; its observed status had estimated probability \(0.20\), giving \(1/0.20=5\). For unit 3, the observed treatment probability is \(0.25\), so its weight is \(4\). For unit 4, the probability of being untreated is \(0.75\), giving \(1/0.75\approx1.333\). The same propensity score can therefore yield different weights depending on whether the unit was treated.
Seeing the Unit-Level Contributions
The weight acts on whatever quantity the analysis uses from that unit. The next hypothetical example makes this multiplication visible. It does not interpret the resulting totals as a treatment effect: a causal contrast requires additional assumptions and a clearly specified target.
Worked Example: Weighted Outcome Contributions
Suppose four hypothetical units have outcome \(Y_i\), observed treatment \(A_i\), and estimated propensity score \(\hat e_i\). Calculate their inverse probability weights and their weighted outcome contributions \(w_iY_i\).
| Unit | \(A_i\) | \(\hat e_i\) | \(Y_i\) | \(w_i\) | \(w_iY_i\) |
|---|---|---|---|---|---|
| 1 | 1 | 0.20 | 12 | 5.000 | 60.00 |
| 2 | 1 | 0.50 | 10 | 2.000 | 20.00 |
| 3 | 0 | 0.80 | 8 | 5.000 | 40.00 |
| 4 | 0 | 0.40 | 6 | 1.667 | 10.00 |
For unit 1, \(w_1=1/0.20=5\), so its weighted outcome contribution is \(5(12)=60\). Unit 2 has \(w_2=1/0.50=2\), contributing \(2(10)=20\). Unit 3 was untreated, so \(w_3=1/(1-0.80)=5\), contributing \(5(8)=40\). Unit 4 has \(w_4=1/(1-0.40)=1/0.60\approx1.667\), contributing \(1.667(6)\approx10.00\).
The weighted outcome contributions sum to \(80.00\) among the treated units and approximately \(50.00\) among the untreated units. These are weighted totals, not weighted means or a causal effect. A mean would also require a denominator, and interpreting any contrast causally would require further design and identification conditions.
Assumptions and Practical Checks
The arithmetic definition needs a fitted score strictly between zero and one. Using the weights for causal reasoning requires more. Let \(Y_i(1)\) and \(Y_i(0)\) denote the potential outcomes for unit \(i\) under treatment and no treatment. A common set of assumptions includes consistency (the observed outcome equals the potential outcome for the treatment received), conditional exchangeability given measured pre-treatment covariates, and positivity (both treatment statuses have positive probability at covariate profiles in the target population). The propensity model must also estimate the relevant treatment probabilities adequately for the weighting calculation to work as intended.
These conditions are not guaranteed by fitting a propensity model or computing weights. In particular, measured-covariate adjustment cannot remove confounding from variables that were not measured or not properly represented in the model. The course’s earlier material on propensity scores provides the basic role of measured covariates in treatment assignment; here the emphasis is on how fitted probabilities translate into unit-level multipliers.
A practical check begins with the fitted scores and the weights, not just the final weighted result. Review the score distributions separately for treated and untreated units. Inspect the largest weights and determine which units and covariate profiles produce them. Very small \(\hat e_i\) for a treated unit or very large \(\hat e_i\) for an untreated unit signals that the observed status was assigned a small fitted probability and the reciprocal will be influential.
Also verify that treatment coding is consistent throughout the data and model. If the model’s event category is coded as \(A=0\) while the analysis treats \(A=1\) as treatment, using the model output as \(\hat e_i\) without checking its meaning reverses the intended probabilities. Confirm that all variables used to estimate the propensity score are measured before treatment; post-treatment variables can create bias rather than appropriately adjust treatment assignment.
Common Mistakes, Alternatives, and Limitations
- Using the wrong denominator. A treated unit’s weight is \(1/\hat e_i\); an untreated unit’s weight is \(1/(1-\hat e_i)\). Use the probability of the observed status.
- Assuming a large weight means a large outcome. The weight reflects the fitted treatment probability, not the outcome’s size. The weighted outcome contribution is the product \(w_iY_i\).
- Treating calculated weights as proof of balance or causality. Weight construction alone does not establish adequate covariate balance, correct model specification, exchangeability, or positivity.
- Ignoring extreme values. A few large weights can make a weighted result unstable and sensitive to individual observations. Report and investigate them rather than hiding them.
- Confusing a weighted total with a mean or effect. A total \(\sum_i w_iY_i\) is not automatically a normalized mean or a causal contrast.
IPW is one approach to measured-covariate adjustment. Matching instead forms or selects comparisons using similarity in observed covariates or propensity scores; it can leave units unmatched and changes which observations contribute. Stratification groups units into covariate or propensity-score strata, which can make within-group comparisons more transparent but may leave residual differences within strata. Outcome regression models the outcome conditional on covariates rather than assigning these inverse-probability multipliers. These approaches have different diagnostics and limitations; none automatically resolves unmeasured confounding.
Extreme weights are especially important because they can increase variability and make results depend heavily on a few observations. Analysts sometimes consider restricting the analysis to a region of adequate overlap or modifying extreme weights, but such decisions change the analysis and may change the population represented. They should be motivated, reported, and accompanied by sensitivity checks—not applied as a cosmetic repair. A fitted propensity score is also estimated rather than known, so uncertainty in the fitted model is part of the analysis.
Worked Example: Diagnosing a Very Large Weight
A hypothetical treated unit has \(\hat e_i=0.04\). Calculate its weight and explain what it signals.
Because \(A_i=1\), its weight is the reciprocal of its estimated treatment probability:
This unit’s contribution is multiplied by 25 in a weighted calculation. The value does not prove that the score model is wrong: a genuine low treatment probability can produce a large weight. It does, however, warrant checking model fit, covariate overlap, coding, and the unit’s influence on the result. If the unit represents a covariate profile with almost no comparable treated units, the data provide limited support for comparisons involving that profile.
Check Your Understanding
Answer each question, then compare your reasoning with the solutions.
- A treated unit has estimated propensity score \(0.40\). What is its inverse probability weight?
- An untreated unit has estimated propensity score \(0.90\). Calculate its weight and explain why the weight is large.
- A treated unit has \(Y_i=7\) and weight \(2.5\). What is its weighted outcome contribution?
- Why can a propensity score of exactly zero cause a problem for a treated unit’s weight?
- Does computing inverse probability weights alone establish that a weighted comparison is causal? State one additional condition needed for a causal interpretation.
Solutions. (1) For a treated unit, \(w_i=1/\hat e_i=1/0.40=2.5\). (2) For an untreated unit, \(w_i=1/(1-\hat e_i)=1/(1-0.90)=10\). Its observed untreated status has estimated probability \(0.10\), so the reciprocal is large. (3) The contribution is \(w_iY_i=2.5(7)=17.5\). (4) Its treated-unit weight would be \(1/0\), which is undefined; this reflects a failure of positivity for that treatment status at the represented profile. (5) No. For example, causal interpretation also requires conditional exchangeability given measured pre-treatment covariates, along with consistency and positivity.