Why a Complete ATE Weighting Calculation Matters
Inverse-probability weighting turns a propensity-score model into a weighted comparison of treatment groups. The calculation has several connected parts: estimate each unit’s probability of treatment given measured covariates, assign a weight according to the treatment actually received, and compare the weighted outcome means. A correct arithmetic calculation is not by itself a causal analysis, however. Its interpretation depends on assumptions about confounding, treatment assignment, and the propensity-score model.
This tutorial uses the average treatment effect (ATE) as its target. The introductory material on propensity-score weighting motivates the idea; here the emphasis is on carrying out and checking the full calculation with a small hypothetical dataset.
Assumptions and the ATE Weighting Estimator
The weighting calculation targets the ATE for a population represented by the analysis sample. Its causal interpretation requires the following conditions. First, consistency: the observed outcome is \(Y_i=A_iY_i(1)+(1-A_i)Y_i(0)\), so a unit’s observed outcome equals its potential outcome under the treatment actually received. Second, no interference: one unit’s treatment does not change another unit’s potential outcome. Third, conditional exchangeability: \((Y(1),Y(0))\) is independent of \(A\) given \(X\); in words, the measured pretreatment covariates suffice to control confounding. Fourth, positivity: \(0<e(X_i)<1\) for covariate patterns in the target population. Finally, when scores are estimated with a parametric model, that model must estimate the conditional treatment probabilities adequately for the weighting analysis.
For each unit, the ATE inverse-probability weight is \(1/e(X_i)\) if treated and \(1/[1-e(X_i)]\) if untreated. The normalized, or Hájek, weighted means divide the weighted outcome totals by the total weights in their respective treatment groups. Their difference estimates the ATE.
Here \(\hat e(X_i)\) is the estimated propensity score. Normalizing each group is useful because estimated weights generally do not sum to the sample size in a finite sample. The corresponding unnormalized Horvitz–Thompson estimator instead divides each weighted total by \(n\); it is a different finite-sample calculation, though both target the ATE under the identification conditions.
Worked ATE Calculation
Consider eight hypothetical patients. Treatment is a program, \(A\), and the outcome \(Y\) is a score measured in points. The only measured pretreatment covariate, \(X\), is a binary risk indicator. The table contains no actual study data.
| Unit | \(X\) | \(A\) | \(Y\) (points) |
|---|---|---|---|
| 1 | 0 | 1 | 10 |
| 2 | 0 | 0 | 8 |
| 3 | 0 | 0 | 9 |
| 4 | 0 | 0 | 7 |
| 5 | 1 | 1 | 14 |
| 6 | 1 | 1 | 12 |
| 7 | 1 | 1 | 16 |
| 8 | 1 | 0 | 11 |
Worked Example: Estimate Scores, Apply Weights, and Calculate the ATE
1. Estimate the propensity scores. Fit a logistic treatment model with \(X\) as the covariate:
There is one treated unit out of four when \(X=0\), and three treated units out of four when \(X=1\). This model is saturated for a binary covariate, so its maximum-likelihood fitted probabilities are the observed treatment proportions within the two \(X\) groups: \(\hat e(0)=1/4=0.25\) and \(\hat e(1)=3/4=0.75\). Equivalently, \(\hat\beta_0=\log(0.25/0.75)=-1.0986\) and \(\hat\beta_1=\log(0.75/0.25)-\hat\beta_0=2.1972\). Both fitted scores are strictly between zero and one, and both treatment groups occur at each value of \(X\).
2. Construct the ATE weights. For treated units use \(1/\hat e(X_i)\); for controls use \(1/[1-\hat e(X_i)]\). Thus a treated unit with \(X=0\) receives \(1/0.25=4\), and an untreated unit with \(X=0\) receives \(1/(1-0.25)=1.3333\). For \(X=1\), the corresponding weights are \(1/0.75=1.3333\) for a treated unit and \(1/(1-0.75)=4\) for an untreated unit.
| Unit | \(X\) | \(A\) | \(\hat e(X)\) | ATE weight |
|---|---|---|---|---|
| 1 | 0 | 1 | 0.25 | 4.000 |
| 2 | 0 | 0 | 0.25 | 1.333 |
| 3 | 0 | 0 | 0.25 | 1.333 |
| 4 | 0 | 0 | 0.25 | 1.333 |
| 5 | 1 | 1 | 0.75 | 1.333 |
| 6 | 1 | 1 | 0.75 | 1.333 |
| 7 | 1 | 1 | 0.75 | 1.333 |
| 8 | 1 | 0 | 0.75 | 4.000 |
3. Calculate the weighted means. The treated weighted outcome total is \(10(4)+14(1.3333)+12(1.3333)+16(1.3333)=96\), and the treated weights sum to \(4+1.3333+1.3333+1.3333=8\). Therefore \(\widehat{\mu}_1=96/8=12.00\) points.
For controls, the weighted outcome total is \(8(1.3333)+9(1.3333)+7(1.3333)+11(4)=76\). Their weights sum to \(1.3333+1.3333+1.3333+4=8\), so \(\widehat{\mu}_0=76/8=9.500\) points. The estimated contrast is \(\hat\tau_{ATE}=12.00-9.500=2.500\) points.
Interpretation. Under the stated causal assumptions and the fitted propensity model, the weighted estimate is an average treatment effect of 2.500 outcome points for the population represented by these units. It is not evidence that every individual’s score would increase by 2.500 points, and it does not establish that the assumptions hold.
Why the Weighting Works
The key justification is that inverse-probability weighting removes the treatment-selection factor conditional on \(X\). For treated outcomes, consistency gives \(Y=Y(1)\) when \(A=1\); conditional exchangeability allows the treated potential-outcome mean to represent the potential-outcome mean at that \(X\). The argument is:
The first equality uses consistency for treated units. The second follows by conditioning on \(A\) and using \(P(A=1\mid X)=e(X)\); the last uses conditional exchangeability. For controls, the same reasoning yields:
Averaging each identity over the covariate distribution gives the two population potential-outcome means. Their difference is \(E[Y(1)-Y(0)]\), the ATE. Positivity is needed so the denominators are defined and so both treatment groups can contribute information at relevant covariate patterns. In an actual analysis, estimated scores and finite-sample variation mean the weighted sample quantities are estimates of these population expressions, not identities that must hold exactly.
In the worked example, a further finite-sample check is available. The treated weights sum to 4 for \(X=0\) and 4 for \(X=1\); the control weights do as well. Both weighted groups therefore have the sample’s 50:50 distribution of \(X\). Their weighted means also equal direct standardization: the treated mean is \((10+14)/2=12\), and the control mean is \(((8+9+7)/3+11)/2=9.500\). This agreement follows from the saturated score model and these particular data; it is not guaranteed in every weighted analysis.
Worked Example: Check One Weight and One Contribution
Suppose a separate hypothetical analysis has a fitted score \(\hat e(X_i)=0.20\) for a treated unit whose observed outcome is 15 points. The unit’s ATE weight is \(1/0.20=5\), so its contribution to the treated weighted outcome total is \(5(15)=75\) weighted points, and its contribution to the treated weight total is 5. It does not by itself imply a treated mean of 15 or a treatment effect of 15; the totals must be divided by the weights across all treated units and contrasted with the corresponding control mean.
The score is within the required interval, but that alone cannot verify conditional exchangeability or adequacy of the treatment model. Those require substantive reasoning and analysis of the measured covariates, not just arithmetic on this one record.
Worked Example: Normalize Before Taking the Contrast
In another hypothetical calculation, suppose the treated weighted outcome total is 67.5 points and treated weights sum to 6.25, while the control weighted outcome total is 70 points and control weights sum to 6.25. Then \(\widehat{\mu}_1=67.5/6.25=10.80\) points and \(\widehat{\mu}_0=70/6.25=11.20\) points. The normalized ATE contrast is \(10.80-11.20=-0.400\) points. Under the causal assumptions, this estimates an average outcome 0.400 points lower under treatment for the target population; it does not mean the null effect has been tested or rejected.
The calculation illustrates why the two weighted outcome totals are not themselves the treatment-effect estimates. The totals have been scaled by the weights; divide each by its own group’s total weight before subtracting the means.
Diagnostics, Alternatives, and Limitations
A complete calculation should include checks beyond verifying the formulas. Examine the fitted-score distributions separately by treatment group and inspect the size of the resulting weights. Very small estimated probabilities for observed treated units, or probabilities near one for observed controls, create large weights. Such observations can dominate weighted means and make estimates unstable. Also compare the distributions of measured covariates after weighting; good prediction of treatment is not the same as good covariate balance. Weighted means of covariates, plots, and standardized differences can help assess whether the weighting achieved its intended balance.
These diagnostics cannot establish that all confounders were measured or that conditional exchangeability is true. A score model can be correctly calculated and still omit an important confounder. Likewise, a good balance check for measured covariates is not proof of balance on unmeasured variables. If the model or weights are changed after diagnostics, the analysis and its uncertainty calculations should reflect that estimation process.
ATE weighting is not the only way to adjust for measured confounding. Subclassification compares outcomes within propensity-score strata and combines stratum-specific effects; matching forms comparisons between treated and untreated units with similar scores; outcome regression models the outcome conditional on covariates. These approaches differ in how they construct the comparison and may target different populations when observations are excluded or weighted differently. ATE weighting uses all eligible observations in the weighted means, but can be sensitive to extreme weights and to the propensity model. It also depends on the same core causal identification assumptions; changing the calculation does not remove unmeasured confounding.
Common Pitfalls
- Using the wrong group’s weight. A treated observation receives \(1/\hat e(X_i)\); a control receives \(1/[1-\hat e(X_i)]\). The two formulas are not interchangeable.
- Subtracting weighted totals instead of means. First divide each treatment group’s weighted outcome total by its own sum of weights; then subtract the control mean from the treated mean.
- Calling the estimate a guaranteed causal effect. The weighting formula estimates a causal ATE only under consistency, no interference, conditional exchangeability, positivity, and an adequate propensity-score model.
- Equating a fitted score with proof of balance. Scores are estimates of treatment probabilities. Check the weighted covariates directly, and remember that measured-covariate diagnostics do not address unmeasured confounding.
- Ignoring the target population. ATE weights target the covariate distribution of the population represented by the analysis sample. Generalizing beyond it requires additional sampling and transport assumptions.
Check Your Understanding
Answer each question, then compare your work with the solutions below.
- A treated unit has fitted propensity score 0.40 and outcome 12 points. What is its ATE weight and its contribution to the treated weighted outcome total?
- A control group has weighted outcome total 54 and total weight 6. A treated group has weighted outcome total 75 and total weight 5. Calculate the normalized weighted contrast.
- Why does conditional exchangeability matter for interpreting the weighted contrast causally?
- In a weighted analysis, what does an unusually large ATE weight suggest, and name one diagnostic to examine?
Solutions. (1) The treated weight is \(1/0.40=2.5\). Its weighted outcome contribution is \(2.5(12)=30\) weighted points. (2) The control mean is \(54/6=9\) points; the treated mean is \(75/5=15\) points. The contrast is \(15-9=6\) points. (3) Conditional exchangeability states that, given measured covariates, treatment assignment is independent of the potential outcomes. It lets the weighted observed outcomes represent the corresponding potential-outcome means rather than merely treatment-associated outcomes. (4) A large weight suggests that an observed treatment assignment was unlikely given the estimated score, and that the observation may strongly influence the estimate. Inspect treatment-specific score distributions, the largest weights, or weighted covariate balance.