On this page
Calculate the weighted mean
Let outcomes xᵢ have nonnegative probabilities pᵢ summing to one. The mean uses those probabilities, rather than giving each listed outcome equal weight by default.
An equal arithmetic mean is the special case in which every listed outcome has the same probability.
Use the same mean inside the squared deviations
Variance measures dispersion around μ, not around an arbitrary target or a separately quoted forecast.
The probability weights already define the distribution; there is no additional n or n − 1 divisor in this formula.
Use two simple boundary checks
If every outcome has the same value, each deviation from the mean is zero and variance is zero. Adding a constant to every outcome changes the mean but leaves variance unchanged. Multiplying every outcome by k multiplies variance by k² and standard deviation by |k|.
Distinguish an expectation from a realised outcome
An expectation need not be one of the possible outcomes. A model paying either 0 or 10 with equal probabilities has mean 5, although the model never pays exactly 5. The mean summarizes the distribution rather than selecting its next result.