Loading AI tools
Statistical amount From Wikipedia, the free encyclopedia
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.
Given two school classes — one with 20 students, one with 30 students — and test grades in each class as follows:
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):
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":
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.
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:
Then, apply the weights like this:
Formally, the weighted mean of a non-empty finite tuple of data , with corresponding non-negative weights is
which expands to:
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[lower-alpha 1]. 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., . For such normalized weights, the weighted mean is equivalently:
One can always normalize the weights by making the following transformation on the original weights:
The ordinary mean 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 , the standard error of the weighted mean, , can be shown via uncertainty propagation to be:
For the weighted mean of a list of data for which each element potentially comes from a different probability distribution with known variance , all having the same mean, one possible choice for the weights is given by the reciprocal of variance:
The weighted mean in this case is:
and the standard error of the weighted mean (with inverse-variance weights) is:
Note this reduces to when all . It is a special case of the general formula in previous section,
The equations above can be combined to obtain:
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.
The weighted sample mean, , 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 then the weighted sample mean has expectation In particular, if the means are equal, , then the expectation of the weighted sample mean will be that value,
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 can be estimated as the multiplication of the unweighted variance by Kish's design effect (see proof):
With , , and
However, this estimation is rather limited due to the strong assumption about the y observations. This has led to the development of alternative, more general, estimators.
From a model based perspective, we are interested in estimating the variance of the weighted mean when the different are not i.i.d random variables. An alternative perspective for this problem is that of some arbitrary sampling design of the data in which units are selected with unequal probabilities (with replacement).[1]: 306
In Survey methodology, the population mean, of some quantity of interest y, is calculated by taking an estimation of the total of y over all elements in the population (Y or sometimes T) and dividing it by the population size – either known () or estimated (). In this context, each value of y is considered constant, and the variability comes from the selection procedure. This in contrast to "model based" approaches in which the randomness is often described in the y values. The survey sampling procedure yields a series of Bernoulli indicator values () that get 1 if some observation i is in the sample and 0 if it was not selected. This can occur with fixed sample size, or varied sample size sampling (e.g.: Poisson sampling). The probability of some element to be chosen, given a sample, is denoted as , and the one-draw probability of selection is (If N is very large and each is very small). For the following derivation we'll assume that the probability of selecting each element is fully represented by these probabilities.[2]: 42, 43, 51 I.e.: selecting some element will not influence the probability of drawing another element (this doesn't apply for things such as cluster sampling design).
Since each element () is fixed, and the randomness comes from it being included in the sample or not (), we often talk about the multiplication of the two, which is a random variable. To avoid confusion in the following section, let's call this term: . With the following expectancy: ; and variance: .
When each element of the sample is inflated by the inverse of its selection probability, it is termed the -expanded y values, i.e.: . A related quantity is -expanded y values: .[2]: 42, 43, 51, 52 As above, we can add a tick mark if multiplying by the indicator function. I.e.:
In this design based perspective, the weights, used in the numerator of the weighted mean, are obtained from taking the inverse of the selection probability (i.e.: the inflation factor). I.e.: .
If the population size N is known we can estimate the population mean using .
If the sampling design is one that results in a fixed sample size n (such as in pps sampling), then the variance of this estimator is:
The general formula can be developed like this:
The population total is denoted as and it may be estimated by the (unbiased) Horvitz–Thompson estimator, also called the -estimator. This estimator can be itself estimated using the pwr-estimator (i.e.: -expanded with replacement estimator, or "probability with replacement" estimator). With the above notation, it is: .[2]: 51
The estimated variance of the pwr-estimator is given by:[2]: 52 where .
The above formula was taken from Sarndal et al. (1992) (also presented in Cochran 1977), but was written differently.[2]: 52 [1]: 307 (11.35) The left side is how the variance was written and the right side is how we've developed the weighted version:
And we got to the formula from above.
An alternative term, for when the sampling has a random sample size (as in Poisson sampling), is presented in Sarndal et al. (1992) as:[2]: 182
With . Also, where is the probability of selecting both i and j.[2]: 36 And , and for i=j: .[2]: 43
If the selection probability are uncorrelated (i.e.: ), and when assuming the probability of each element is very small, then:
We assume that and that
The previous section dealt with estimating the population mean as a ratio of an estimated population total () with a known population size (), and the variance was estimated in that context. Another common case is that the population size itself () is unknown and is estimated using the sample (i.e.: ). The estimation of can be described as the sum of weights. So when we get . With the above notation, the parameter we care about is the ratio of the sums of s, and 1s. I.e.: . We can estimate it using our sample with: