Causal risk ratio Created 2026-09-28 Updated 2026-11-05
G-computation Created 2026-09-28 Updated 2026-11-05
G-computation calculates the outcome distribution under a specified intervention from conditional laws identified under a causal model. For a single binary treatment, pretreatment covariates , and outcome , the G-formula isIt follows by averaging over , using conditional exchangeability to replace the conditional potential outcome mean by the mean among recipients of , and using consistency in causal inference to replace by observed . Positivity ensures the required conditional outcome laws are represented in the target strata.[ref]
Estimating causal effects from epidemiological data by Miguel A. Hernán and James M. Robins. Standardisation; Bibliographical notes on the g-formula; Appendix A.1
For an illustrative binary outcome, suppose target weights are and in two baseline strata. Untreated risks give intervention risk . Treated risks give , so the standardized causal risk ratio is and the risk difference is . Both strategies use the same target weights.
With repeated treatments and time-varying covariates, the longitudinal G-formula integrates products of the covariate transition laws while setting each treatment according to the intervention strategy. This requires sequential exchangeability, longitudinal positivity and consistency in causal inference. Simply conditioning on every observed intermediate variable can block part of the intended effect; the sequential intervention calculation specifies which laws are averaged.
Past exam of the mathematics course of the University of Cambridge 2022 iii Paper 221 4 iii Solution Created 2026-09-28 Updated 2026-10-14
The graph has no cause of , so is independent of its potential outcomes. By consistency of potential outcomes, the G-formula therefore givesCondition on and use the structural zero from part ii:Consequently the causal risk ratio isApplying Bayes' theorem to the second factor giveswhich proves the stated formula. The unmeasured common cause of and does not obstruct this total-effect argument because no mediator effect is being identified.