Hubbry Logo
Weighted arithmetic meanWeighted arithmetic meanMain
Open search
Weighted arithmetic mean
Community hub
Weighted arithmetic mean
logo
7 pages, 0 posts
0 subscribers
Be the first to start a discussion here.
Be the first to start a discussion here.
Weighted arithmetic mean
Weighted arithmetic mean
from Wikipedia

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

[edit]

Basic example

[edit]

Given two school classesone with 20 students, one with 30 studentsand 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):

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.

Convex combination example

[edit]

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:

Mathematical definition

[edit]

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[a]. 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:

Variance-defined weights

[edit]

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.

Statistical properties

[edit]

Expectancy

[edit]

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,

Variance

[edit]

Simple i.i.d. case

[edit]

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.

Survey sampling perspective

[edit]

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.: .

Variance of the weighted sum (pwr-estimator for totals)

[edit]

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:

Proof

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:

Proof

We assume that and that

Variance of the weighted mean (π-estimator for ratio-mean)

[edit]

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: . As we moved from using N to using n, we actually know that all the indicator variables get 1, so we could simply write: . This will be the estimand for specific values of y and w, but the statistical properties comes when including the indicator variable .[2]: 162, 163, 176 

This is called a Ratio estimator and it is approximately unbiased for R.[2]: 182 

In this case, the variability of the ratio depends on the variability of the random variables both in the numerator and the denominator - as well as their correlation. Since there is no closed analytical form to compute this variance, various methods are used for approximate estimation. Primarily Taylor series first-order linearization, asymptotics, and bootstrap/jackknife.[2]: 172  The Taylor linearization method could lead to under-estimation of the variance for small sample sizes in general, but that depends on the complexity of the statistic. For the weighted mean, the approximate variance is supposed to be relatively accurate even for medium sample sizes.[2]: 176  For when the sampling has a random sample size (as in Poisson sampling), it is as follows:[2]: 182 

.

If , then either using or would give the same estimator, since multiplying by some factor would lead to the same estimator. It also means that if we scale the sum of weights to be equal to a known-from-before population size N, the variance calculation would look the same. When all weights are equal to one another, this formula is reduced to the standard unbiased variance estimator.

Proof

The Taylor linearization states that for a general ratio estimator of two sums (), they can be expanded around the true value R, and give:[2]: 178 

And the variance can be approximated by:[2]: 178, 179 

.

The term is the estimated covariance between the estimated sum of Y and estimated sum of Z. Since this is the covariance of two sums of random variables, it would include many combinations of covariances that will depend on the indicator variables. If the selection probability are uncorrelated (i.e.: ), this term would still include a summation of n covariances for each element i between and . This helps illustrate that this formula incorporates the effect of correlation between y and z on the variance of the ratio estimators.

When defining the above becomes:[2]: 182 

If the selection probability are uncorrelated (i.e.: ), and when assuming the probability of each element is very small (i.e.: ), then the above reduced to the following:

A similar re-creation of the proof (up to some mistakes at the end) was provided by Thomas Lumley in crossvalidated.[3]

We have (at least) two versions of variance for the weighted mean: one with known and one with unknown population size estimation. There is no uniformly better approach, but the literature presents several arguments to prefer using the population estimation version (even when the population size is known).[2]: 188  For example: if all y values are constant, the estimator with unknown population size will give the correct result, while the one with known population size will have some variability. Also, when the sample size itself is random (e.g.: in Poisson sampling), the version with unknown population mean is considered more stable. Lastly, if the proportion of sampling is negatively correlated with the values (i.e.: smaller chance to sample an observation that is large), then the un-known population size version slightly compensates for that.

For the trivial case in which all the weights are equal to 1, the above formula is just like the regular formula for the variance of the mean (but notice that it uses the maximum likelihood estimator for the variance instead of the unbiased variance. I.e.: dividing it by n instead of (n-1)).

Bootstrapping validation

[edit]

It has been shown, by Gatz et al. (1995), that in comparison to bootstrapping methods, the following (variance estimation of ratio-mean using Taylor series linearization) is a reasonable estimation for the square of the standard error of the mean (when used in the context of measuring chemical constituents):[4]: 1186 

where . Further simplification leads to

Gatz et al. mention that the above formulation was published by Endlich et al. (1988) when treating the weighted mean as a combination of a weighted total estimator divided by an estimator of the population size,[5] based on the formulation published by Cochran (1977), as an approximation to the ratio mean. However, Endlich et al. didn't seem to publish this derivation in their paper (even though they mention they used it), and Cochran's book includes a slightly different formulation.[1]: 155  Still, it's almost identical to the formulations described in previous sections.

Replication-based estimators

[edit]

Because there is no closed analytical form for the variance of the weighted mean, it was proposed in the literature to rely on replication methods such as the Jackknife and Bootstrapping.[1]: 321 

Other notes

[edit]

For uncorrelated observations with variances , the variance of the weighted sample mean is[citation needed]

whose square root can be called the standard error of the weighted mean (general case).[citation needed]

Consequently, if all the observations have equal variance, , the weighted sample mean will have variance

where . The variance attains its maximum value, , when all weights except one are zero. Its minimum value is found when all weights are equal (i.e., unweighted mean), in which case we have , i.e., it degenerates into the standard error of the mean, squared.

Because one can always transform non-normalized weights to normalized weights, all formulas in this section can be adapted to non-normalized weights by replacing all .

[edit]

Weighted sample variance

[edit]

Typically when a mean is calculated it is important to know the variance and standard deviation about that mean. When a weighted mean is used, the variance of the weighted sample is different from the variance of the unweighted sample.

The biased weighted sample variance is defined similarly to the normal biased sample variance :

where for normalized weights. If the weights are frequency weights (and thus are random variables), it can be shown[citation needed] that is the maximum likelihood estimator of for iid Gaussian observations.

For small samples, it is customary to use an unbiased estimator for the population variance. In normal unweighted samples, the N in the denominator (corresponding to the sample size) is changed to N − 1 (see Bessel's correction). In the weighted setting, there are actually two different unbiased estimators, one for the case of frequency weights and another for the case of reliability weights.

Frequency weights

[edit]

If the weights are frequency weights (where a weight equals the number of occurrences), then the unbiased estimator is:

This effectively applies Bessel's correction for frequency weights. For example, if values are drawn from the same distribution, then we can treat this set as an unweighted sample, or we can treat it as the weighted sample with corresponding weights , and we get the same result either way.

If the frequency weights are normalized to 1, then the correct expression after Bessel's correction becomes

where the total number of samples is (not ). In any case, the information on total number of samples is necessary in order to obtain an unbiased correction, even if has a different meaning other than frequency weight.

The estimator can be unbiased only if the weights are not standardized nor normalized, these processes changing the data's mean and variance and thus leading to a loss of the base rate (the population count, which is a requirement for Bessel's correction).

Reliability weights

[edit]

If the weights are instead reliability weights (non-random values reflecting the sample's relative trustworthiness, often derived from sample variance), we can determine a correction factor to yield an unbiased estimator. Assuming each random variable is sampled from the same distribution with mean and actual variance , taking expectations we have,

where and . Therefore, the bias in our estimator is , analogous to the bias in the unweighted estimator (also notice that is the effective sample size). This means that to unbias our estimator we need to pre-divide by , ensuring that the expected value of the estimated variance equals the actual variance of the sampling distribution. The final unbiased estimate of sample variance is:

[6]

where . The degrees of freedom of this weighted, unbiased sample variance vary accordingly from N − 1 down to 0. The standard deviation is simply the square root of the variance above.

As a side note, other approaches have been described to compute the weighted sample variance.[7]

Weighted sample covariance

[edit]

In a weighted sample, each row vector (each set of single observations on each of the K random variables) is assigned a weight .

Then the weighted mean vector is given by

And the weighted covariance matrix is given by:[8]

Similarly to weighted sample variance, there are two different unbiased estimators depending on the type of the weights.

Frequency weights

[edit]

If the weights are frequency weights, the unbiased weighted estimate of the covariance matrix , with Bessel's correction, is given by:[8]

This estimator can be unbiased only if the weights are not standardized nor normalized, these processes changing the data's mean and variance and thus leading to a loss of the base rate (the population count, which is a requirement for Bessel's correction).

Reliability weights

[edit]

In the case of reliability weights, the weights are normalized:

(If they are not, divide the weights by their sum to normalize prior to calculating :

Then the weighted mean vector can be simplified to

and the unbiased weighted estimate of the covariance matrix is:[9]

The reasoning here is the same as in the previous section.

Since we are assuming the weights are normalized, then and this reduces to:

If all weights are the same, i.e. , then the weighted mean and covariance reduce to the unweighted sample mean and covariance above.

Vector-valued estimates

[edit]

The above generalizes easily to the case of taking the mean of vector-valued estimates. For example, estimates of position on a plane may have less certainty in one direction than another. As in the scalar case, the weighted mean of multiple estimates can provide a maximum likelihood estimate. We simply replace the variance by the covariance matrix and the arithmetic inverse by the matrix inverse (both denoted in the same way, via superscripts); the weight matrix then reads:[10]

The weighted mean in this case is: (where the order of the matrix–vector product is not commutative), in terms of the covariance of the weighted mean:

For example, consider the weighted mean of the point [1 0] with high variance in the second component and [0 1] with high variance in the first component. Then

then the weighted mean is:

which makes sense: the [1 0] estimate is "compliant" in the second component and the [0 1] estimate is compliant in the first component, so the weighted mean is nearly [1 1].

Accounting for correlations

[edit]

In the general case, suppose that , is the covariance matrix relating the quantities , is the common mean to be estimated, and is a design matrix equal to a vector of ones (of length ). The Gauss–Markov theorem states that the estimate of the mean having minimum variance is given by:

and

where:

Decreasing strength of interactions

[edit]

Consider the time series of an independent variable and a dependent variable , with observations sampled at discrete times . In many common situations, the value of at time depends not only on but also on its past values. Commonly, the strength of this dependence decreases as the separation of observations in time increases. To model this situation, one may replace the independent variable by its sliding mean for a window size .

Exponentially decreasing weights

[edit]

In the scenario described in the previous section, most frequently the decrease in interaction strength obeys a negative exponential law. If the observations are sampled at equidistant times, then exponential decrease is equivalent to decrease by a constant fraction at each time step. Setting we can define normalized weights by

where is the sum of the unnormalized weights. In this case is simply

approaching for large values of .

The damping constant must correspond to the actual decrease of interaction strength. If this cannot be determined from theoretical considerations, then the following properties of exponentially decreasing weights are useful in making a suitable choice: at step , the weight approximately equals , the tail area the value , the head area . The tail area at step is . Where primarily the closest observations matter and the effect of the remaining observations can be ignored safely, then choose such that the tail area is sufficiently small.

Weighted averages of functions

[edit]

The concept of weighted average can be extended to functions.[11] Weighted averages of functions play an important role in the systems of weighted differential and integral calculus.[12]

Correcting for over- or under-dispersion

[edit]

Weighted means are typically used to find the weighted mean of historical data, rather than theoretically generated data. In this case, there will be some error in the variance of each data point. Typically experimental errors may be underestimated due to the experimenter not taking into account all sources of error in calculating the variance of each data point. In this event, the variance in the weighted mean must be corrected to account for the fact that is too large. The correction that must be made is

where is the reduced chi-squared:

The square root can be called the standard error of the weighted mean (variance weights, scale corrected).

When all data variances are equal, , they cancel out in the weighted mean variance, , which again reduces to the standard error of the mean (squared), , formulated in terms of the sample standard deviation (squared),

See also

[edit]

Notes

[edit]

References

[edit]

Further reading

[edit]
[edit]
Revisions and contributorsEdit on WikipediaRead on Wikipedia
from Grokipedia
The weighted arithmetic mean, also known as the weighted average, is a of the standard that accounts for the relative importance of each point by assigning a weight to it. It is computed using the formula xˉ=i=1nwixii=1nwi\bar{x} = \frac{\sum_{i=1}^n w_i x_i}{\sum_{i=1}^n w_i}, where xix_i represents the data points and wi>0w_i > 0 are the corresponding positive weights, ensuring that more significant observations have greater influence on the result. This measure of is particularly valuable in scenarios where equal treatment of data would be inappropriate, such as when combining measurements with differing levels of precision or reliability. For instance, in , weights are often chosen as the inverse of the variance to emphasize more accurate observations, yielding an optimal under certain assumptions. In finance, it facilitates calculations like the by incorporating the proportions of different sources. Similarly, in and physics, it determines centers of mass or centroids by weighting component masses or areas. When all weights are equal, the weighted arithmetic mean simplifies to the ordinary , highlighting its role as a flexible extension of basic averaging. Key properties include its —allowing into weighted sums—and its status as a when weights are normalized to sum to 1, which preserves bounds between the minimum and maximum values. These attributes make it robust for applications in optimization, index construction (e.g., consumer price indices), and under , though care must be taken to select appropriate weights to avoid bias.

Fundamentals

Definition

The weighted arithmetic mean is a generalization of the that accounts for the relative importance of each data point by assigning positive weights to the observations. For a of values x1,x2,,xnx_1, x_2, \dots, x_n with corresponding weights w1,w2,,wnw_1, w_2, \dots, w_n, the weighted arithmetic mean xˉ\bar{x} is given by the formula xˉ=i=1nwixii=1nwi,\bar{x} = \frac{\sum_{i=1}^n w_i x_i}{\sum_{i=1}^n w_i}, where the denominator provides normalization to ensure the result is scale-invariant with respect to the weights. The weights wiw_i are typically non-negative (wi0w_i \geq 0) to maintain the interpretive consistency of the mean as a , ensuring it lies within the of the xix_i values. Negative weights can lead to sign-related issues that place the mean outside the observed range, while zero weights effectively exclude those observations without distortion. Non-negative weights are standard in statistical contexts. Normalization variants arise depending on whether the weights are pre-scaled: if i=1nwi=1\sum_{i=1}^n w_i = 1, the formula simplifies to xˉ=i=1nwixi\bar{x} = \sum_{i=1}^n w_i x_i; otherwise, the division by the sum of weights is essential for proper averaging. The concept originated in 7th-century with Brahmagupta's Brāhma Sphuṭa Siddhānta (628 CE), where it served as a statistical tool for estimating central values in applications like irregular excavations, extending basic averaging to handle unequal importance.

Relation to Unweighted Mean

The weighted arithmetic mean serves as a of the unweighted arithmetic mean, allowing for the incorporation of varying levels of importance or reliability among points. The unweighted arithmetic mean, defined as xˉ=1ni=1nxi\bar{x} = \frac{1}{n} \sum_{i=1}^n x_i, treats each of the nn observations equally by assigning an implicit weight of 1 to every xix_i. This formula arises directly as a special case of the weighted when all weights wiw_i are set equal to 1, reducing the general form xˉw=i=1nwixii=1nwi\bar{x}_w = \frac{\sum_{i=1}^n w_i x_i}{\sum_{i=1}^n w_i} to the unweighted expression. To derive this connection explicitly, substitute wi=1w_i = 1 for all ii into the weighted formula: the numerator becomes i=1n1xi=i=1nxi\sum_{i=1}^n 1 \cdot x_i = \sum_{i=1}^n x_i, and the denominator simplifies to i=1n1=n\sum_{i=1}^n 1 = n, yielding xˉw=i=1nxin=xˉ\bar{x}_w = \frac{\sum_{i=1}^n x_i}{n} = \bar{x}. This substitution highlights the equal weighting inherent in the unweighted mean, where no differentiation is made based on external factors such as precision or . In interpretive terms, the unweighted mean represents an egalitarian or "democratic" averaging process, assigning identical influence to each point regardless of . By contrast, the weighted mean adjusts the contribution of each xix_i according to specified weights, enabling importance-adjusted summaries in applications like survey analysis or experimental . Notably, the two means coincide precisely when all weights are equal, underscoring the unweighted form's role as the baseline case. This relationship assumes familiarity with the basic but clarifies its position within the broader framework of weighted averages.

Examples and Illustrations

Basic Example

To illustrate the computation of the weighted arithmetic mean, consider the values x=[2,4,6]x = [2, 4, 6] with corresponding weights w=[1,2,3]w = [1, 2, 3]. The numerator is the sum of the weighted values: 12+24+36=2+8+18=281 \cdot 2 + 2 \cdot 4 + 3 \cdot 6 = 2 + 8 + 18 = 28. The denominator is the sum of the weights: 1+2+3=61 + 2 + 3 = 6. Thus, the weighted mean is xˉ=28/64.67\bar{x} = 28 / 6 \approx 4.67. In contrast, the unweighted arithmetic mean of these values is (2+4+6)/3=4(2 + 4 + 6)/3 = 4. The weighted mean exceeds this because the highest weight (3) is assigned to the largest value (6), which pulls the result upward toward that value. A practical application arises in , such as averaging grades weighted by hours; for example, grades of 80 in a 2-credit course and 90 in a 3-credit course yield a of (280+390)/(2+3)=430/5=86(2 \cdot 80 + 3 \cdot 90)/(2 + 3) = 430/5 = 86, reflecting the greater influence of the higher-credit course.

Convex Combination Example

The can be expressed as a when the weights are normalized to sum to 1 and are nonnegative, providing a geometric and probabilistic perspective on the concept. In this form, the xˉ\bar{x} of values x1,x2,,xnx_1, x_2, \dots, x_n is given by xˉ=i=1npixi,\bar{x} = \sum_{i=1}^n p_i x_i, where pi0p_i \geq 0 for all ii and i=1npi=1\sum_{i=1}^n p_i = 1. This representation aligns with the definition of a convex combination in convex analysis, where the result is a point within the convex hull of the original points. Furthermore, in the context of affine geometry, these weights pip_i correspond to barycentric coordinates, which parameterize positions relative to the vertices of a simplex, such as a line segment or triangle. Consider a simple numerical example with two values, x1=1x_1 = 1 and x2=3x_2 = 3, and corresponding weights p1=0.4p_1 = 0.4 and p2=0.6p_2 = 0.6. The weighted mean is then xˉ=0.41+0.63=2.2\bar{x} = 0.4 \cdot 1 + 0.6 \cdot 3 = 2.2. Geometrically, this places xˉ\bar{x} on the joining 1 and 3, specifically at a position closer to 3 due to the larger weight p2p_2, illustrating how the divides the segment in the ratio of the weights. Probabilistically, the weights pip_i can be interpreted as probabilities of a discrete random variable XX taking values xix_i, making the weighted mean equivalent to the E[X]=i=1npixiE[X] = \sum_{i=1}^n p_i x_i. This connection underscores the mean's role in summarizing the of a . A key property is that the weighted mean, as a , uniquely lies within the of the points {x1,,xn}\{x_1, \dots, x_n\}, ensuring it remains bounded by the extremal values and preserving the geometric structure of the set.

Types of Weights

Variance-Defined Weights

Variance-defined weights assign greater importance to observations with lower variability, using the inverse of the variance as the weight for each data point. Specifically, for a set of measurements xix_i with associated variances σi2\sigma_i^2, the weights are given by wi=1/σi2w_i = 1 / \sigma_i^2. These weights are then normalized such that they sum to 1, yielding the weighted arithmetic mean as xˉ=i(xi/σi2)i(1/σi2).\bar{x} = \frac{\sum_i (x_i / \sigma_i^2)}{\sum_i (1 / \sigma_i^2)}. This approach stems from the principle of optimal estimation in , where the goal is to combine independent estimates to minimize the overall variance of the resulting mean. The rationale for lies in its ability to produce the when the observations are uncorrelated and normally distributed; a full derivation of this variance minimization appears in the statistical properties section. Consider two measurements of a : x1=5x_1 = 5 with σ1=1\sigma_1 = 1 (variance 1) and x2=6x_2 = 6 with σ2=2\sigma_2 = 2 (variance 4). The weights are w1=1/1=1w_1 = 1/1 = 1 and w2=1/4=0.25w_2 = 1/4 = 0.25, with total weight 1.25. The weighted mean is (51+60.25)/1.25=6.5/1.25=5.2(5 \cdot 1 + 6 \cdot 0.25)/1.25 = 6.5/1.25 = 5.2. This result leans toward the more precise measurement (x1x_1), reflecting its lower uncertainty. In applications, is foundational in for pooling effect sizes from multiple studies, where each study's contribution is weighted by the precision of its estimate. This method was formalized by William G. Cochran in the for combining estimates from different experiments, emphasizing weights inversely proportional to their variances to achieve efficient aggregation.

Frequency Weights

In the context of the weighted arithmetic mean, frequency weights arise when data points represent multiplicities or counts of occurrences, such as in grouped or summarized datasets where individual observations are not listed separately. The weight wiw_i for each distinct value xix_i is simply the frequency fif_i, the number of times xix_i appears in the full dataset. The resulting mean is given by the formula xˉ=fixifi,\bar{x} = \frac{\sum f_i x_i}{\sum f_i}, where the denominator normalizes by the total number of observations. A practical example occurs in survey data aggregation, such as election polling where candidates A and B receive 10 and 20 votes, respectively, from a sample of 30 respondents. Assigning frequency weights of 10 to A and 20 to B yields a weighted mean vote share of 10A+20B30\frac{10A + 20B}{30}, reflecting the proportional support without needing to replicate entries in the dataset. This approach is computationally equivalent to expanding the dataset by replicating each xix_i exactly fif_i times and then computing the unweighted , but it avoids redundant data storage and processing, making it efficient for large-scale frequency tables. Frequency weights have been employed historically in to compute population-level averages from data, such as age distributions or vital rates, where counts from tabulated returns serve as weights; for instance, analyses of 19th-century U.S. populations used such weighted averages to derive demographic indicators like migration rates from grouped figures.

Statistical Properties

Expectation

The expected value of the weighted arithmetic mean can be derived using the linearity of expectation. Consider independent random variables X1,X2,,XnX_1, X_2, \dots, X_n with respective expected values μ1,μ2,,μn\mu_1, \mu_2, \dots, \mu_n, and fixed positive weights w1,w2,,wnw_1, w_2, \dots, w_n such that W=i=1nwiW = \sum_{i=1}^n w_i. The weighted mean is defined as Xˉ=1Wi=1nwiXi\bar{X} = \frac{1}{W} \sum_{i=1}^n w_i X_i. By the linearity of expectation, which applies regardless of dependence among the XiX_i, E[Xˉ]=E[1Wi=1nwiXi]=1Wi=1nwiE[Xi]=i=1nwiμiW.E[\bar{X}] = E\left[ \frac{1}{W} \sum_{i=1}^n w_i X_i \right] = \frac{1}{W} \sum_{i=1}^n w_i E[X_i] = \frac{\sum_{i=1}^n w_i \mu_i}{W}. This result follows from the property that for constants aia_i and random variables YiY_i, E[aiYi]=aiE[Yi]E[\sum a_i Y_i] = \sum a_i E[Y_i], extended here with ai=wi/Wa_i = w_i / W and Yi=XiY_i = X_i. In the special case where all μi=μ\mu_i = \mu for some common mean μ\mu, the weighted mean simplifies to E[Xˉ]=μE[\bar{X}] = \mu, indicating that Xˉ\bar{X} is an unbiased estimator of μ\mu. This unbiasedness holds provided the weights are non-random constants; if the weights were themselves random variables, the expectation would not generally equal the weighted average of the individual expectations, though such scenarios are not addressed here.

Variance in Independent Cases

When the random variables XiX_i are independent with known variances σi2>0\sigma_i^2 > 0, the variance of the weighted arithmetic mean Xˉ=i=1nwiXii=1nwi\bar{X} = \frac{\sum_{i=1}^n w_i X_i}{\sum_{i=1}^n w_i} is \Var(Xˉ)=i=1nwi2σi2(i=1nwi)2,\Var(\bar{X}) = \frac{\sum_{i=1}^n w_i^2 \sigma_i^2}{\left( \sum_{i=1}^n w_i \right)^2}, where the wi>0w_i > 0 are fixed weights. This expression arises from the general property that the variance of a of independent random variables is the weighted sum of the individual variances, with the coefficients for Xˉ\bar{X} being wi/wiw_i / \sum w_i. To derive it, note that \Var(aiXi)=ai2\Var(Xi)\Var\left( \sum a_i X_i \right) = \sum a_i^2 \Var(X_i) for independent XiX_i, so substituting ai=wi/Wa_i = w_i / W with W=wiW = \sum w_i yields the formula after simplification. In the special case where all variances are equal (σi2=σ2\sigma_i^2 = \sigma^2 for all ii) and the weights are equal (wi=1w_i = 1), the formula simplifies to \Var(Xˉ)=σ2/n\Var(\bar{X}) = \sigma^2 / n, which is the familiar variance of the unweighted arithmetic mean of nn observations. This reduction highlights how the weighted mean generalizes the unweighted case, preserving the same form when precision is uniform across observations. The variance \Var(Xˉ)\Var(\bar{X}) can be minimized by choosing weights wi1/σi2w_i \propto 1 / \sigma_i^2, known as ; without loss of generality, set wi=1/σi2w_i = 1 / \sigma_i^2. Under these optimal weights, the minimum variance simplifies to \Var(Xˉ)=(i=1n1/σi2)1\Var(\bar{X}) = \left( \sum_{i=1}^n 1 / \sigma_i^2 \right)^{-1}. This choice is derived by minimizing the variance expression subject to wi=1\sum w_i = 1 using Lagrange multipliers: let L=(wi2σi2)+λ(1wi)L = \sum (w_i^2 \sigma_i^2) + \lambda (1 - \sum w_i); setting partial derivatives to zero gives wi=1/(λσi2)w_i = 1 / (\lambda \sigma_i^2), implying the proportionality, and substituting back yields the minimized value. Such weighting is particularly useful when combining independent estimates of a common parameter, as it allocates greater influence to more precise observations while ensuring the estimator remains unbiased for the expectation.

Variance in Sampling Contexts

In survey sampling, the weighted arithmetic mean is frequently employed to estimate the population mean under designs with unequal inclusion probabilities πi\pi_i, where πi\pi_i denotes the probability that unit ii is selected into the sample. A key in this context is the π\pi-estimator (also called the Hajek estimator), defined as xˉπ=isxi/πiis1/πi,\bar{x}_\pi = \frac{\sum_{i \in s} x_i / \pi_i}{\sum_{i \in s} 1 / \pi_i}, where ss is the realized sample. This form arises as the ratio of Horvitz-Thompson estimators for the population total and size, providing approximate unbiasedness for the population mean when inclusion probabilities are bounded away from 1. The variance of xˉπ\bar{x}_\pi is derived using or approximations, incorporating the first- and second-order inclusion probabilities πi\pi_i and πij\pi_{ij} (for iji \neq j). Exact computation requires joint probabilities, but practical estimation often relies on design effects, which measure the ratio of the design-based variance to that under simple random sampling, adjusting for clustering, stratification, or unequal probabilities inherent in the sampling scheme. The Horvitz-Thompson itself targets the population total unbiasedly as Y^=isxi/πi\hat{Y} = \sum_{i \in s} x_i / \pi_i, with to the via xˉHT=Y^/N\bar{x}_{HT} = \hat{Y} / N when the population size NN is known; its , V(Y^)=ij(πiπjπij)YiπiYjπj,V(\hat{Y}) = \sum_i \sum_j (\pi_i \pi_j - \pi_{ij}) \frac{Y_i}{\pi_i} \frac{Y_j}{\pi_j}, similarly involves effects for and highlights efficiency gains or losses relative to equal-probability sampling. When NN is unknown, the π\pi-estimator replaces it with N^=is1/πi\hat{N} = \sum_{i \in s} 1 / \pi_i, yielding a consistent under standard conditions. A practical illustration occurs in , where the is partitioned into HH mutually exclusive , with independent simple random samples drawn from each. Here, weights are set as wi=Nh/nhw_i = N_h / n_h for unit ii in hh (with NhN_h and nhn_h the and sample sizes), so the weighted mean is xˉ=iwixi/N\bar{x} = \sum_i w_i x_i / N. An approximate variance formula, useful for initial assessments or when finite corrections are negligible, is V(xˉ)h(NhN)2Sh2nhV(\bar{x}) \approx \sum_h \left( \frac{N_h}{N} \right)^2 \frac{S_h^2}{n_h}, where Sh2S_h^2 is the variance within hh. More precise incorporates -specific sample variances sh2=1nh1ih(xixˉh)2s_h^2 = \frac{1}{n_h - 1} \sum_{i \in h} (x_i - \bar{x}_h)^2 and finite corrections, yielding V^(xˉ)=h(NhN)2sh2nh(1nhNh)\hat{V}(\bar{x}) = \sum_h \left( \frac{N_h}{N} \right)^2 \frac{s_h^2}{n_h} \left(1 - \frac{n_h}{N_h}\right), reflecting the design's impact on overall variability. For complex designs where analytical variance formulas are intractable, offers a resampling-based validation: replicates are generated by mimicking the original sampling process, and the empirical variance across replicates approximates the design variance without deriving joint probabilities. This approach, as in the Rao-Wu method, is particularly effective for stratified or multistage schemes, ensuring robust inference in practice.

Weighted Sample Variance and Covariance

In statistics, the weighted sample variance extends the unweighted sample variance to account for varying importance or precision of observations through weights. For reliability weights, which reflect the relative precision or inverse variance of each data point (often used in contexts like or regression diagnostics), the population weighted variance is defined as σw2=i=1nwi(xixˉw)2i=1nwi,\sigma_w^2 = \frac{\sum_{i=1}^n w_i (x_i - \bar{x}_w)^2}{\sum_{i=1}^n w_i}, where xˉw=i=1nwixii=1nwi\bar{x}_w = \frac{\sum_{i=1}^n w_i x_i}{\sum_{i=1}^n w_i} is the weighted mean, and wi>0w_i > 0 are the reliability weights. This formula provides a biased of the population variance when used as a sample estimator, analogous to dividing by nn in the unweighted case. To obtain an unbiased analogous to (dividing by n1n-1), the denominator is adjusted to wi(1wi2(wi)2)\sum w_i \left(1 - \frac{\sum w_i^2}{(\sum w_i)^2}\right), yielding sw2=i=1nwi(xixˉw)2i=1nwi(i=1nwi2)i=1nwi.s_w^2 = \frac{\sum_{i=1}^n w_i (x_i - \bar{x}_w)^2}{\sum_{i=1}^n w_i - \frac{(\sum_{i=1}^n w_i^2)}{\sum_{i=1}^n w_i}}. This correction accounts for the effective degrees of freedom in the weighted setting, reducing bias particularly when weights are unequal. In contrast, for frequency weights fif_i (non-negative integers representing the number of times each xix_i is replicated in the sample, common in survey data or grouped observations), the weighted sample variance treats the data as an expanded dataset of size fi\sum f_i. The unbiased estimator is then sf2=i=1nfi(xixˉf)2i=1nfi1,s_f^2 = \frac{\sum_{i=1}^n f_i (x_i - \bar{x}_f)^2}{\sum_{i=1}^n f_i - 1}, where xˉf=i=1nfixii=1nfi\bar{x}_f = \frac{\sum_{i=1}^n f_i x_i}{\sum_{i=1}^n f_i}. This directly parallels the unweighted sample variance formula applied to the full replicated sample. The distinction between reliability and frequency weights is crucial to avoid biased variance estimates: reliability weights model varying precisions without implying replication, leading to the adjusted denominator for unbiasedness, whereas frequency weights assume actual multiplicity, preserving the simple N1N-1 correction where N=fiN = \sum f_i. Misapplying one type for the other can inflate or deflate the variance, affecting downstream inferences like confidence intervals. The weighted sample covariance similarly generalizes the unweighted version to paired observations (xi,yi)(x_i, y_i) with weights wiw_i. For reliability weights, it is given by covw(X,Y)=i=1nwi(xixˉw)(yiyˉw)i=1nwi,\text{cov}_w(X, Y) = \frac{\sum_{i=1}^n w_i (x_i - \bar{x}_w)(y_i - \bar{y}_w)}{\sum_{i=1}^n w_i}, where yˉw\bar{y}_w is the of the yiy_i. This measures the weighted linear association between XX and YY, with an unbiased version obtainable via a similar degrees-of-freedom correction in the denominator. For weights, the formula becomes covf(X,Y)=i=1nfi(xixˉf)(yiyˉf)i=1nfi1.\text{cov}_f(X, Y) = \frac{\sum_{i=1}^n f_i (x_i - \bar{x}_f)(y_i - \bar{y}_f)}{\sum_{i=1}^n f_i - 1}. These estimators are essential for analyzing heteroscedastic data or weighted least squares, ensuring covariance reflects the intended weighting scheme.

Vector and Function Weighted Averages

The weighted arithmetic mean extends naturally to vectors in a multivariate setting by applying the scalar formula component-wise to each dimension of the input vectors. For a set of vectors xi=(xi1,xi2,,xid)Rd\mathbf{x}_i = (x_{i1}, x_{i2}, \dots, x_{id}) \in \mathbb{R}^d with corresponding positive weights wi>0w_i > 0 for i=1,,ni = 1, \dots, n, the weighted vector mean is given by xˉ=i=1nwixii=1nwi=(i=1nwixi1i=1nwi,i=1nwixi2i=1nwi,,i=1nwixidi=1nwi).\bar{\mathbf{x}} = \frac{\sum_{i=1}^n w_i \mathbf{x}_i}{\sum_{i=1}^n w_i} = \left( \frac{\sum_{i=1}^n w_i x_{i1}}{\sum_{i=1}^n w_i}, \frac{\sum_{i=1}^n w_i x_{i2}}{\sum_{i=1}^n w_i}, \dots, \frac{\sum_{i=1}^n w_i x_{id}}{\sum_{i=1}^n w_i} \right). This operation produces a vector in the same space Rd\mathbb{R}^d and represents a convex combination when the weights are normalized to sum to 1. The resulting xˉ\bar{\mathbf{x}} is the balance point or barycenter of the weighted points, preserving the affine structure of the space. In vector spaces, this mean is a linear operator, meaning that if xi=aui+bvi\mathbf{x}_i = a \mathbf{u}_i + b \mathbf{v}_i for scalars a,ba, b and vectors ui,vi\mathbf{u}_i, \mathbf{v}_i, then the weighted mean of the xi\mathbf{x}_i equals aa times the weighted mean of the ui\mathbf{u}_i plus bb times the weighted mean of the vi\mathbf{v}_i. A prominent application arises in and physics, where the weighted vector mean computes the of a of points with proportional to the weights wiw_i. For position vectors ri\mathbf{r}_i, the center of is rˉ=wiriwi\bar{\mathbf{r}} = \frac{\sum w_i \mathbf{r}_i}{\sum w_i}, which balances the under gravitational forces. In , this formulation underpins weighted , where cluster are updated as the weighted means of assigned data points, with weights reflecting sample importance, , or to handle imbalanced or noisy datasets. For instance, in analysis, genetic weighted k-means uses such to group large-scale vector data while accounting for varying feature reliabilities. The weighted arithmetic mean also generalizes to averaging functions, treating them as elements in a function space. For a collection of functions fi:XRf_i: \mathcal{X} \to \mathbb{R} defined on a domain X\mathcal{X} with weights wi>0w_i > 0, the weighted functional average is the function fˉ(x)=i=1nwifi(x)i=1nwi,xX.\bar{f}(x) = \frac{\sum_{i=1}^n w_i f_i(x)}{\sum_{i=1}^n w_i}, \quad \forall x \in \mathcal{X}. This pointwise operation yields a new function fˉ\bar{f} that interpolates the inputs according to their weights, analogous to the continuous case fˉ(x)=f(x)w(x)dxw(x)dx\bar{f}(x) = \frac{\int f(x) w(x) \, dx}{\int w(x) \, dx} for density-based weighting. Such averages are used in approximation theory and numerical analysis to blend basis functions, ensuring the result lies in the convex hull of the fif_i. Unlike the vector case, where linearity holds unconditionally in the vector space, functional averages may exhibit non-commutativity when composed with nonlinear operators, such as when averaging compositions figf_i \circ g differs from composing the average with gg, highlighting the need for careful handling in nonlinear applications.

Advanced Weighting Techniques

In scenarios where observations exhibit pairwise correlations, such as in experimental measurements sharing common systematic errors, the standard weighted arithmetic mean assuming independence can be biased or inefficient. The optimal weights are derived from the inverse of the covariance matrix VV, given by wik(V1)ikw_i \propto \sum_k (V^{-1})_{ik}, with the variance of the estimator being 1/(1TV11)1 / (1^T V^{-1} 1). For the special case of equal variances and constant pairwise correlation ρ\rho, the variance of the mean approximates σ2n[1+(n1)ρ]\frac{\sigma^2}{n} [1 + (n-1)\rho], effectively reducing the total weight by the factor 1+(n1)ρ1 + (n-1)\rho. For data where recent are more relevant, exponentially decreasing weights provide a mechanism to emphasize recency without abrupt cutoffs. The weights are defined as wi=αtiw_i = \alpha^{t-i} for observation at time ii, with decay 0<α<10 < \alpha < 1 and tt the current time, normalized such that wi=1\sum w_i = 1. This scheme underlies the exponentially weighted moving average (EWMA), originally proposed for forecasting and control charts, where the resulting mean converges to a recursive form xˉt=αxt+(1α)xˉt1\bar{x}_t = \alpha x_t + (1 - \alpha) \bar{x}_{t-1}. Seminal work established its properties for detecting shifts in means with minimal lag. When the observed dispersion in data exceeds expectations under assumed variances σi2\sigma_i^2, a correction scales the weights to address over- or under-dispersion. The dispersion factor is computed as ϕ=wi(xixˉ)2n1\phi = \frac{\sum w_i (x_i - \bar{x})^2}{n-1}, where xˉ\bar{x} is the preliminary weighted mean, nn is the number of observations, and weights wiw_i are typically 1/σi21/\sigma_i^2; if ϕ>1\phi > 1, weights are scaled by 1/ϕ1/\phi to inflate variances appropriately. This , common in weighted regression diagnostics, quantifies deviation from the assumed error model and adjusts for heteroscedasticity or model misspecification in generalized linear models. In network analysis, where node importance diminishes with structural distance, weights proportional to the inverse of distance wi1/diw_i \propto 1 / d_i (with did_i the graph distance from a reference node) enable localized averages that prioritize nearby interactions. This (IDW) approach, applied to weighted networks for or aggregation, assumes similarity decays with separation, yielding a that interpolates values across connected components. The method, foundational in spatial and graph , uses a power parameter to tune decay sharpness.

References

Add your contribution
Related Hubs
User Avatar
No comments yet.