Weighted Mean Mathematics
Total Page:16
File Type:pdf, Size:1020Kb
underground Weighted mean mathematics A weighted mean or weighted average of a set of data (or numbers) is a mean in which the different pieces of data are given different weights. “Weight” here has the sense of “importance”, but can also be thought of as literal “weight”. The simplest case is where each piece of data 푥푖 occurs with a corresponding frequency 푓푖, then we can think of the data as 푥1, … , 푥1, 푥2, … , 푥2, … , 푥푛, … , 푥푛 with 푓1 copies of 푥1, and so on. Thus the arithmetic mean of these would be 푥 + ⋯ + 푥 + 푥 + ⋯ + 푥 + ⋯ + 푥 + ⋯ + 푥 ∑ 푓 푥 ̄푥= 1 1 2 2 푛 푛 = 푖 푖 . 푓1 + 푓2 + ⋯ + 푓푛 ∑ 푓푖 More generally, if we weight the data 푥푖 with weight 푤푖, then the weighted arithmetic mean ∑ 푤푖푥푖 is . ∑ 푤푖 This is the same formula as that for the centre of mass of a set of objects (where weight 푤푖 ∑ 푚푖푥푖 is replaced by mass 푚푖): ̄푥= , that is, the 푥-coordinate of the centre of mass is the ∑ 푚푖 mean of the 푥-coordinates of the objects, where the objects are weighted by their mass. It is also the same formula as that for the expectation of a discrete random variable 푋. If 푋 can take the values 푥1, …, 푥푛 with probabilities 푝1, …, 푝푛 respectively, where 푝1 + 푝2 + ⋯ + 푝푛 = 1, then the expectation (mean) of 푋 is given by 퐸(푋) = 푝1푥1 + 푝2푥2 + ⋯ + 푝푛푥푛 = ∑ 푝푖푥푖. (We don’t need to explicitly divide by 푝1 + 푝2 + ⋯ + 푝푛 as this equals 1.) Similarly, the weighted geometric mean of a set of data would be 푤1 푤2 푤푛 1/(푤1+푤2+⋯+푤푛) (푥1 푥2 … 푥푛 ) . Weighted means are used when calculating inflation: in the UK, the Retail Price Index (RPI) and Consumer Price Index (CPI) are calculated by first finding a weighted mean cost ofaset of items in a typical shopping basket, weighted by the quantity in which they might typically be purchased. More can be found on these at the Office for National Statistics. Weighted means can also be used for continuous mass distributions. For example, if a uniform lamina has the shape shown in this diagram: Page 1 of 2 Copyright © University of Cambridge. All rights reserved. Last updated 31-Oct-16 https://undergroundmathematics.org/glossary/weighted-mean then we can estimate the 푥-coordinate of its centre of mass by summing over the strips, one of which is highlighted in red: ∑(푓(푥)훿푥)푥 ̄푥≈ ∑(푓(푥)훿푥) since each strip has mass proportional to its area 푓(푥)훿푥. In the limit as the strips become thinner, the sums become integrals, giving ∫푏 푥푓(푥) 푑푥 ̄푥= 푎 . 푏 ∫푎 푓(푥) 푑푥 The same formula applies if we are finding the expectation (mean) of a continuous random variable, where this time 푓(푥) is the probability density function, so 푏 퐸(푋) = 푥푓(푥) 푑푥. ∫푎 푏 (Again, we do not need to explicitly divide by the integral , as this equals .) ∫푎 푓(푥) 푑푥 1 Page 2 of 2 Copyright © University of Cambridge. All rights reserved. Last updated 31-Oct-16 https://undergroundmathematics.org/glossary/weighted-mean.