For a discrete random variable x with sample space \(S_X\) and PMF \(p(x)\). The expected value is
\[ E(X)=\mu X=\sum_{x\in S_X}xp(x) \]
Example: Let X be the random variable with PMF