Definition:Weighted Mean

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

Let $\map W x$ be a weight function to be applied to the terms of $S$.

The weighted mean of $S$ is defined as:
 * $\bar x := \dfrac {\displaystyle \sum_{i \mathop = 1}^n \map W {x_i} \, x_i} {\displaystyle \sum_{i \mathop = 1}^n \map W {x_i} }$

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 = \map W {x_i}$

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 \mathop = 1}^n \map W {x_i} \, 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: \map W {x_i} = w$

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

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