Definition:Weighted Mean

Definition
Let $S = \left \langle {x_1, x_2, \ldots, x_n}\right \rangle$ be a sequence of real numbers.

Let $W \left({x}\right)$ be a weight function to be applied to the elements of $S$.

The weighted mean of $S$ is defined as:
 * $\bar x := \dfrac {\displaystyle \sum_{i=1}^n W \left({x_i}\right) x_i} {\displaystyle \sum_{i=1}^n W \left({x_i}\right)}$

This means that elements of $S$ with a larger weight contribute more to the weighted mean than those with a smaller weight.

If we write $\forall i: 1 \le i \le n: w_i = W \left({x_i}\right)$, we can write this weighted mean as:
 * $\bar x := \dfrac{w_1 x_1 + w_2 x_2 + \cdots + w_n x_n}{w_1 + w_2 + \cdots + w_n}$

From the definition of the weight function, none of the weights can be negative.

While some of the weights may be zero, not all of them can, otherwise we would be dividing by zero.

Normalized Weighted Mean
If the weights are normalized, the formula is simplified:
 * $\displaystyle \bar x := \sum_{i=1}^n W \left({x_i}\right) x_i$

as by definition all the weights add up to $1$.

Arithmetic Mean
When the weight function is defined as:
 * $\forall i: 1 \le i \le n: W \left({x_i}\right) = w$

where $w$ is constant, the formula simplifies to the arithmetic mean:
 * $\displaystyle \bar x := \frac 1 n \sum_{i=1}^n {x_i}$

So it can be seen that the arithmetic mean is a special case of the weighted mean.