Matching and weighting
Follow eight people through two ways to estimate the effect among the treated. Who contributes, and how much?
Before adjustment
1 / 6Each dot is one person. T identifies a treated person, C a control. Y is the observed outcome. The crude mean difference is 10.
Mean outcome
Difference 10
Try the effective sample size lab
How the formulas meet
Here kⱼ counts how often control j was matched. For odds weighting within severity strata, the empirical odds e/(1−e) equal the number treated divided by the number of controls in that stratum. Both schemes balance severity for the ATT in this example. Their individual weights differ. A causal interpretation also requires consistency, adequate overlap and exchangeability for the untreated potential outcome among comparable people.
Explore ATT and ATE weighting in depth
How does a weight change a comparison?
Eight people have one measured baseline characteristic: low or high severity. Three of four treated people have high severity, compared with one of four controls. The crude difference in mean outcomes is 22.5 − 12.5 = 10. How much of that comparison depends on the mix of people?
Choose whose population to represent
The propensity score e is the probability of treatment given severity. Here we estimate it by counting: 1/4 in the low stratum and 3/4 in the high stratum. Circle area represents a person’s contribution. The number beside each circle is the weight.
High severity among treated / controls · 75% / 25%
Weighted mean difference · 22.5 − 12.5 = 10
Read the formula
A equals 1 for a treated person and 0 for a control. Treated people keep weight 1. A high-severity control receives odds 3: that one control supplies three control-side contributions. Both sides end up 75% high severity.
Divide by the sum of weights separately in each arm. Only the final slider setting uses the chosen target weights; intermediate positions illustrate the transition.
Why do the targets differ?
In these constructed data, outcomes are constant within each severity and treatment cell. The low-severity contrast is 12 − 10 = 2; the high-severity contrast is 26 − 20 = 6. Among treated people their average is ¼ × 2 + ¾ × 6 = 5. Across everyone it is ½ × 2 + ½ × 6 = 4. Exact matching here retains every treated person. Without suitable controls, dropping treated people can change the target. In real samples, matching and weighting can differ even when they target the same effect.
What makes the contrast causal?
A causal interpretation requires consistency, conditional exchangeability for the relevant potential outcomes, and adequate overlap for the target population. Inspect covariate balance and influential weights. Balancing measured severity alone cannot rule out unmeasured confounding.