How can the expectation be equal to the probability? I'm going through David Williams' 'Probability with Martingales' and in it he states the definition of expectation as the Lebesgue integral relative to $\mathbb{P}$: $$\mathbb{E}(X) := \int_{\Omega}Xd\mathbb{P}$$ Then he states that: "We also define $\mathbb{E}(X)$ for $X \in (m\mathfrak{F})^{+}$ (by which he means $X$ is a non-negative, $\mathfrak{F}$-measurable function). In short, $\mathbb{E}(X) = \mathbb{P}(X)$"
I don't understand this final part; how can an expected value of the random variable be equal to a probability which lies between $0$ and $1$?
EDIT:
I think it could be a notation issue. That's my inkling - $\mathbb{P}(X)$ in itself doesn't even make sense. But my next questions would be: 


*

*Am I right? 

*Why would you define expectation like this?

 A: So $\mathbb P$ takes events as arguments, but we use notation '$\mathbb P(X)$' where $X$ is in $\mathscr L^1(\Omega, \mathscr F, \mathbb P)$ to mean
$$\int_{\Omega} X d\mathbb P$$
Previously in book:
Given measure space $(S, \Sigma, \mu)$
$\mu(A)$ is measure of $A$ if $A \in \Sigma$
$\mu(f) = \int_S f d\mu$ if $f \in \mathscr L^1(\Omega, \mathscr F, \mathbb P)$
Therefore, when we say '$\mathbb P(X)$' in Chapter 6, this is meant in the sense of Chapter 5 where we extend the notion of a function on measurable sets (in probability: events) to a function on measurable functions (in probability: random variables). As it turns out, '$\mathbb P(X)$', as defined in the measure theory sense of Chapter 5, is equivalent to the probability sense we know it as '$\mathbb E(X)$'

Also
$$f\mu(A) = \mu(f1_A) = \int_S f1_A d\mu$$
So if $h \in \mathscr L^1(\Omega, \mathscr F, \mathbb P)$
$$f\mu(h) = \mu(fh) = \int_S fh d\mu$$
A: The expectation of a binary payoff, of the style $b=1$ if $X$ higher (lower) than a cutoff $k$, and $0$ otherwise, $\mathbb{E}(b) \in [0,1]$, constitutes a probability since it is equal to $\mathbb{P}(X \geq k)$ (or $<$).
