Weighted Averages: Averaging Averages or Rates

In our series on averages, last week we introduced the idea of the weighted average (or weighted mean), where each item has a weight attached. The classic examples all involve grade averages in various ways. This time, we’ll look at how weighted averages arise when you need to average several averages together, something we touched on last time, but which arises often in very different settings. One thing we’ll see repeatedly is that the appropriate average depends on your needs.

Can you average averages, or  not?

We’ll start with a 1997 question from a professional who had learned that, generally, you can’t average averages, but didn’t know when you can:

Algebra: Average of an Average

Hi!  This one is a real-life need.  I work for a consulting firm, and am having a hard time remembering my basic Algebra!

If the "Wireless" line of business hires 50 people in one month, and the "Multimedia" line of business hires 80 people in one month, what is the average number of people per month we are hiring?

At first, one thinks (50 + 80)/2 = 65 is the correct answer, but it's not because we're taking the average of an average, right?

Don't you have to let x = something and then do 1/50 + 1/80 and solve... or something?

Doctor Tom answered:

Hi Ron,

65 is the correct answer if the question is: "What is the average number of people hired per line of work per month?"

Here, we are just averaging the two averages “per line”, so as long as we state clearly what it means, it is valid. The question is, is this average what you want to know, or is it something else entirely?

Assuming that the entire company is made up of only those two lines of business, and you're asking "What is the average number of people hired by the whole company per month?", the answer is obviously 50+80 = 130.

This seems to be what Ron wants, and it isn’t really an average at all, just a total!

So what about the idea that you can’t average averages? That’s really a different story:

The operations above are perfectly reasonable. Let me show you the kind of situation that I think you were worried about, and you'll see why it's different from the situations above:

I take 4 exams and have an average score of 80. Then I take 2 more exams and on those 2, my average is 100. What's my overall average for the course?  

The wrong way to do it is (80+100)/2 = 90. This is wrong because the averages were of different-sized groups. To get the correct answer, I know that on the first 4 exams I got 320 total points because when I divide 320 by 4, I get 80.

Similarly, for the last two exams, I must have gotten 200 points total. So for the six exams, I got 200+320 = 520 points and 520/6 = 86.66666 = my real grade average.

We saw this scenario last week: If we just average the two averages, the result can only be described as the average of the averages, not the average for the course. The latter has to be weighted, because for the course, each exam counts the same, not each of these two sets of exams.

As we saw last week, a weighted average can often be understood by breaking it down:

For your problem, the averages you are averaging are for the same period, so it works out. To convince you that it's true, let's just look at a situation where the averages came from 10 months of data.

Then in the first line of business, 500 people must have been hired, since 500/10 = 50. Similarly, 800 were hired in the other, since 800/10 = 80. Altogether, 1300 people were hired in the ten months, or 1300/10 = 130 per month, company-wide.  Or if you're trying to get the average per line of work, 65 is right, since if each group had hired 65 people each month for 10 months, there would be 65*20 = 1300 total hires, so it works out.

Bottom line: always think about what you want, and what an average means, rather than use an average (or not!) unthinkingly.

Using a weighted average

The next question is from 1998; Stacey evidently had read the answer we just looked at:

Averaging Averages

I was reading your response on averaging averages. This has come up in a meeting I go to regarding a report that I am responsible for every month. After reading your response, I want to make sure that I am doing this right.  

I have 5 different departments that send me an average rating to 3 different questions from a feedback form (rated 1-5). For example, this is what they send me:

Question 1 - average 4 (this is the average of question 1 from all feedback forms this department received during a certain time period)

Question 2 - average 3 (same comment as above)
Question 3 - average 5 (same comment as above)

Total average- 4

After getting this information from all 5 different departments, I combine them in a total company report by taking everyone's average to question 1 and then average that to get an average for the whole program. (For this program the company average to question 1 is...) and so on for questions 2 and 3 and the total average.

If I am reading your response correctly to the question on averaging averages, this is okay to do if all information is contained within the same time period (which it is).

Please advise.

Doctor Douglas answered, starting with a basic assumption:

Hi Stacy,

It sounds as though you are trying to average a set of averages. As long as the data reflect the same measurement (or question) for each of the individual groups, then it is okay to proceed. That is, if question 1 is the same among all departments ("Please rate the chef at the last company BBQ on a scale of one to ten.") then it is a meaningful question to ask: what did the employees think of our last BBQ chef?

Of course, it would be meaningless to average question 1 if each department had a different question, or if the responses were on different scales. But how shall we calculate the average?

Now, when you take averages of averages, there is often a preferred way to do this operation. It is called "weighted averages" and reflects the fact that the number of observations may vary among the different groups. For example, let's say that the Marketing Department has 50 employees, and the Research Department has only 6. If the Marketing Department average was 8.5 ("BBQ was great!") and Research Department average was 3.1 ("heartburn!"), what is the correct average for these 2 departments? We might simply take the average of 8.5 and 3.1, i.e. 5.8.  But it seems unfair to let the Research Dept sway the whole vote, having only 6 employees. The weighted average accounts for the differing number of employees:

  weighted avg. = (no. of M)(AVG-of-M) + (no. of R)(AVG-of-R)
                        (total no. of M and R together)

                = (50)*(8.5) + (6)*(3.1)
                         (50 + 6)

                =  7.92

This is the classic example of a weighted average, and, as we saw last week, it amounts to finding the total score for the whole company by multiplying each average by the number of people it represents, and dividing by the total number of people. Thus this average is what we would get if we just averaged all the individual scores.

Do you see how the final average is much closer now to the Marketing Department's evaluation? Another way I sometimes explain it is that simple direct averaging is like the way states are represented in the U.S. Senate (every state gets two votes), while weighted averaging is like the way states are represented in the U.S. House of Representatives (every state is represented in proportion to its population).

As we’ll be saying several more times, each of these is a valid average, but has a different meaning. The U.S. Congress intentionally has one part in which every state, even the smallest, is treated equally, and another in which the largest state has more power, and each person is treated equally.

Now, it's impossible for me to say which type of averaging is correct for your situation, but I think it's probably better to use weighted averaging when you have information about the number of observations in each of the groups.

I would agree.

Averaging percentages

A slightly different situation was involved in this 1998 question:

Averaging Percentages


I am having difficulties in explaining to several friends that you cannot take percentages by totaling them up and then averaging the total of the percentages. It does not equal the percentage of the total of the numbers.

Is there a rule or theory that can explain this better?

I answered this one:

Hi, Dominic. I'm not entirely sure what kind of problem you are referring to. Certainly there are at least some situations where you can average percentages. For example, if there are 50 questions on an exam, and three students got 20%, 30%, and 40% of them right, then the average number of questions they got right is 30%, or 15 questions.

This is like our situations above where we had equal groups, so a straight average made sense.

I suspect what you are thinking of is cases where the percentages are taken from different totals, in which case weighted averaging is needed. For example, if I survey 20% of 50 people, and 80% of 500 other people, then I have not surveyed (20+80)/2 = 50% of the total population, but:

   .20 * 50 + .80 * 500   10 + 400   410
   -------------------- = -------- = --- = 74.5%
         50 + 500           550      550

The problem is simply that the percentages in such a problem do not represent fractions of the same total, so they can't be added.

As with an average of averages, here we are reconstructing the individual numbers (10 and 400 out of 50 and 500), then finding the actual percentages of the whole. That’s what a weighted average is.

I closed by referring to some of the answers we saw last week.

Average price per square foot

For a specific real-life example, consider this 2003 question:

Average of Ratios vs. Ratio of Averages

I write and maintain software for real estate agents, and we include a calculation called, "Average dollars per square foot."  We currently calculate this as the ratio of the average price divided by the average square footage of all the homes in the list.  It seems to me that it should be calculated as the average of the price-per-square-foot ratio of each house. Can you think of any reason why the ratio of the averages would be more useful than the average of the ratios?  Is there a technical name for this ratio of averages?

I answered again, pointing out as before that different calculations can both be meaningful, though they mean different things:

Hi, Laure.

Interesting question!

What you are currently calculating actually does make sense; you are just averaging over all the square feet of houses, rather than over all houses, and that may be just the right thing to do -- or it might not.  Here's what I mean:

Suppose that N houses are sold; the sum of all their prices is P, and the sum of all their areas is A.  (That is, if the individual prices are P1, P2, ..., Pn, and the individual areas are A1, A2, ..., An, then P is the sum of P1 through Pn, and A is the sum of A1 through An.)

Then the average price of a house is P/N, and the average area of a house is A/N; and you are calculating

  --- = P/A

as the average price per square foot.  And that is exactly what it is: the total price of all those square feet, divided by the number of square feet.

In terms of the individual numbers, this is $$\frac{P_1+P_2+\dots+P_n}{A_1+A_2+\dots+A_N}$$ Imagine laying out tiles representing each square foot of each house, and dollar bills representing the price of each house. This average spreads all the money equally over all the tiles, to find an overall price per square root. That sounds perfectly reasonable.

What you envision is

  P1/A1 + P2/A2 + ... + Pn/An

which would average the price per square foot of all the houses.  This puts the focus on the individual houses, rather than the individual square feet.  How would this be different?

Again, this is $$\frac{\frac{P_1}{A_1}+\frac{P_2}{A_2}+\dots+\frac{P_N}{A_N}}{N}$$ Imagine laying out tiles representing each square foot of each house, keeping each house separate, and dollar bills representing the price of each house, spread equally among the tiles of that house. Now we take one tile and its cost from each house, and average those, spreading the money equally among the selected tiles. What have we found this time?

The way to see the difference is to take an extreme example. (Don’t check whether the sizes or prices are realistic; they aren’t meant to be!)

Well, let's take a simple case with N = 2.  Suppose we have a big, well-built house of 10,000 square feet, and that it costs $2,000,000 ($200 per square foot), and a little house of 1,000 square feet that costs $20,000 ($20 per square foot). Then the total cost of the houses P is $2,020,000, and the total area A is 11,000 square feet. The average price per square foot is

  P/A = 2,020,000/11,000 = 183.6

(closer to the more expensive price) while the average of the two price-per-square-foot numbers is

  average(Pn/An) = (200 + 20)/2 = 110

(which is considerably lower).  What pulled the first number up is the fact that the bigger house had the bigger price per square foot; since we counted each square foot equally, the numerous high-cost ones won.  The second calculation treats all 10,000 of the expensive square feet equally with the mere 1,000 square feet of the little house, so the little house pulled the average down.

Which do you think is the better calculation?

Both numbers are meaningful.  The first fully deserves the name you are giving it (though there is definitely some ambiguity in the English!); but the second may better reflect what the average homeowner (as opposed to the "average square foot of floor space") can expect.  Call it, perhaps, the "cost per square foot of the average house", where the number you are currently calculating is the "average cost of a square foot" or "cost of an average square foot".

Perhaps the builder would consider the first calculation more appropriate, since they put more effort into the bigger house, and every square foot they built matters to them; but the homeowner might care only about his own house — which neither calculation really reflects!

So, again, both numbers can reasonably be called "average cost per square foot"; which is more useful to you depends on how you want to use it.  Do you want a number that is pulled up by big fancy houses, or one that shows what the average house is worth?  Or would separate numbers for different categories of houses make more sense?  Perhaps you can gather data that shows how costs per square foot are distributed, and how each average reflects that.

Any kind of average is an attempt to reduce a lot of data to a single number, and will never give a full picture of a diverse population. Other numbers, or a graph of the distribution, are often more useful.

Laure chose to leave the calculation as it was.

Average speed

Let’s look at one more 2003 question, which is about a ratio in disguise:

Weighted Average of the Velocities

A truck on a straight road starts from rest and accelerates at 2.0 m/s2 until it reaches a speed of 20 m/s. Then the truck travels for 20 s at constant speed until the brakes are applied, stopping the truck in a uniform manner in an additional 5.0 s. 

(a) How long is the truck in motion? 
(b) What is the average velocity of the truck for the motion described?

Doctor Edwin answered:

Hi, Garin.

The trick here is to get the average velocity for each of the three phases of the trip, then do a weighted average of the three velocities.

Average velocity for phase 2 is easy, 20 m/s. During phases 1 and 3, the velocity changes linearly. That means that we can just average the starting and ending velocities to get the velocity for the entire phase.

This sort of average becomes most meaningful when you apply calculus, but for uniform acceleration, it requires only algebra. Doctor Edwin chose to leave that part for Garin to handle (or to ask for more help, which he never did), and focused just on the idea of the average. It turns out that the acceleration phase takes 10 seconds, at an average speed of 10 m/s; the cruise phase takes 20 seconds at 20 m/s; and the deceleration phase takes 5 seconds at an average speed of 10 m/s.

Once you've got those, you'll do a weighted average with respect to the time spent in each phase:

           (v_1 * t_1) + (v_2 * t_2) + (v_3 * t_3)
  v_avg =  ---------------------------------------

The calculation looks like this: $$\frac{v_1\cdot t_1 + v_2\cdot t_2 + v_3\cdot t_3}{t_1+t_2+t_3} = \frac{10\cdot 10 + 20\cdot 20 + 10\cdot 5}{10+20+5} = \frac{100 + 400 + 50}{10+20+5} = \frac{550}{35} = 15.7\text{ m/s}$$

Just for fun, I'll point out that the same set of equations has another interpretation that works just as well. Average velocity is just distance over time, right? So if we figure out how far the truck went in each phase, add them all up, and divide by the total time, you'll also get the same answer:

                d_1     +    d_2     +      d3
  v_avg =  ---------------------------------------

But the middle terms in those two equations are the same:

    d_2 = v_2 * t_2

and so are the first terms:

    d_1 = --------

     a  =  -

          v_1_end * (t_1)^2
    d_1 = -----------------

            v_1_end * t_1
    d_1 =   -------------
But since the starting velocity is zero, we can add it in wherever we want:

           (v_1_start + v_1_end)
    d_1 =  ---------------------- * t_1

which means that our first terms are the same as well, and so are our third terms.

Anyway, there you have it. Total distance traveled divided by time, or a weighted average of velocities with respect to time, it works out to the same thing.

In other words, each “average velocity · time” is a distance, so our average velocity calculation was really just total distance over total time. We’ve seen previously that when distances are the same, we can use a harmonic mean to find the average speed; this confirms that when times are known but different, we can use a weighted arithmetic mean, using times as weights.

1 thought on “Weighted Averages: Averaging Averages or Rates”

  1. Pingback: The Book Stacking Problem – The Math Doctors

Leave a Comment

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.