(1) | {\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 {\displaystyle X} be a random variable with a finite number of finite outcomes {\displaystyle x_{1},x_{2},\ldots ,x_{n}} occurring with probabilities {\displaystyle p_{1},p_{2},\ldots ,p_{n},} respectively.
Since all probabilities {\displaystyle p_{i}} add up to 1 ( {\displaystyle p_{1}+p_{2}+\cdots +p_{n}=1}), the expected value is the weighted average, with {\displaystyle p_{i}} ’s being the weights.
If all outcomes {\displaystyle x_{i}} are equiprobable (that is, {\displaystyle p_{1}=p_{2}=\cdots =p_{n} = \frac{1}{n}} ), then the weighted average turns into the simple average.