How can I express the expectation of a function involving the conditional probability distribution $p(x'|x)$, like $\mathbb E_{p}\left[1-p\left(x'|x\right)\right]$, as a general integral over the measure $p$ that can be used for both discrete and continuous cases? Is it valid to represent it as:
$$ \mathbb E_{p}\left[1-p\left(x'|x\right)\right]=\int_{\mathcal X}\left(1-p\left(x'|x\right)\right)\mathrm{d}p? $$