Definition 5.4.1. Expected Value.
Given a random variable \(X\) over space \(R\text{,}\) corresponding probability function \(f(x)\) and "value function" \(v(x)\text{,}\) the expected value of \(v(x)\) is given by
\begin{equation*}
E = E[v(X)] = \sum_{x \in R} v(x) f(x)
\end{equation*}
provided \(X\) is discrete, or
\begin{equation*}
E = E[v(X)] = \int_R v(x)f(x) dx
\end{equation*}
provided \(X\) is continuous.