Any weighted sum of probability spaces is again a probability space. This idea is captured using the notion of polynomial monad algebras.

There is a polynomial monad \mathtt{lott} of lotteries: a position is a finite number N of “lottery tickets”, together with a probability distribution p:\Delta_N on it, and a direction there is a choice of lottery tickets. That is,

\mathtt{lott}\coloneqq\sum_{N:\mathbb{N}}\Delta_N\mathcal{y}^N.

It turns out that the polynomial \mathtt{prob} of probability spaces is an algebra on this monad, i.e. there is a Cartesian map

\sigma\colon\mathtt{lott}\lhd\mathtt{prob}\to\mathtt{prob}

satisfying the usual laws. Here, I’m defining

\mathtt{prob}\coloneqq\sum_{\{(S,\mu)\mid S\text{ : measurable space}, \mu \text{ : probability measure on S\}}}\mathcal{y}^S

to have a position given by a measurable space equipped with a normalized measure on it—a probability space—and directions there are given by points of the space.

So what is the map \sigma saying? It just says that given a lottery where each ticket points to a probability space, we can get a new probability space. Namely: take the disjoint union and assign a measure given by weighted sum. The cartesianness of \sigma is just saying that a point of this disjoint union can be identified with a choice of ticket and a point in the corresponding space.