The **weighted arithmetic mean** is similar to an ordinary arithmetic mean (the most common type of average), except that instead of each of the data points contributing equally to the final average, some data points contribute more than others. The notion of weighted mean plays a role in descriptive statistics and also occurs in a more general form in several other areas of mathematics.

If all the weights are equal, then the weighted mean is the same as the arithmetic mean. While weighted means generally behave in a similar fashion to arithmetic means, they do have a few counterintuitive properties, as captured for instance in Simpson's paradox.

## Examples

### Basic example

Given two school classes, one with 20 students, and one with 30 students, the grades in each class on a test were:

- Morning class = 62, 67, 71, 74, 76, 77, 78, 79, 79, 80, 80, 81, 81, 82, 83, 84, 86, 89, 93, 98

- Afternoon class = 81, 82, 83, 84, 85, 86, 87, 87, 88, 88, 89, 89, 89, 90, 90, 90, 90, 91, 91, 91, 92, 92, 93, 93, 94, 95, 96, 97, 98, 99

The mean for the morning class is 80 and the mean of the afternoon class is 90. The unweighted mean of the 80 and 90 is 85, so the unweighted mean of the two means is 85. However, this does not account for the difference in number of students in each class (20 versus 30); hence the value of 85 does not reflect the average student grade (independent of class). The average student grade can be obtained by averaging all the grades, without regard to classes (add all the grades up and divide by the total number of students):

- $}If\; all\; the\; weights\; are\; equal,\; then\; the\; weighted\; mean\; is\; the\; same\; as\; thearithmetic\; mean.\; While\; weighted\; means\; generally\; behave\; in\; a\; similar\; fashion\; to\; arithmetic\; means,\; they\; do\; have\; a\; few\; counterintuitive\; properties,\; as\; captured\; for\; instance\; inSimpson\text{'}s\; paradox.$
Given two school classes, one with 20 students, and one with 30 students, the grades in each class on a test were:

- Morning class = 62, 67, 71, 74, 76, 77, 78, 79, 79, 80, 80, 81, 81, 82, 83, 84, 86, 89, 93, 98

- Afternoon class = 81, 82, 83, 84, 85, 86, 87, 87, 88, 88, 89, 89, 89, 90, 90, 90, 90, 91, 91, 91, 92, 92, 93, 93, 94, 95, 96, 97, 98, 99

The mean for the morning class is 80 and the mean of the afternoon class is 90. The unweighted mean of the 80 and 90 is 85, so the unweighted mean of the two means is 85. However, this does not account for the difference in number of students in each class (20 versus 30); hence the value of 85 does not reflect the average student grade (independent of class). The average student grade can be obtained by averaging all the grades, without regard to classes (add all the grades up and divide by the total number of students):

- ${\bar {x}}={\frac {4300}{50}}=86.$

Or, this can be accomplished by weighting the class means by the number of students in each class. The larger class is given more "weight":

- ${\bar {x}}={\frac {(20\times 80)+(30\times 90)}{20+30}}=86.$

Thus, the weighted mean makes it possible to find the mean average student grade without knowing each student's score. Only the class means and the number of students in each class are needed.

### Convex combination example

Since only the *relative* weights are relevant, any weighted mean can be expressed using coefficients that sum to one. Such a linear combination is called a convex combination.

Using the previous example, we would get the following

The mean for the morning class is 80 and the mean of the afternoon class is 90. The unweighted mean of the 80 and 90 is 85, so the unweighted mean of the two means is 85. However, this does not account for the difference in number of students in each class (20 versus 30); hence the value of 85 does not reflect the average student grade (independent of class). The average student grade can be obtained by averaging all the grades, without regard to classes (add all the grades up and divide by the total number of students):

- $$
- $\overline{x}=\frac{(20\times 80)+(30\times 90)}{20+30}$
### Convex combination example

Since only the *relative* weights are relevant, any weighted mean can be expressed using coefficients that sum to one. Such a linear combination is called a convex combination.

Using the previous example, we would get the following weights:

- ${\frac {20}{20+30}}=0.4$

- convex combination.
Using the previous example, we would get the following weights:

- $">Using\; the\; previous\; example,\; we\; would\; get\; the\; following\; weights:$
Then, apply the weights like this:

- ${\bar {x}}=(0.4\times 80)+(0.6\times 90)=86.$

## Mathematical definition

Formally, the weighted mean of a non-empty finite multiset of data $$$\{x_{1},x_{2},\dots ,x_{n}\},$
with corresponding non-negative weights $\{w_{1},w_{2},\dots ,w_{n}\}$ is

- $\overline{x}=\frac{\sum _{i=1}^{n}{w}_{i}{x}_{i}}{\sum _{i=1}^{<}}$
which expands to:

- $\overline{x}=\frac{{w}_{1}{x}_{1}+{w}_{2}{x}_{2}+\cdots +{w}_{n}{x}_{n}}{{w}_{1}+{w}_{2}+\cdots +{w}_{n}}.$$1$, i.e.:
- $\sum _{i=1}^{n}{w_{i}'}=1$.

For such normalized weights the weighted mean is then:

- $1$