For treatment contrast x (treated) versus x* (control), mediator M and outcome Y:
$$P_{med} = P\{Y(x, M(x)) > Y(x, M(x^*))\} + \tfrac12 P\{Y(x, M(x)) = Y(x, M(x^*))\}.$$
Treatment is held at x in both potential outcomes. Only the mediator is varied, and its two draws are independent. This matches Definition 1 of the manuscript and is implemented in .pmed_core_simple() (R/compute-core.R).
test-pmed-estimand.R, checks invariance to c′.For a Gaussian mediator with path a, outcome path b, mediator error SD σm and outcome error SD σy, and a unit treatment contrast,
$$P_{med} = \Phi\!\left(\frac{a b}{\sqrt{2\,(b^2 \sigma_m^2 + \sigma_y^2)}}\right),$$
which is about 0.563 at a = b = 0.5, σm = σy = 1. test-pmed-estimand.R checks the implementation against this formula, checks invariance to c′, and checks that the indirect effect equals ab.
Identification of the mediated shift requires the usual sequential ignorability conditions, including no unmeasured mediator-outcome confounding. That assumption is not testable; use sensitivity analysis.
The modern estimands (gauge, incremental, Sobol, Wasserstein, rg-flow) change the scale or the functional, not the identification conditions. See Modern estimands.