Skip to content
Tutorials Center
My learning

Topics

Lesson 15 of 86 ยท Averages, Ages and Everyday Arithmetic

Averages

Learn the average formula, how an average changes when an item is added, removed or replaced, and how to combine group averages with code.

An average (or arithmetic mean) is the single number that would be there if everything were shared out equally. If four friends have 10, 20, 30 and 40 coins, the average is 25. Had they pooled the coins and split them evenly, each would hold 25. Averages appear in almost every aptitude test, from simple "find the mean" questions to puzzles about batting averages, class marks and ages.

The whole topic rests on one formula. Almost every question is about moving between sum, count and average, and the best habit is to convert an average into a total as soon as you see it. In this lesson you will learn that formula, how to see how an average changes when one item joins, leaves or is replaced, how to combine groups, and a few shortcuts for evenly spaced numbers.

The formula

Average = Sum of items รท Number of items

Rearranged, it gives two more forms you will use constantly:

  • Sum = Average ร— Number of items
  • Number of items = Sum รท Average

Example. The average of five numbers is 24. Their sum is 5 ร— 24 = 120. If four of them are 18, 22, 26 and 30, the fifth is 120 โˆ’ (18 + 22 + 26 + 30) = 120 โˆ’ 96 = 24.

An average always lies between the smallest and largest value. If a question's answer falls outside that range, you have made a mistake.

Shortcut: the assumed mean

For numbers that are close together, pick a convenient assumed mean, work out how far each number is from it and average the differences. The true average is the assumed mean plus the average difference.

For 41, 43, 45, 47 and 49, assume 45. The differences are โˆ’4, โˆ’2, 0, +2, +4, and they sum to 0, so the average is 45. For 82, 87, 91, 84, 86, assume 85: differences โˆ’3, +2, +6, โˆ’1, +1 sum to +5, and 5 รท 5 = 1, so the average is 86. It is much easier than adding the big numbers.

Evenly spaced numbers

When numbers form an arithmetic sequence (equal steps), the average is the middle value, or the mean of the first and last.

  • Average of the first n natural numbers (1, 2, โ€ฆ, n): (n + 1) รท 2. For n = 20 it is 10.5.
  • Average of the first n odd numbers: n. For n = 8 (1, 3, โ€ฆ, 15) the average is 8, because the sum of the first n odd numbers is nยฒ.
  • Average of the first n even numbers (2, 4, โ€ฆ, 2n): n + 1.
  • Average of 12, 14, 16, 18, 20: the middle value, 16.

How the average changes

This is the heart of most questions. The key idea is to think about the change in the total.

flowchart TB
    A["Old average and count"] --> B["Old total = average x count"]
    B --> C{"What happens?"}
    C -->|"Item added"| D["New total = old total + item<br/>new count = old count + 1"]
    C -->|"Item removed"| E["New total = old total - item<br/>new count = old count - 1"]
    C -->|"Item replaced"| F["New total = old total - old item + new item<br/>count unchanged"]
    D --> G["New average = new total / new count"]
    E --> G
    F --> G

Convert to totals, change the total, then divide by the new count.

Replacing an item

The count stays the same, so the average moves by (change in the item) รท (count). The average of 8 numbers is 25. One number, 40, is replaced by 56. The total rises by 16, so the average rises by 16 รท 8 = 2 to 27.

Adding an item

The average of 10 people's ages is 30. When one more person joins, the average becomes 32. The new total is 32 ร— 11 = 352, and the old total was 30 ร— 10 = 300, so the new person is 352 โˆ’ 300 = 52 years old.

A handy shortcut: the new item equals the old average plus (count after joining ร— the rise). Here 30 + 11 ร— 2 = 52.

Removing an item

Six people have an average age of 30. A person aged 36 leaves. The old total is 180, the new total is 180 โˆ’ 36 = 144 for 5 people, and the new average is 144 รท 5 = 28.8.

Batting-average problems

A batter has an average of 40 after 9 innings. In the 10th innings the average rises by 3 to 43. How many runs were scored in the 10th? The total after 10 innings is 430, and before it was 360, so the score is 70. Shortcut: new average + (earlier innings ร— rise) = 43 + 9 ร— 3 = 70.

Combining groups

When two or more groups have different sizes and averages, you cannot just average the averages. You must weigh them by the number of items.

Example. A class has 30 students with an average mark of 60 and another has 20 students with an average of 70. The combined total is 30 ร— 60 + 20 ร— 70 = 1,800 + 1,400 = 3,200 marks for 50 students, so the average is 64. Notice that 64 is closer to 60 because that group is bigger. The simple average of 60 and 70 would be 65, which is wrong.

You will meet this idea in more depth in Weighted Averages, Median and Mode.

A calculator for averages

This first script computes an average from a list, shows the assumed-mean shortcut and combines groups.

JS Average calculator

Press Run (or Ctrl + Enter) to see the console output here.

No output.

A solver for changing averages

The second script handles the three situations in the diagram: add, remove and replace. Use it to check the worked examples, and to practice by predicting the output before you run it.

JS Change of average

Press Run (or Ctrl + Enter) to see the console output here.

No output.

Mistakes to avoid

  • Averaging averages. Only valid when the groups are the same size. Otherwise weigh by size.
  • Forgetting the count changes. After adding or removing an item, divide by the new count.
  • Using averages for speed. If you drive equal distances at two different speeds, the average speed is not the simple average of the speeds. The correct method is total distance divided by total time, which you will see in the speed chapter.
  • Mixing up "average of ages in years" with "total". Always write the total first.

Check your understanding

Quick check ยท 5 questions

of 5 answered You scored / 5 ยท perfect!

  1. 1. The average of five numbers is 18. Four of them are 10, 15, 20 and 25. What is the fifth?

    The total is 5 x 18 = 90. The four known numbers sum to 70, so the fifth is 90 - 70 = 20.
  2. 2. The average age of 8 players is 25. When a ninth player joins, the average becomes 26. How old is the ninth player?

    Old total 8 x 25 = 200. New total 9 x 26 = 234. The ninth player is 234 - 200 = 34.
  3. 3. The average of 7 numbers is 14. If one number, 20, is removed, what is the average of the remaining six?

    Total 7 x 14 = 98. Remove 20: 78. The new average is 78 / 6 = 13.
  4. 4. Group A has 15 members with an average weight of 60 kg. Group B has 25 members with an average weight of 68 kg. What is the average weight of all 40?

    Total = 15 x 60 + 25 x 68 = 900 + 1,700 = 2,600. Divide by 40 to get 65 kg.
  5. 5. What is the average of the first 25 natural numbers?

    The average is (n + 1) / 2 = 26 / 2 = 13.

Summary

  • Average = sum รท count, so sum = average ร— count. Convert averages to totals first.
  • For evenly spaced numbers, the average is the middle value or the mean of the first and last.
  • When an item is added, removed or replaced, change the total and divide by the new count.
  • A new member's value equals the old average plus (new count ร— rise in average).
  • Never average averages of groups with different sizes; weigh by size.

Next: Weighted Averages, Median and Mode, where you will learn to weigh groups properly and meet two other kinds of "typical value".