The weighted arithmetic mean combines values according to how much each contributes to the quantity being summarized. For a finite list of real numbers and nonnegative weights with , define
Zero weights ignore an entry; at least one weight must be positive. Multiplying every weight by the same positive number leaves the result unchanged. Writing makes the weighted mean a convex combination, since and . It therefore lies between the smallest and largest input values. [ref]
For example, give the values and weights and :
The larger weight pulls the result closer to . The balancing identity
explains a geometric interpretation: if the weights were masses placed at positions , the weighted mean would be their center of mass. Here , so the two sides balance even though their distances from the mean differ.
Weights need an interpretation. They can represent numbers of observations, masses, or probabilities in a finite probability distribution. These meanings lead to the same formula, while answering different questions. For instance, combining means of groups uses group sizes as weights to recover the mean over individual observations. For a function and nonnegative weight function , the analogous integral is , provided is integrable and the total weight is positive and finite.
Inverse-variance weighting combines estimates of the same quantity by giving a more precise estimate a larger weight. Suppose are independent, unbiased estimators of , with known variances . For normalized weights,
The inverse is taken after squaring the standard uncertainty: twice the standard uncertainty gives one quarter as much weight. The corresponding weighted least squares criterion is ; differentiating it with respect to gives the same weighted arithmetic mean.[ref]
The optimality statement is precise. Any linear unbiased estimator requires . By the Cauchy-Schwarz inequality,
Equality holds for the displayed weights. Thus they minimize variance among linear unbiased combinations under these assumptions; a normal distribution is not needed for that proof.
For an original example, combine observed values 10 and 14 with standard uncertainties 1 and 2 in the same units. The normalized weights are and , giving estimate , variance and standard uncertainty approximately . Equal weights give 12 and standard uncertainty .
Correlated errors change the problem. A contribution common to every reading survives every weighting whose coefficients sum to one; precision limits of weighting correlated repeats derives the resulting floor. More generally, use the full covariance matrix and generalized least squares rather than treating correlated readings as independent.[ref] Uncertainty in estimated inverse-variance weights is another limitation: variances estimated from the same data are not fixed known quantities, and an accidentally tiny estimated variance does not justify arbitrary confidence.
Uncertainty in estimated inverse-variance weights arises when the variances used in inverse-variance weighting are themselves estimated. A very small estimated variance can give one observation or group a large random weight. The familiar variance formula for fixed, known weights cannot simply be reused with estimated variances treated as exact. NIST specifically warns that weights estimated from few replicates can substantially and unpredictably affect a weighted least squares analysis.[ref]
Suppose independent groups contain independent normal random variables with common mean and group variance . Let and be the group sample mean and unbiased sample variance, and form
For normal samples, each sample mean is independent of its sample variance. Conditional on the estimated weights, the estimator remains unbiased and has
Thus the law of total variance gives unconditional variance equal to the expectation of this expression. The true still appear; replacing them by the same random does not establish the actual conditional variance. Outside the independence assumptions, even conditional unbiasedness can fail.
An original two-group example takes and true , so each group mean has variance . If observed sample variances are and , the estimated normalized weights are and . For group means and , the combined estimate is . The plug-in variance is
but the true conditional variance under the stipulated model is
The corresponding standard deviations are about and . Equal weights would have variance . An accidentally small estimated variance has both overstated precision and moved the combination away from the optimal equal weights in this example.
Reciprocal moments of an estimated variance explain the unstable precision estimate. For a normal sample with , has a chi-squared distribution. Integrating its density gives
Consequently for , while the second moment requires . The density and its gamma-distribution parameterization are documented in the primary SciPy implementation notes.[ref] With , the inverse sample variance has a finite mean twice the true precision and an infinite variance; the normalized weights remain bounded, so this does not imply their variance is infinite.
More replication or a justified smooth variance model can stabilize weights. NIST describes direct replicate-based weight estimation and variance-function modeling as distinct approaches.[ref] A proposed validation repeats the complete weight-estimation and combination procedure on simulated or replicated groups, checking actual interval coverage as well as point estimates. A bootstrap must reproduce the weight-estimation stage; holding the fitted weights fixed tests a different procedure.
Reciprocal moments of an estimated variance determine whether a precision estimate such as has a finite expected value or variance. Small positive values of a sample variance become large values after inversion. An unbiased estimator of a variance therefore need not give an unbiased or even integrable estimate of its reciprocal.
For , let be independent normal random variables with common mean and variance . For the unbiased sample variance , put . Then has a chi-squared distribution. Its probability density function is for .[ref]
For any real , direct integration and the Gamma function give
The convergence restriction is essential: near zero the integrand has exponent , so the integral diverges when . Substitution of a negative Gamma function argument into the displayed quotient does not define a nonexistent moment.
Rescaling gives the useful general result
In particular, the mean reciprocal exists for , while its variance requires :
For the mean is , the variance is and the coefficient of variation is . For the mean is finite but the variance is infinite. For even the mean diverges. Increasing the number of groups does not repair a nonexistent moment of each raw reciprocal estimate.
Inverse-variance weighting commonly normalizes these reciprocals. Those normalized weights lie between zero and one, so their moments can exist even when the raw reciprocal moments fail. This distinction matters in uncertainty in estimated inverse-variance weights: neither the moment calculation nor a plug-in precision formula alone establishes the accuracy of the final weighted estimator. The results here use the exact normal-sample law; a nonnormal sample requires a different analysis.
For positive mean density, this average weights a velocity by local mass rather than volume. It satisfies the exact identity , so it naturally represents mass flux in averaged conservation laws. The ordinary volume mean generally fails that identity when density and velocity are correlated. Applied inside a phase, the same construction uses density times that phase's indicator as its weight.
For a partition of a set of complete sample observations into groups of known sizes and total , its sample mean is the weighted mean of the group sample means. Indeed, dividing by proves the identity. If the printed group means each have absolute rounding error at most , their compatible pooled mean lies in
This follows because all the weights are nonnegative. Equivalently, the pooled absolute rounding error is at most , by the triangle inequality. A printed overall mean must have a rounding interval intersecting this interval. Disjoint intervals prove incompatibility, rather than merely a difference of displayed decimals. This is a necessary consistency check for means of the same complete sample; it cannot silently equate a full-sample mean with a different complete-case mean or establish a unique repair to inconsistent output.
Suppose disjoint nonempty groups have sizes and arithmetic means . The arithmetic mean of all observations is
Each group contributes the sum ; add those totals before dividing by the overall count. This is exactly a weighted mean of group means with weights equal to group sizes. [ref]
Take a synthetic example with two observations equal to and eight equal to . The two group means are and , and the combined mean is . Giving the two groups equal weights instead produces , which summarizes the two group means with equal influence. To summarize all ten individuals with equal influence, use their group counts.
Figure 1.
Group size determines each group mean's influence on the combined individual mean
. Two synthetic observations are and eight are . Their combined arithmetic mean is ; the equal-weight average of the two group means is . Details.
The group means and counts determine the combined arithmetic mean, but do not generally determine the combined variance. Variation within the groups is additional information.
For a finite list of real numbers and nonnegative weights of positive total , the weighted mean uniquely minimizes the weighted sum of squared deviations
Expanding around and using gives
Every displacement from the weighted mean increases the objective. This is the simplest one-parameter weighted least squares problem: represent all entries by one common value.
For the weighted values and with weights and ,
Thus , while . The minimum is defined by this squared-error criterion; a different loss can select a different summary, such as a median under unweighted absolute deviations.
Figure 1.
The weighted mean is the unique minimum of a squared-error objective
. For , the minimum is at . Moving to increases the objective by . Details.
For a nonempty finite list of real numbers , the arithmetic mean is
It is the weighted mean with equal weights, giving each observation equal influence. For , the sum is and the arithmetic mean is . Replacing every value by retains the same total. The residuals sum to zero, so the mean is also the balancing point of these equally weighted observations.
The arithmetic mean minimizes the sum of squared deviations by the weighted mean minimizes squared deviations identity with all weights one. A large input can consequently have a substantial effect: replacing by changes the mean to , while the median remains . The choice of summary depends on what aspect of the data matters.
The harmonic mean of a nonempty finite list of positive real numbers is the multiplicative inverse of the arithmetic mean of their inverses:
For two inputs, . Replacing each input by preserves the sum of inverses, making it useful when a fixed amount divided by a rate determines a cost or duration. This positive-input definition avoids division by zero; negative inputs need not retain the usual averaging or ordering properties. [ref].
Travel two legs of equal length at positive speeds , with no stops. Their travel times are and , so the average speed is
For two legs at and , the times are two hours and one hour. The average speed is . The same speeds maintained for one hour each instead cover in two hours, giving the arithmetic mean . A slower equal-distance leg occupies more time, so the data being averaged must include what is held equal. This is total distance traveled divided by elapsed time; a return journey can have zero average velocity while keeping a positive average speed. [ref].
Figure 1. . Two original idealized journeys use the same speeds, and . On the left each leg has length , taking a total of three hours. On the right each leg lasts one hour, taking two hours and covering . Dashed straight lines show the corresponding average speeds. The diagrams omit stops and transition duration and show cumulative distance traveled rather than signed displacement. Details.
The arithmetic-geometric mean inequality applied to the inverses gives ; together with it yields the comparison in geometric mean. For two inputs the arithmetic–harmonic gap has the exact form
For and the gap is five. With one positive input held fixed and another approaching zero, the harmonic mean approaches zero too: a very slow fixed-distance leg dominates the travel time. Unequal leg lengths instead require a weighted harmonic mean.
For positive real numbers and nonnegative weights with , the weighted harmonic mean is
Equal weights give the harmonic mean, while a zero weight excludes that input. For travel at positive constant speeds over positive leg lengths , the weights are fractions of total distance:
For at and at , the weights are , elapsed time is hours, and the average speed is . Weighting the speeds by their time fractions instead gives the same result as a weighted arithmetic mean: . The two weight systems describe the same journey in different coordinates and must not be interchanged. [ref].

Articles by others on the same topic (1)

The weighted arithmetic mean is a generalization of the arithmetic mean that accounts for the importance or weight of each value in a dataset. Unlike the simple arithmetic mean, where all values are treated equally, the weighted arithmetic mean assigns different weights to different data points based on their significance.