Expected value of the size of set

Solution 1:

\begin{align} E(|M|) = \int_{\Omega} |M| dP(M) = \int_{\Omega} \int_{M} d\omega \ dP(M) = \int_{\Omega} \int_{\mathbb{R}^k} \chi_M (\omega) d\omega \ dP(M) \\\overset{Tonelli}{=} \int_{\mathbb{R}^k} \int_{\Omega} \chi_M(\omega) dP(M) \ d\omega \quad (\ast) \end{align}

But now $$ \chi_M(\omega)=1 \Leftrightarrow \omega \in M \Leftrightarrow \chi_{A_{\omega}} (M) =1$$ where $A_{\omega} := \{ M: \omega \in M \}$.

Thus $$(\ast) \quad = \int_{\mathbb{R}^k} \int_{\Omega} \chi_{A_{\omega}}(M) dP(M) \ d\omega = \int_{\mathbb{R}^k} P([M: \omega \in M]) d\omega$$

Solution 2:

If $P$ is the distribution of $M$ (which you need to be super careful about, you want to define the sigma algebra too), let $\mathcal P(\mathbb R^k)$ be the power set of $\mathbb R^k$ ($P$ is a distribution over $\mathcal P(\mathbb R^k)$), you can write : \begin{align*} \mathbb E[|M|] &= \int_{\mathcal P(\mathbb R^k)} \int_M d\omega ~ dP(M)\\ &=\int_{\mathcal P(\mathbb R^k)} \int_{\mathbb R^{k}} \mathbf 1(\omega\in M) d\omega ~ dP(M)\\\\ &=\int_{\mathbb R^k} \int_{\mathcal P(\mathbb R^k)} \mathbf 1(\omega\in M) dP(M) d\omega\\ &=\int_{\mathbb R^k} P(\omega\in M) d\omega \end{align*}

If I were you, I would make sure that you are allowed to exchange the two integrals there.