[guided]We now use the definition of expectation. For a random variable $X: \Omega \to \mathbb{R}$ on a probability space, $\mathbb{E}[X] := \int_\Omega X \, d\mathbb{P}$ is the Lebesgue integral of $X$ with respect to $\mathbb{P}$. For a **non-negative simple function** — one of the form $\phi = \sum_{k=1}^n c_k \mathbb{1}_{E_k}$ where $c_k \geq 0$, $E_k \in \mathcal{F}$ are disjoint, and $\bigcup_{k=1}^n E_k = \Omega$ — the Lebesgue integral is defined by
\begin{align*}
\int_\Omega \phi \, d\mathbb{P} := \sum_{k=1}^n c_k \, \mathbb{P}(E_k).
\end{align*}
We identify $\mathbb{1}_A$ as such a function. The sets $A$ and $A^c$ satisfy: both are in $\mathcal{F}$ (since $A \in \mathcal{F}$ by hypothesis and $\mathcal{F}$ is closed under complementation), they are disjoint ($A \cap A^c = \varnothing$), and their union is $\Omega$ ($A \cup A^c = \Omega$). Thus $\{A, A^c\}$ is a measurable partition of $\Omega$, and
\begin{align*}
\mathbb{1}_A(\omega) = 1 \cdot \mathbb{1}_A(\omega) + 0 \cdot \mathbb{1}_{A^c}(\omega) \quad \text{for all } \omega \in \Omega,
\end{align*}
since on $A$ the expression evaluates to $1 \cdot 1 + 0 \cdot 0 = 1$, and on $A^c$ it evaluates to $1 \cdot 0 + 0 \cdot 1 = 0$. This shows $\mathbb{1}_A$ is a non-negative simple function with $n = 2$, $c_1 = 1$, $c_2 = 0$, $E_1 = A$, $E_2 = A^c$.
Applying the definition of the integral:
\begin{align*}
\mathbb{E}[\mathbb{1}_A] = \int_\Omega \mathbb{1}_A \, d\mathbb{P} = c_1 \, \mathbb{P}(E_1) + c_2 \, \mathbb{P}(E_2) = 1 \cdot \mathbb{P}(A) + 0 \cdot \mathbb{P}(A^c).
\end{align*}
Since $\mathbb{P}$ is a probability measure, $\mathbb{P}(A^c) \leq \mathbb{P}(\Omega) = 1 < \infty$, so the term $0 \cdot \mathbb{P}(A^c) = 0$. Therefore
\begin{align*}
\mathbb{E}[\mathbb{1}_A] = \mathbb{P}(A).
\end{align*}
This is why $\mathbb{P}(A)$ can be interpreted as an expectation: the probability of an event is exactly the expected value of its indicator. This identity is the bridge between measure-theoretic probability and expectation, and underlies results such as the law of total expectation and the Fubini-based formula $\mathbb{E}[X] = \int_0^\infty \mathbb{P}(X > t) \, d\mathcal{L}^1(t)$ for non-negative random variables.[/guided]