Definition:Weighted Mean

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} = \frac {\sum_{i=1}^n W \left({x_i}\right) x_i} {\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} = \frac{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:
 * $$\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:
 * $$\bar{x} = \frac {\sum_{i=1}^n {x_i}}{n}$$

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