Prices

by The Open University

Available in 30 free installments

Owner:

View book

Email address:

Enter your email address above to start receiving your free daily installments.

Dripread will never disclose your email address to third parties.

1.3.6: Weighted mean

The concise formula that you have just used is useful in itself for calculating a mean when you are given data in frequency form. But, even more useful, it can be extended, leading to the idea of a weighted mean, that has many applications, as you will see.

Example 5: Assignment scores

You are probably aware that many Open University courses give unequal weights to different assignments. On one (fictional) course, there were four tutor marked assigments, and a particular student scored 80, 60, 40 and 70 for these assignments. The fourth assignment was double weighted (in relation to the others). What is the student's mean assignment score, taking this weighting into account?

The weighting effectively means that the score for the fourth assignment counts double. In other words, it is as if the student did two assignments (TMAs) instead of the fourth one, scoring 70 for both these two assignments. Looking at it that way, the sum of the student's assignment scores is 80 + 60 + 40 + 70 + 70 = 320, and there are (effectively) five assignments, so the student's mean TMA score is 320/5 = 64.

Alternatively, the same calculation can be done in a table.

Table 11 Calculating a mean assignment score when there are weights

TMA number score weight score × weight
01 80 1 80 × 1 = 80
02 60 1 60 × 1 = 60
03 40 1 40 × 1 = 40
04 70 2 70 × 2 = 140
Total 5 320

Instead of just adding up the original assignment scores for calculating the mean, each score is first multiplied by its weight and then the products of the score and the weight are added up. This gives TMA04 its correct double weight compared to the others. But again, to allow for the weights, the total of the (score × weight) values has to be divided by 5, the total of the weights, and not by 4, the number of assignments. So the student's mean assignment score is 320/5 = 64.

What has been calculated here is a weighted mean. That is, if the student's score for each TMA is denoted by x, and weight for each TMA by w, the student's weighted mean TMA score could have been calculated using the following formula:

Notice how this looks similar to the formula for the mean using frequencies (but with different letters).

When the Open University uses unequal weights for assignments, these are usually given as numbers out of 100 rather than as simple 1s and 2s as in Example 5. (This has nothing directly to do with the fact that the individual TMA scores are also out of 100.) So, in Example 5, the OU would give the weights as 20, 20, 20 and 40 rather than 1,1,1 and 2. These new weights have the same relative characteristics as the original 1s and 2s: the first three assignments have equal weights and the last one has double the weight of the other two. Also, though the details of the calculation of the student's weighted mean score look different, the result is the same, as the following table shows.

Table 12 Calculating a weighted mean assignment score when the weights sum to 100

TMA number score (x) weight (w) score × weight (xw)
01 80 20 80 × 20 = 1600
02 60 20 60 × 20 = 1200
03 40 20 40 × 20 = 800
04 70 40 70 × 40 = 2800
Total 100 6400

The student's weighted mean score is , as before. This demonstrates that it is the relative size of the weights that determines the value of the weighted mean.

Using weights that add up to 100 allows course teams to do more complicated things than simply have certain assignments with double weight, if that is appropriate. A course with four assignments could have weights 20, 30, 30 and 20 for example. (This would mean that assignments 02 and 03 had weights that were half as much again as those for assignments 01 and 04.)

Activity 13: Assignment scores

There is nothing special about a total of 100 for the weights; another total could be used instead. On one course at a mythical university, the weights for the assignments were respectively 10, 20, 20 and 30. A student scored 80, 60, 40 and 80 for these assignments. What was the student's weighted mean score?

Discussion

If the assignment scores are labelled x and the weights w, the weighted mean is

By now you may be wondering what all this has to do with prices! At the end of Section 2, the need arose for a way of giving different weights to the different items in a batch, in order to emphasise them differently. The next example shows one possible way of doing this.

Example 6: The shopping basket

Recall the shopping basket of five food items from Subsection 2.3. It was suggested that a sensible way of finding an ‘average? proportional or percentage increase in the price of the shopping basket might be to weight the individual increases according to how much is spent on the items. For instance, you might choose the average amount spent on each item per week during 1990 as its weight. What does this mean exactly, and why does it make sense? Here are the data (in terms of proportions).

Table 13 Proportional price increases and average bill for a small basket of goods

Item Proportional increase (July 1990-July 2004) Average 1990 weekly bill in pence (weight)
Large loaf (white) 0.30 288
Milk 0.17 443
Eggs 0.40 52
Potatoes 2.31 94
Sugar 0.17 23

These expenditures are estimates from a particular household of their average weekly expenditure on these five items. Note that the chosen year, 1990, is clearly stated in the table.

One plausible way of calculating an appropriate measure of the price increase of the basket is as follows. Imagine a family that actually bought this basket of items in 1990, so that the (average) amount they spent weekly on each item, in 1990, is the figure given in the last column of this table. Suppose they just keep buying exactly the same amount of all of the items, every week right through from 1990 to 2004. How would the price of the shopping basket change for this imaginary family? (A real family would be very unlikely to behave like this!)

Over the period 1990?2004, the price of a large white loaf went up by 0.30, proportionally. Our imaginary family spent 288p a week on large loaves in 1990, and we are assuming they buy the same number of loaves per week in 2004, so by July 2004, their weekly expenditure on large white loaves has gone up by 0.30 of 288p. That is, it has gone up by

That is, if the proportional price increase is p and the 1990 weekly bill in pence is w, the price increase in pence is pw.

Similar calculations can be done for the other items. They are all shown in Table 14.

Table 14 Calculating the weighted mean price increase for a small basket of goods

Item Proportional increase (July 1990?July 2004) (P) Average 1990 weekly bill in pence (weight, w) Increase in price, in pence (July 1990?July 2004) (pw)
Large loaf (white) 0.30 288 0.30 × 288 = 86.4
Milk 0.17 443 0.17 × 443 = 75.31
Eggs 0.40 52 0.40 × 52 = 20.8
Potatoes 2.31 94 2.31 × 94 = 217.14
Sugar 0.17 23 0.17 × 23= 3.91
Total 900 403.56

Thus, for this imaginary family and this basket of goods, the total increase in price between 1990 and 2004 was 403.56 pence per week, and the basket originally cost 900p per week in 1990. So the overall proportional increase in price of the basket between 1990 and 2004, was

which is an increase of 0.45 (rounded to two decimal places). And, since we got this figure by thinking of an imaginary family who bought exactly the same basket of food items, with exactly the same quantity of each, throughout the period, it seems a reasonable way to measure the ‘average? proportional increase in the price of the items in the basket.

By now, you might have recognised that this is the sort of calculation you have seen several times before in this section. Denoting proportional increase for each item by p, and the average 1990 weekly bill for each item by w, we have actually calculated the overall average proportional increase using the formula

which, again, looks similar to the formula for the mean using frequencies (but with different letters). So we have calculated another weighted mean.

To check that this really does work, the formula gives the average proportional price increase just as before, as follows:

which is an increase of 0.45 (to two decimal places).

Note that the total of the weights, 900, is actually the 900p (or £9.00) spent weekly, on average, by this household on these five food items in 1990. In general, though, the total of the weights may not have a simple interpretation like this.

That example showed that a sensible average increase for the prices of several different items in a basket could be found using a weighted mean. The (1990) average amounts spent on each item were used as weights in this calculation.

This process can be used more generally, no matter what the batch of data or what weights are used.

In general, to find the weighted mean of a batch of numbers x with weights w use the following formula:

That is, the weighted mean of the various x values is worked out by summing the xw products, Σxw, and then dividing by the sum of the weights, Σw.

With this terminology, Example 6 showed that an appropriate measure of the average proportional price increase of a basket of goods can be found by calculating a weighted mean of the proportional increases of the individual items, using the amount spent on each item (at the start of the period involved) as the weights.

It is rather more common to use percentage price increases instead of proportional price increases. Can a weighted mean be used to find an average percentage price increase for a basket of goods? The answer is yes! For the basket in Table 13, the percentage price increases for the five items are just 100 times the proportional price increases, so they are 30%, 17%, 40%, 231% and 17%. Denote these percentage increases by x. Using the same weights w as in Table 13, the weighted mean of the percentage price increases is

This corresponds exactly to the average proportional price increase calculated before (i.e. 44.84% = 0.4484 × 100%).

What is the difference between a mean and a weighted mean?

This is a question that is commonly asked. The answer is, as usual, that it depends on the situation. Sometimes there is no difference at all, and at other times, the two formulas produce quite different values.

Finding the mean involves adding up all the values (x) in the batch and dividing by the number of values (n) and can be written concisely as

This is the most familiar ‘average?.

Grouping values that occur more than once gives rise to a different formula:

where f denotes the frequencies (the number of time each value occurs). But it will always give the same numerical value as when the mean is calculated by adding all the individual values. This is because the sum of the frequencies (Σf) is always the total number of values in the batch n.

Calculating the (ordinary) mean using frequencies provides the simplest example of a weighted mean. When the weights are frequencies you can be sure that the mean and the weighted mean give the same value. Otherwise they will usually differ. Frequencies have two important properties: they are always whole numbers and the sum of the frequencies is always the same as the total number of values in the batch.

However, weights need not be frequencies. In Example 6 they were the amounts of money spent in a week on different items. In this situation, there may be a big difference between the mean and the weighted mean. Working out the (ordinary) mean proportional price increase for that example would mean adding 0.30 and 0.17 and 0.40 and 2.31 and 0.17 and then dividing by five to give 0.67. This is quite different from calculating the weighted mean proportional price increase of just under 0.45.

In general, if the values are denoted by x and the weights by w, the weighted mean is

Now work through Section 2.2 of Chapter 2 of the Calculator Book.

Activity 14: What is a calculator good for?

Now that you have spent a session working with your calculator, use your Learning File to record your thoughts about the calculator so far. Here are some questions you might like to consider.

Since every person's answer will be different, no comments are given on this activity.

Activity 15 Weighted means

The idea of a weighted mean is rather important. One of the best ways of ensuring that you understand is to try to write down for yourself what it involves, using your own words. Here is a suggestion on how to do this.

Take a few minutes to think what needs to be explained: for example, you should say what a weighted mean is; how you calculate one (perhaps with an example); what a weighted mean is for; and how it differs from other similar measures such as an ordinary mean (without frequencies). You may find it helpful if you include very brief notes of your reactions to the idea—for example: ‘I found this bit difficult because …?, or ‘at first I thought it meant …, but now I realise it means …?.

Consult the text as and when you need to. Then, when you have got it straight, turn away from the screen and write your explanation. When you are satisfied with the result, check that you have not missed anything out by referring back to the text. The words of the Unit will be different from yours—your words are best for your entry—but just check that the facts are the same and are complete. Make any changes you think are necessary.

If you carry out this process whenever you meet an important idea in the Unit, you will build up your own personal glossary of mathematical concepts, which should prove extremely useful.

Since every person's answer will be different, no comments are given on this activity.

The different definitions of the ‘averages? discussed in this section are summarised in the box below. Check these with your glossary entries.

Summary of various averages

Mean : add the x values in the batch together and divide by the batch size n.
: for data given with frequencies f, add all the products x × f and divide the result by the sum of the frequencies.
Weighted mean : add all the products x × w and divide the result by the sum of the weights.
Median Sort the values in the batch into ascending order (if necessary). If the batch size is odd, then the median is the middle value. If the batch size is even, then the median is the mean of the two middle values.

Now that you are familiar with the idea of a weighted mean, and of using your calculator to find one, return to the problem of calculating the average price increase of a basket of goods. The discussion in Example 6 explained that a sensible set of ‘weights? to choose in order to calculate a meaningful average price increase was to weight each item by the amount of money spent on it over a typical week. In Example 6, the weights used were the average weekly amounts of money spent in 1990, the start of the period in question. There is a choice here. A typical week could be one in 1990 or one in 2004, at the end of the period. Neither is wrong; either could be used. 1990 was chosen in Example 6, but there are other possible choices (such as some sort of average over the whole period). All the relevant information is given in Table 15, but with percentage increases instead of proportional increases (as discussed on page 32).

Table 15 Percentage price increases from 1990 and expenditure

Item % increase (1990?2004) Weights (Average 1990 weekly bill, in pence)
Large loaf (white) 30 288
Milk 17 443
Eggs 40 52
Potatoes 231 94
Sugar 17 23
Total 900p

Now, calculating the weighted mean of the percentage price increases involves weighting each percentage figure by the corresponding amount spent on it each week. Thus, the 17% figure for milk is given the greatest weight because most money was spent on milk (£4.43), whereas the 40% figure for eggs is given the second smallest weight because the second least money was spent on eggs (52p).

Activity 16: Calculator time

In Example 6, the weighted average was calculated from the data on proportional price increases in Table 13. Now use the statistical facilities of your calculator, as described in Section 2.2 of Chapter 2 of the Calculator Book, to do the calculation using percentages. Calculate the weighted mean of the percentage price increase from 1990 to 2004, based on the five items in Table 15.

You already know from Example 6 what the answer should be, and indeed the calculation using percentages was shown earlier. The point of doing it again here is mainly to give you an opportunity to use your calculator in this way. But you should still check that your answer makes sense. For example, it should lie somewhere between the smallest percentage value (17%) and the largest percentage value (231%). If it lies outside this range, then you have made a mistake.

Discussion

If the percentage price increases are in list L1 and the weights in list L2, then the weighted mean of the percentage price increases is found using ‘1-Var Stats L1, L2?.

The weighted mean percentage increase is 44.84% or 45% (to the nearest percent), corresponding to what was found in Example 6.

In case you are feeling that it would have been easier to do this particular calculation directly on the calculator, there are two good reasons for working through the calculator's statistical facilities in this case. First, it is often easier to understand the principles of how such facilities operate when using a simple example like this. You will need these skills in the next section when you will be doing similar calculations, but with more complex data.

Second, even with a batch of data as tiny as this one, once the figures have been entered into the statistical memory of the calculator, a wide range of calculations and graphs is readily available. This keeps your options open if you simply want to explore different ways of summarising and re-presenting the information.

A point worth stressing about the weights used to calculate a weighted mean is that it is not the actual size of the weights, but their relative size that determines the value of the resulting mean. For example, suppose the weights were calculated over a ten-week period and expenditure patterns remained the same. Table 16 shows what the data would look like.

Table 16 The effect of scaling up the weights by a factor of ten

Item % increase (1990?2004) Weights
Large loaf (white) 30 2880
Milk 17 4430
Eggs 40 520
Potatoes 231 940
Sugar 17 230
Total of the weights 9000

Note that for each item the bill has simply been multiplied by ten. However, the relative weight of each item has not altered—the bread weight is still roughly five times the eggs weight, and so on. Thus, the value of the weighted mean will not alter. Put another way, if you had needed to feed ten times as many people with the same kind of food, you would not expect the calculation of the weighted mean of the percentage price rise of the food to come out differently. Each item has the same relative importance, regardless of the overall expenditure.

Activity 17: A weighted mean calculated over ten weeks

Calculate the weighted mean of the percentage price rise using the ten-week period expenditures as weights. Confirm that you get the same numerical answer as before when the weights were much smaller numbers. When you have done this, think about how doing this activity has contributed to your learning about weighted means.

Discussion

In this case, Σxw = 403560 and Σw = 9000, so the weighted mean is

This is the same value as that obtained in Activity 16.

One student commented: ‘I didn't believe it could be the same, so I was surprised when it was. I wondered whether there was something special about the ten, so I did the same activity again using five. It still came out the same. As I did the calculation again, I began to get a better feel for what was involved.?

This confirms that it is only the relative size of the weights that determines their effect, not their absolute value.

Outcomes

After studying this section, you should be able to:

Also, after working through Sections 2.1 and 2.2 of the Calculator Book, you should be able to:

Except for third party materials and otherwise stated (see terms and conditions), this content is made available under a Creative Commons Attribution-NonCommercial-ShareAlike 2.0 Licence