(Joint work with Dylan Thurston)

Probabilistic inference is popular in machine learning and cognitive science, but it is applied much less than it could be because most inference programs are written from scratch by hand. Instead, probabilistic models and inference procedures should be written as separate reusable modules. To this end, a promising approach is to transform clear models to fast inference, using equational reasoning based on measure semantics and computer algebra. We show how to calculate conditional distributions by equational reasoning. In particular, we add a `Lebesgue measure’ operation to the monadic representation of stochastic experiments.