2 Weighted means

For goods and services, price changes vary considerably from one to another. Central to the theme question of this course, Are people getting better or worse off?, there is a need to find a fair method of calculating the average price change over a wide range of goods and services. Clearly a 10% rise in the price of bread is of greater significance to most people than a similar rise in the price of clothes pegs, say. What we need to take account of, then, are the relative weightings attached to the various price changes under consideration.

2.1 The mean of a combined batch

This first subsection looks at how a mean can be calculated when two unequally weighted batches are combined.

Example 7 Alan’s and Beena’s biscuits

Suppose we are conducting a survey to investigate the general level of prices in some locality. Two colleagues, Alan and Beena, have each visited several shops and collected information on the price of a standard packet of a particular brand of biscuits. They report as follows (Figure 9).

  • Alan visited five shops, and calculated that the mean price of the standard packet at these shops was 81.6p.

  • Beena visited eight shops, and calculated that the mean price of the standard packet at these shops was 74.0p.

Figure 9 Means of biscuit prices

If we had all the individual prices, five from Alan and eight from Beena, then they could be amalgamated into a single batch of 13 prices, and from this combined batch we could calculate the mean price of the standard packet at all 13 shops. However, our two investigators have unfortunately not written down, nor can they fully remember, the prices from individual shops. Is there anything we can do to calculate the mean of the combined batch?

Fortunately there is, as long as we are interested in arithmetic means. (If they had recorded the medians instead, then there would have been very little we could do.)

The mean of the combined batch of all 13 prices will be calculated as

We already know that the size of the combined batch is the sum of the sizes of the two original batches; that is, 5+8=13. The problem here is how to find the sum of the combined batch of Alan’s and Beena’s prices. The solution is to rearrange the familiar formula

so that it reads

This will allow us to find the sums of Alan’s five prices and Beena’s eight prices separately. Adding the results will produce the sum of the combined batch prices. Finally, dividing by 13 completes the calculation of finding the combined batch mean.

Let us call the sum of Alan’s prices ‘sum(A)’ and the sum of Beena’s prices ‘sum(B)’.

For Alan: mean = 81.6 and size = 5, so sum open bracket A close bracket = 81.6 times 5=408.

For Beena: mean =74.0 and size =8, so sum open bracket B close bracket =74.0 times 8 =592.

For the combined batch:

Here, the result has been rounded to give the same number of digits as in the two original means.

The process that we have used above is an important one. It will be used several times in the rest of this course. The box below summarises the method, using symbols.

Mean of a combined batch

The formula for the mean overline x subscript uppercase C end of a combined batch uppercase C is

where batch uppercase C consists of batch uppercase A combined with batch uppercase B, and

For our survey in Example 7,

The formula summarises the calculations we did as

This expression is an example of a weighted mean. The numbers 5 and 8 are the weights. We call this expression the weighted mean of 81.6 and 74.0 with weights 5 and 8, respectively.

To see why the term weighted mean is used for such an expression, imagine that Figure 10 shows a horizontal bar with two weights, of sizes 5 and 8, hanging on it at the points 81.6 and 74.0, and that you need to find the point at which the bar will balance. This point is at the weighted mean: approximately 76.9.

Figure 10 Point of balance at the weighted mean

This physical analogy illustrates several important facts about weighted means.

  • It does not matter whether the weights are 5 kg and 8 kg or 5 tonnes and 8 tonnes; the point of balance will be in the same place. It will also remain in the same place if we use weights of 10 kg and 16 kg or 40 kg and 64 kg – it is only the relative sizes (i.e. the ratio) of the weights that matter.

  • The point of balance must be between the points where we hang the weights, and it is nearer to the point with the larger weight.

  • If the weights are equal, then the point of balance is halfway between the points.

This gives the following rules.

Rules for weighted means

Rule 1 The weighted mean depends on the relative sizes (i.e. the ratio) of the weights.

Rule 2 The weighted mean of two numbers always lies between the numbers and it is nearer the number that has the larger weight.

Rule 3 If the weights are equal, then the weighted mean of two numbers is the number halfway between them.

Example 8 Two batches of small televisions

Suppose that we have two batches of prices (in pounds) for small televisions:

To find the mean of the combined batch we use the formula above, with

This gives

Note that this is the weighted mean of 119 and 185 with weights 7 and 13 respectively. It lies between 119 and 185 but it is nearer to 185 because this has the greater weight: 13 compared with 7.

Example 8 is the subject of the following screencast. [Note that references to ‘the unit’ and ‘the units’ should be interpreted as ‘this course’. The original wording refers to the Open University course from which this material is adapted.]

Video content is not available in this format.

Screencast 2 Calculating a weighted mean

2.2 Further uses of weighted means

We shall now look at another similar problem about mean prices – one which is perhaps closer to your everyday experience.

Example 9 Buying petrol

Suppose that, in a particular week in 2012, a motorist purchased petrol on two occasions. On the first she went to her usual, relatively low-priced filling station where the price of unleaded petrol was 136.9p per litre and she filled the tank; the quantity she purchased was 41.2 litres. The second occasion saw her obliged to purchase petrol at an expensive service station where the price of unleaded petrol was 148.0p per litre; she therefore purchased only 10 litres. What was the mean price, in pence per litre, of the petrol she purchased during that week?

To calculate this mean price we need to work out the total expenditure on petrol, in pence, and divide it by the total quantity of petrol purchased, in litres.

The total quantity purchased is straightforward as it is just the sum of the two quantities, so 41.2 + 10.

To find the expenditure on each occasion, we need to apply the formula:

This gives 136.9 times 41.2 and 148.0 times 10, respectively.

So the total expenditure, in pence, is open bracket 136.9 times 41.2 close bracket + open bracket 148.0 times 10 close bracket. The mean price, in pence per litre, for which we were asked, is this total expenditure divided by the total number of litres bought:

We have left the answer in this form, rather than working out the individual products and sums as we went along, to show that it has the same form as the calculation of the combined batch mean. (The answer is 139.07p per litre, rounded from 139.067 97p per litre.)

The phrase ‘goods and services’ is an awkward way of referring to the things that are relevant to the cost of living; that is, physical things you might buy, such as bread or gas, and services that you might pay someone else to do for you, such as window-cleaning. Economists sometimes use the word commodity to cover both goods and services that people pay for, and we shall use that word from time to time in this course. (Note that there are other, different, technical meanings of commodity that you might meet in different contexts.)

The mean price of a quantity bought on two different occasions

In general, if you purchase q sub 1 units of some commodity at p sub 1 pence per unit and q sub 2 units of the same commodity at p sub 2 pence per unit, then the mean price of this commodity, overline p pence per unit, can be calculated from the following formula:

Example 10 Buying potatoes

Suppose that, in one month, a family purchased potatoes on two occasions. On one occasion they bought 10 kg at 40p per kg, and on another they bought 6 kg at 45p per kg. We can use this formula to calculate the mean price (in pence per kg) that they paid for potatoes in that month. We have

and

This gives

So the mean price for that month is 41.9p per kg.

The two formulas we have been using,

are basically the same; they are both examples of weighted means.

The first formula is the weighted mean of the numbers overline x subscript uppercase A end and overline x subscript uppercase B end, using the batch sizes, n subscript uppercase A end and n subscript uppercase B end, as weights.

The second formula is the weighted mean of the unit prices p sub 1 and p sub 2, using the quantities bought, q sub 1 and q sub 2, as weights.

The general form of a weighted mean of two numbers having associated weights is as follows.

Weighted mean of two numbers

The weighted mean of the two numbers x sub 1 and x sub 2 with corresponding weights w sub 1 and w sub 2 is

Weighted means have many uses, two of which you have already met. The type of weights depends on the particular use. In our uses, the weights were the following.

  • The sizes of the batches, when we were calculating the combined batch mean from two batch means.

  • The quantities bought, when we were calculating the mean price of a commodity bought on two separate occasions.

Another very important use is in the construction of an index, such as the Retail Prices Index; we shall therefore be making much use of weighted means in the final sections of this course.

In the next example, we do not have all the information required to calculate the mean, but we can still get a reasonable answer by using weights.

Example 11 Weighted means of two gas prices

Let us return to the gas prices in Table 3 (Subsection 1.2). This has information about the price of gas for typical consumers in individual cities, but no national figure. Suppose that you want to combine these figures to get an average figure for the whole country; how could you do it? At the end of Section 1, it was suggested that weighted means could provide a solution. The complete answer to this question, using weighted means, is in Example 13 towards the end of this section. To introduce the method used there, let us now consider a similar, but simpler, question.

Here we use just two cities, London and Edinburgh, where the prices were 3.818p per kWh and 3.740p per kWh respectively. How can we combine these two values into one sensible average figure?

One possibility would be to take the simple mean of the two numbers. This gives

However, this gives both cities equal weight. Because London is a lot larger than Edinburgh, we should expect the average to be nearer the London price than the Edinburgh price.

This suggests that we use a weighted mean of the form

where q sub 1 and q sub 2 are suitably chosen weights, with the weight q sub 1 of the London price larger than the weight q sub 2 of the Edinburgh price.

The best weights would be the total quantities of gas consumed in 2010 in each city. However, even if this information is not available to us, we can still find a reasonable average figure by using as weights a readily available measure of the sizes of the two cities: their populations.

The populations of the urban areas of these cities are approximately 8 300 000 and 400 000 respectively. So we could put q sub 1 = 8300000 and q sub 2 = 400 000.

However, we know that the weighted mean depends only on the ratio of the weights. Therefore, the weights q sub 1 = 83 and q sub 2 = 4 will give the same answer.

These weights give

Activity 6 Using the rules for weighted means

Using the rules for weighted means, would you expect the weighted mean price to be nearer the London price or the Edinburgh price? To check, calculate the weighted mean price.

Although we cannot think of the weighted mean price in Activity 6 as a calculation of the total cost divided by the total consumption, the answer is an estimate of the average price, in pence per kWh, for typical consumers in the two cities, and it is the best estimate we can calculate with the available information.

Sometimes the weights in a weighted mean do not have any significance in themselves: they are neither quantities, nor sizes, etc., but simply weights. This is illustrated in the following activity.

Activity 7 Weighted means of Open University marks

Open University students become familiar with the combination of interactive computer-marked assignment (iCMA) and tutor-marked assignment (TMA) scores to provide an overall continuous assessment score (OCAS) for a course.

Suppose that a student obtains a score of 80 for their iCMAs and a score of 60 for their TMAs. Calculate what this student’s overall continuous assessment score will be if the weights for the two components are as follows.

(a) iCMA 50, TMA 50

(b) iCMA 40, TMA 60

(c) iCMA 65, TMA 55

(d) iCMA 25, TMA 75

(e) iCMA 30, TMA 90

We have seen, in Activity 7 and in Example 11, that only the ratio of the weights affects the answer, not the individual weights. So weights are often chosen to add up to a convenient number like 100 or 1000. (This is Rule 1 for weighted means (see Subsection 2.1).)

Activity 7 should also have reminded you of another important property of a weighted mean of two numbers: the weighted mean lies nearer to the number having the larger weight. (This is part of Rule 2 for weighted means.)

2.3 More than two numbers

The idea of a weighted mean can be extended to more than two numbers. To see how the calculation is done in general, remind yourself first how we calculated the weighted mean of two numbers x sub 1 and x sub 2 with corresponding weights w sub 1 and w sub 2.

  1. Multiply each number by its weight to get the products x sub 1 w sub 1 and x sub 2 w sub 2.

  2. Sum these products to get x sub 1 w sub 1 + x sub 2 w sub 2.

  3. Sum the weights to get w sub 1 + w sub 2.

  4. Divide the sum of the products by the sum of the weights.

This leads to the following formula.

Weighted mean of two or more numbers

The weighted mean of two or more numbers is

This is the formula which is used to find the weighted mean of any set of numbers, each with a corresponding weight.

Example 12 A weighted mean of wine prices

Suppose we have the following three batches of wine prices (in pence per bottle).

We want to calculate the weighted mean of these three batch means using, as corresponding weights, the three batch sizes. Rather than applying the formula directly, the calculations can be set out in columns.

Table 4 Data on wine purchases

Batch Number (batch mean) Weight (batch size) Number times weight ( = product)

Batch 1

525.5

6

3 153.0

Batch 2

468.0

2

936.0

Batch 3

504.2

12

6 050.4

Sum

20

10 139.4

The weighted mean is

We round this to the same accuracy as the original means, to get a weighted mean of 507.0. (Note that this lies between 468.0 and 525.5. This is a useful check, as a weighted mean always lies within the range of the original means.)

The physical analogy in Example 12 can be extended to any set of numbers and weights. Suppose that you calculate the weighted mean for:

This is given by

This is pictured in Figure 11, with the point of balance for these three weights shown at 1.6.

Figure 11 Point of balance for three means

You will meet many examples of weighted means of larger sets of numbers in Subsection 5.2, but we shall end this section with one more example.

Example 13 Weighted means of many gas prices

Example 11 showed the calculation of a weighted mean of gas prices using, for simplicity, just the two cities London and Edinburgh. We can extend Example 11 to calculate a weighted mean of all 14 gas prices from Table 3, using as weights the populations of the 14 cities. The calculations are set out in Table 5.

Table 5 Product of gas price and weight by city

City Price (p/kWh): x Weight: w Price times weight: x w

Aberdeen

3.740

19

71.060

Edinburgh

3.740

42

157.080

Leeds

3.776

150

566.400

Liverpool

3.801

82

311.682

Manchester

3.801

224

851.424

Newcastle-upon-Tyne

3.804

88

334.752

Nottingham

3.767

67

252.389

Birmingham

3.805

228

867.540

Canterbury

3.796

5

18.980

Cardiff

3.743

33

123.519

Ipswich

3.760

14

52.640

London

3.818

828

3161.304

Plymouth

3.784

24

90.816

Southampton

3.795

30

113.850

Sum

1834

6973.436

The entries in the weight column, w, are the approximate populations, in 10 000s, of the urban areas that include each city (as measured in the 2001 Census). For each city, we multiply the price, x, by the weight, w, to get the entry in the last column, x w.

The weighted mean of the gas prices using these weights is then

or, in symbols,

As sum x w = 6973.436 and sum w = 1834, the weighted mean is

So the weighted mean of these gas prices, using approximate population figures as weights, is 3.802p per kWh.

Note that this weighted mean is larger than all but three of the gas prices for individual cities. That is because the cities with the two highest populations, London and Birmingham, also have the highest gas prices, and the weighted mean gas price is pulled towards these high prices.

Although the details of the calculation above are written out in full in Table 5, in practice, using even a simple calculator, this is not necessary. It is usually possible to keep a running sum of both the weights and the products as the data are being entered. One way of doing this is to accumulate the sum of the weights into the calculator’s memory while the sum of the products is cumulated on the display. If you are using a specialist statistics calculator, the task is generally very straightforward. Simply enter each price and its corresponding weight using the method described in your calculator instructions for finding a weighted mean.

Activity 8 Weighted means on your calculator

Use your calculator to check that the sum of weights and sum of products of the data in Table 5 are, respectively, 1834 and 6973.436, and that the weighted mean is 3.802. (No solution is given to this activity.)

Activity 9 Weighted mean electricity price

Table 6 is similar to Table 5, but this time it presents the average price of electricity, in pence per kilowatt hour (kWh). These data are again for the year 2010 for typical consumers on credit tariffs in the same 14 cities we have been considering for gas prices, with the addition of Belfast. Again, the weights are the approximate populations of the relevant urban areas, in 10 000s.

Table 6 Populations and electricity prices in 15 cities

City Price (p/kWh): x Weight: w Price times weight: x w

Aberdeen

13.76

19

Belfast

15.03

58

Edinburgh

13.86

42

Leeds

12.70

150

Liverpool

13.89

82

Manchester

12.65

224

Newcastle-upon-Tyne

12.97

88

Nottingham

12.64

67

Birmingham

12.89

228

Canterbury

12.92

5

Cardiff

13.83

33

Ipswich

12.84

14

London

13.17

828

Plymouth

13.61

24

Southampton

13.41

30

Sum

Use these data to calculate the weighted mean electricity price. (Your calculator will almost certainly allow you to do this without writing out all the values in the x w column.)

Exercises on Section 2

The following exercises provide extra practice on the topics covered in Section 2.

Exercise 4 A combined batch of camera prices

Find the mean price of the batch formed by combining the following two batches, uppercase A and uppercase B, of camera prices.

Exercise 5 The mean price of fabric

Suppose you buy 8.5 metres of fabric in a sale, at £10.95 per metre, to make some bedroom curtains. The following year you decide to make a matching bedspread and so you buy 6 metres of the same material, but the price is now £12.70 per metre. Calculate the mean price of all the material, in £ per metre.