  We present a general mathematical framework for trajectory stratification for
simulating rare events. Trajectory stratification involves decomposing
trajectories of the underlying process into fragments limited to restricted
regions of state space (strata), computing averages over the distributions of
the trajectory fragments within the strata with minimal communication between
them, and combining those averages with appropriate weights to yield averages
with respect to the original underlying process. Our framework reveals the full
generality and flexibility of trajectory stratification, and it illuminates a
common mathematical structure shared by existing algorithms for sampling rare
events. We demonstrate the power of the framework by defining strata in terms
of both points in time and path-dependent variables for efficiently estimating
averages that were not previously tractable.
