How this calculation works
Calculate separately normalized inverse-probability-weighted ATE or ATT outcome contrasts from supplied propensity scores, with overlap and weight concentration diagnostics.
ATE weights: T/e and (1−T)/(1−e); ATT weights: T and (1−T)e/(1−e); Δ=Σw1Y/Σw1−Σw0Y/Σw0.A worked example
The eight supplied observations yield normalized ATE means approximately 12.344828 and 9.156522, a difference 3.188306; effective sample sizes are approximately 3.828 and 3.710.
Good to know
4–500 complete rows with at least2 treated and2 control observations; binary treatment and external propensity in[0.000001,0.999999]. Separate Hájek normalization; ATE/ATT only. No propensity fitting, truncation, standard error, estimated-score uncertainty, clustering or longitudinal treatment. Causal assumptions not verified.
Reference: Hernán and Robins: Causal Inference, What If (opens in a new tab) ↗
Define the supplied propensity scores
A propensity score is the probability of receiving treatment conditional on a declared set of observed covariates. This page takes those probabilities as inputs alongside binary treatment and a numeric outcome. It does not estimate the probabilities or decide which covariates should enter their model, and the rows must refer to the same individual observations.
The weighted contrast is numerically defined without a causal interpretation. To interpret it causally requires additional assumptions, including a consistent treatment definition, appropriate exchangeability given measured variables and positivity. A calculator cannot verify those assumptions from treatment, outcome and score columns, nor can a well-balanced weighted mean prove the absence of unmeasured confounding.
Compare this with the GLM regression calculator from response and design matrix. Estimate weighted treatment-group contrasts and overlap diagnostics from supplied treatment probabilities, rather than fit a generic response GLM.
Choose ATE or ATT weighting
For the average treatment effect target, treated observations receive inverse propensity weights 1 over e and controls receive 1 over one minus e. These weights construct a pseudo-population representing the overall target population when the required assumptions and score model hold. A very small propensity for an observed treated person can generate an especially large weight.
For the average treatment effect among the treated, treated observations receive weight one and controls receive e over one minus e. That changes the target population rather than merely changing precision. ATE and ATT can legitimately differ when treatment effects vary across people, so neither should be selected retrospectively just because it produces a preferred effect estimate.
Normalize each group's mean explicitly
The implementation uses separately normalized Hájek weighted means. It divides each group's weighted outcome sum by that group's own weight sum, then subtracts the control mean from the treated mean. This normalization keeps the output on the outcome scale and makes the finite-sample calculation distinct from an unnormalized Horvitz–Thompson contrast using the original sample size as denominator.
The distinction matters when the fitted scores do not make weight sums exactly equal to their population targets. Both conventions appear in practice, and a result cannot be reproduced by saying only that inverse probability weighting was used. The output therefore supplies each weight vector and group weight sum, allowing the declared normalized contrast to be audited directly.
Follow the eight-observation example
The default data contain four treated and four control observations. Under ATE weighting, the treated weight sum is approximately 7.595238 and the control weight sum approximately 6.845238. Their weighted means are approximately 12.344828 and 9.156522, yielding a treated-minus-control contrast approximately 3.188306 on the supplied outcome scale.
The unweighted means are 12.75 for treated observations and 8.75 for controls, a difference of four. Weighting changes those summaries because observations with different propensities contribute differently. This numerical change by itself is not evidence that the weighted answer is less biased; the validity of the supplied scores and causal assumptions must be assessed separately.
Inspect overlap and effective sample size
The effective sample size for one weighted group is the square of its weight sum divided by the sum of squared weights. Equal weights reproduce the original group size, while a few dominating observations reduce the effective size. The example produces approximately 3.828 treated and 3.710 control effective observations, despite four actual rows in each group.
Effective sample size is a weight-concentration diagnostic, not the residual degrees of freedom of a fitted outcome model. The maximum weight and number of scores outside 0.05 to 0.95 provide additional warnings about overlap. These cutoffs are descriptive labels here; the calculator does not silently trim, truncate or replace extreme scores and then present a changed target as the original effect.
Preserve coding and scale conventions
Treatment must be coded zero or one, and the displayed difference is treated minus control. Adding a common constant to every outcome changes both weighted means equally and leaves the contrast unchanged. Multiplying outcomes by a constant multiplies the contrast by that constant, which is useful when checking a change of measurement units.
For binary outcomes, the normalized means can be read as weighted risks and their difference as a weighted risk difference under the stated interpretation. This interface does not automatically convert the contrast into a risk ratio or odds ratio. Different effect scales require their own estimands and uncertainty calculations rather than a relabeling of the result box.
Know what uncertainty is omitted
Four to five hundred observations are supported, with at least two treated and two control rows. Propensity scores must lie between 0.000001 and 0.999999, so unsupported probabilities zero and one cannot create infinite weights. Complete finite outcomes are required; there is no missing-data repair, clustering adjustment or longitudinal treatment handling in this page.
No standard error or confidence interval is supplied because score estimation, sampling design and outcome dependence require a deliberate variance method. Treating estimated scores as fixed can miss important uncertainty. Report the score source, target estimand, normalization and overlap diagnostics, and use an appropriate causal-analysis workflow before treating the descriptive weighted contrast as a substantive treatment-effect conclusion.
A few questions, answered
Are the propensity scores fitted here?
No. They are externally supplied probabilities. The calculator neither selects covariates nor checks whether their statistical or causal model is appropriate.
Why do ATE and ATT differ?
They weight toward different target populations. With heterogeneous effects, the overall-population contrast and the treated-population contrast need not agree.
Is this Horvitz–Thompson normalization?
No. Each weighted group mean is divided by its own group weight sum, yielding a separately normalized Hájek contrast.
Does the calculator return a confidence interval?
No. A valid uncertainty method must account for the score source, sampling design and dependence. Treating estimated propensities as fixed is not automatically adequate.