{\displaystyle \operatorname {E} [X]=\sum _{i=1}^{n}x_{i}\,p_{i}=x_{1}p_{1}+x_{2}p_{2}+\cdots +x_{n}p_{n}.} |
where be a random variable with a finite number of finite outcomes occurring with probabilities respectively.
Since all probabilities add up to 1 (), the expected value is the weighted average, with ’s being the weights.
If all outcomes are equiprobable (that is, ), then the weighted average turns into the simple average.