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, one with 30 students — and test grades in each class as follows:
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 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): x¯=430050=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":
x¯=(20×80)+(30×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 weights:
2020+30=0.4 3020+30=0.6 Then, apply the weights like this:
x¯=(0.4×80)+(0.6×90)=86.
Mathematical definition Formally, the weighted mean of a non-empty finite tuple of data (x1,x2,…,xn), with corresponding non-negative weights (w1,w2,…,wn) is
x¯=∑i=1nwixi∑i=1nwi, which expands to:
x¯=w1x1+w2x2+⋯+wnxnw1+w2+⋯+wn. Therefore, data elements with a high weight contribute more to the weighted mean than do elements with a low weight. The weights may not be negative in order for the equation to work. Some may be zero, but not all of them (since division by zero is not allowed). The formulas are simplified when the weights are normalized such that they sum up to 1, i.e., ∑i=1nwi′=1. For such normalized weights, the weighted mean is equivalently:
x¯=∑i=1nwi′xi. One can always normalize the weights by making the following transformation on the original weights:
wi′=wi∑j=1nwj. The ordinary mean 1n∑i=1nxi is a special case of the weighted mean where all data have equal weights. If the data elements are independent and identically distributed random variables with variance σ2, the standard error of the weighted mean, σx¯, can be shown via uncertainty propagation to be:
σx¯=σ∑i=1nwi'2
Variance-defined weights
For the weighted mean of a list of data for which each element xi potentially comes from a different probability distribution with known variance σi2, all having the same mean, one possible choice for the weights is given by the reciprocal of variance:
wi=1σi2. The weighted mean in this case is:
x¯=∑i=1n(xiσi2)∑i=1n1σi2=∑i=1n(xi⋅wi)∑i=1nwi, and the standard error of the weighted mean (with inverse-variance weights) is:
σx¯=1∑i=1nσi−2=1∑i=1nwi, Note this reduces to σx¯2=σ02/n when all σi=σ0. It is a special case of the general formula in previous section,
σx¯2=∑i=1nwi'2σi2=∑i=1nσi−4σi2(∑i=1nσi−2)2. The equations above can be combined to obtain:
x¯=σx¯2∑i=1nxiσi2. The significance of this choice is that this weighted mean is the maximum likelihood estimator of the mean of the probability distributions under the assumption that they are independent and normally distributed with the same mean.
Statistical properties
Expectancy The weighted sample mean, x¯, is itself a random variable. Its expected value and standard deviation are related to the expected values and standard deviations of the observations, as follows. For simplicity, we assume normalized weights (weights summing to one). If the observations have expected values E(xi)=μi, then the weighted sample mean has expectation E(x¯)=∑i=1nwi′μi. In particular, if the means are equal, μi=μ, then the expectation of the weighted sample mean will be that value, E(x¯)=μ.
Variance
Simple i.i.d. case When treating the weights as constants, and having a sample of n observations from uncorrelated random variables, all with the same variance and expectation (as is the case for i.i.d random variables), then the variance of the weighted mean (denoted x¯w to distinguish from the airthmetic mean x¯) can be estimated as the multiplication of the unweighted variance by Kish's design effect (see proof):
Var(x¯w)=σ̂x¯w2=σ̂x2w2‾w¯2 With σ̂x2=∑i=1n(xi−x¯)2n−1, w¯=∑i=1nwin, and w2‾=∑i=1nwi2n However, this estimation is rather limited due to the strong assumption about the x observations. This has led to the development of alternative, more general, estimators. For example, using the residuals and the a posteriori variance of unit weight σ̂02:
σ̂x¯w2=σ̂02σx¯w2 where σx¯w2=(∑i=1nwi)−1 and:
σ̂02=∑i=1n(xi−x¯w)2win−1=∑i=1nri2/σi2n−1 Other alternatives follow below.
… excerpt ends here. Continue reading the full article.