Understanding the weighted average
A plain average treats every value as an equal citizen, and that is exactly what makes it wrong whenever the values are not equal in importance. A student who scores 80 on a quiz worth a little and 90 on an exam worth a lot has not averaged 85 — the exam pulls the result towards itself, and the true average is 86. The weights are what do the pulling: each value is multiplied by its weight, the products are added, and the total is divided by the total weight.
Formula and method
Σ(value × weight) — each value multiplied by its own weight, then all the products added together
Weighted mean: Values — the numbers being averaged, which may be any finite numbers, including negatives where the context allows them. Weights — the importance of each value, one per value, in the same order. Weights must be nonnegative, and their total must be positive. Σ(weights) — all the weights added together; dividing by this total is what turns the weighted sum back into an average. Weighted mean — the result, in the same unit as the values. Why the weights multiply before adding. A weight of 3 means its value counts three times as much as a value with weight 1. For the values 10, 20 and 30 with weights 1, 2 and 3, the products are 10, 40 and 90; their sum is 140, and the weights add to 6, so the weighted mean is 140 ÷ 6 = 23.3333…. Why the weights need not add to 1. The formula divides by the total weight, so any scale works: weights 1, 2 and 3 give the same answer as weights 10, 20 and 30. What matters is the ratio between the weights, not their size. Why the two lists must match. Each value needs exactly one weight, in the same position. A list of three values with two weights, or weights in the wrong order, pairs values with the wrong importance and gives a wrong answer.
Worked example
Example 1 — Values 10, 20, 30 with weights 1, 2, 3 (the live-page example) Values 10, 20 and 30, with matching weights 1, 2 and 3. Products: 10 × 1 = 10; 20 × 2 = 40; 30 × 3 = 90 Sum of products: 10 + 40 + 90 = 140 Sum of weights: 1 + 2 + 3 = 6 Weighted mean: 140 ÷ 6 = 23.33333333 Result: 23.33333333 (weighted result) This is the stored example on the live page, and the arithmetic above reproduces it. The plain mean of 10, 20 and 30 is 20, but the weighted mean is 23.33 — higher, because the largest value, 30, carries the largest weight, 3, and pulls the answer towards itself. The result is shown to eight decimal places as the site stores it, 23.33333333, because 140 ÷ 6 repeats as 23.333… for ever.