Using result
R2482: Expectation of discrete random variable, we have
\begin{equation}
\begin{split}
\mathbb{E} I^n_E
& = 1^n \cdot \mathbb{P}(I_E = 1) + 0^n \cdot \mathbb{P}(I_E = 0) \\
& = 1 \cdot \mathbb{P}(I_E = 1) + 0 \cdot \mathbb{P}(I_E = 0) \\
& = \mathbb{P}(I_E = 1) \\
\end{split}
\end{equation}
$\square$