= Weighted arithmetic mean
{title2=$\bar x_w$}
{wiki}
= Weighted mean
{synonym}
The <weighted arithmetic mean> combines values according to how much each contributes to the quantity being summarized. For a finite list of <real numbers> $x_i$ and nonnegative weights $w_i$ with $W=\sum_iw_i>0$, define
$$
\boxed{\bar x_w=\frac{\sum_iw_ix_i}{W}.}
$$
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 $p_i=w_i/W$ makes the <weighted mean> a <convex combination>, since $p_i\ge0$ and $\sum_i p_i=1$. It therefore lies between the smallest and largest input values. https://www.itl.nist.gov/div898/software/dataplot/refman2/ch2/weigmean.pdf[NIST Dataplot reference manual: weighted mean]{ref}
For example, give the values $90$ and $60$ weights $2$ and $8$:
$$
\bar x_w=\frac{2\cdot90+8\cdot60}{2+8}=\boxed{66}.
$$
The larger weight pulls the result closer to $60$. The balancing identity
$$
\sum_i w_i(x_i-\bar x_w)=0
$$
explains a geometric interpretation: if the weights were masses placed at positions $x_i$, the <weighted mean> would be their <center of mass>. Here $8(66-60)=2(90-66)=48$, 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> $f$ and nonnegative weight function $w$, the analogous <integral> is $\int wf/\int w$, provided $wf$ is integrable and the total weight $\int w$ is positive and finite.
Back to article page