Definition 3.1.1.

Let \(X\) be a discrete random variable taking the values \(x_1, x_2, \dotsc, x_n\text{.}\) The expected value (also called mean, or expectation) of \(X\) is the weighted average of the values of \(X\text{,}\) where the weights are the probabilities of \(X\) taking each value:
\begin{gather*} \E(X) = \sum_{i=1}^n x_i \Pr(X = x_i). \end{gather*}
In Context