Weighted mean

From Free net encyclopedia

Image:Mergefrom.gif It has been suggested that Convex combination be merged into this article or section. ([[{{{2|: talk:Weighted_mean}}}|Discuss]])
See weight function for the continuous case.

In statistics, given a set of data,

X = { x1, x2, ..., xn}

and corresponding non-negative weights,

W = { w1, w2, ..., wn}

the weighted mean, or weighted average, is calculated as:

<math>

\bar{x} = \frac{ \sum_{i=1}^n w_i x_i}{\sum_{i=1}^n w_i} </math>

or:

<math>

\bar{x} = \frac{w_1 x_1 + w_2 x_2 + w_3 x_3 + \cdots + w_n x_n}{w_1 + w_2 + w_3 + \cdots + w_n} </math>

Note that if all the weights are equal, 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 counter-intuitive properties, as captured for instance in Simpson's paradox.

Weighted versions of other means can also be calculated. Examples of such weighted means include the weighted geometric mean and the weighted harmonic mean.

Example

Let's say we had two school classes, one with 20 students, and one with 30 students. The grades in each class on a particular 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 = 80, 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, 100

The straight average for the morning class is 80% and the straight average of the afternoon class is 90%. If we were to find a straight average of 80% and 90%, we would get 85% for the mean of the two class averages. However, this is not the average of all the students' grades. To find that, you would need to total all the grades and divide by the total number of students:

<math>

\bar{x} = \frac{4300}{50} = 86\% </math>

Or, you could find the weighted average of the two class means already calculated, using the number of students in each class as the weighting factor:

<math>

\bar{x} = \frac{(20)80\% + (30)90\%}{20 + 30} = 86\% </math>

Note that if we no longer had the individual students' grades, but only had the class averages and the number of students in each class, we could still find the mean of all the students grades, in this way, by finding the weighted mean of the two class averages.

See also

cs:Vážený průměr es:Media ponderada eo:Vikipedio:Projekto matematiko/Pesita meznombro pl:Średnia ważona ru:Среднее взвешенное