Expected value
Random variables with finitely many outcomes

Consider a random variable X with a finite list x,..., x of possible outcomes, each of which (respectively) has probability p,..., p of occurring. The expectation of X is defined as E = x 1 p 1 + x 2 p 2 + ⋯ + x k p k. {\displaystyle \operatorname {E} =x_{1}p_{1}+x_{2}p_{2}+\cdots +x_{k}p_{k}.}

Since the probabilities must satisfy p + ⋅⋅⋅ + p = 1, it is natural to interpret E as a weighted average of the x values, with weights given by their probabilities p.

In the special case that all possible outcomes are equiprobable (that is, p = ⋅⋅⋅ = p), the weighted average is given by the standard average. In the general case, the expected value takes into account the fact that some outcomes are more likely than others.
detectable_format:number_highlighted_sections[5]