Sub topic 2
The Mean: Sum Divided by Count
What this chapter assumes
You should be comfortable with fractions, decimals, negative numbers, and solving a simple linear equation. You should also be able to read a list of numbers. This chapter covers the mean only. Later chapters cover the median, mode, range, and standard deviation.
Definition
The mean (also called the arithmetic average) of a list of numbers is their sum divided by how many numbers there are.
mean = (sum of the values) / (number of values)
For the data set 2, 4, 4, 4, 5, 5, 7, 9:
- The sum is 2 + 4 + 4 + 4 + 5 + 5 + 7 + 9 = 40.
- The count is 8.
- The mean is 40 / 8 = 5.
Three things to notice:
- Repeated values count each time they appear. The value 4 appears three times, so it adds 12 to the sum and 3 to the count.
- The list does not need to be sorted. Order has no effect on the mean.
- The mean does not have to be a value in the list. It does not have to be a whole number either.
import statistics
data = [2, 4, 4, 4, 5, 5, 7, 9]
print(sum(data)) # 40
print(len(data)) # 8
print(sum(data) / len(data)) # 5.0
print(statistics.mean(data)) # 5The sum is the key quantity
Most GRE mean problems become easy once you work with the sum instead of the mean. Rearranging the definition gives:
sum = mean × count
This one equation lets you move between the mean and the total. If the mean of 6 numbers is 12, the sum is 72. If you know the sum and the count, you can recover the mean. If you know the mean and the sum, you can recover the count.
The mean as a balance point
The mean is the point where the deviations (distances above and below) cancel out. In the example above, the deviations from 5 are -3, -1, -1, -1, 0, 0, 2, and 4. Their total is 0.
This is true for every data set: the deviations from the mean always sum to zero. It explains why the mean is sensitive to extreme values. A value far from the others pulls the balance point toward it.
This balance idea also helps you estimate. The mean must lie between the smallest and largest values, and it sits closer to where the values are bunched.
Worked example 1: a basic mean with negatives
Find the mean of -6, -2, 0, 3, 11.
- Sum: -6 + (-2) + 0 + 3 + 11 = 6.
- Count: 5.
- Mean: 6 / 5 = 1.2.
The result is not in the list and is not an integer. That is normal.
Worked example 2: finding a missing value
The mean of five numbers is 14. Four of the numbers are 10, 12, 15, and 20. Find the fifth.
- Total sum: 14 × 5 = 70.
- Known sum: 10 + 12 + 15 + 20 = 57.
- Missing value: 70 - 57 = 13.
Check: (57 + 13) / 5 = 14.
You can also do this as an equation. Let x be the missing number. Then (57 + x) / 5 = 14, so 57 + x = 70 and x = 13.
Worked example 3: the new value needed to reach a target mean
A student has scores of 82, 90, and 78 on three tests. What score on a fourth test gives a mean of 85?
- Target sum: 85 × 4 = 340.
- Current sum: 82 + 90 + 78 = 250.
- Needed score: 340 - 250 = 90.
A shortcut uses surplus and deficit. Compare each score to the target of 85: 82 is 3 below, 90 is 5 above, and 78 is 7 below. The net is -3 + 5 - 7 = -5, so the fourth score must be 5 above 85, which is 90.
How adding a value changes the mean
Adding a value moves the mean toward that value.
- If the new value is greater than the current mean, the mean goes up.
- If it is less than the current mean, the mean goes down.
- If it equals the current mean, the mean does not change.
For the data set above (mean 5), adding another 5 keeps the mean at 5, because the new deviation is 0. The mean stays at 5 and the standard deviation shrinks, a pattern covered in a later chapter.
import statistics
data = [2, 4, 4, 4, 5, 5, 7, 9]
with_mean_added = data + [statistics.mean(data)]
print(statistics.mean(with_mean_added)) # 5
print(statistics.pstdev(data)) # 2.0
print(statistics.pstdev(with_mean_added)) # less than 2.0You can also compute the new mean exactly. If a set of n values has mean m and you add a value v, the new mean is (n × m + v) / (n + 1).
For example, a set of 8 values has mean 5. Adding 14 gives (40 + 14) / 9 = 6.
Combining groups: weighted averages
You cannot average two group means directly unless the groups are the same size. Each group mean must be weighted by its count.
Group A has 10 values with mean 70. Group B has 30 values with mean 90.
- Sum of A: 10 × 70 = 700.
- Sum of B: 30 × 90 = 2,700.
- Combined sum: 3,400. Combined count: 40.
- Combined mean: 3,400 / 40 = 85.
The unweighted average of 70 and 90 is 80, which is wrong here. The combined mean is 85 because group B is three times as large, so it pulls the result closer to 90. The combined mean always lies between the two group means, and it is closer to the mean of the larger group.
group_a_count, group_a_mean = 10, 70
group_b_count, group_b_mean = 30, 90
total = group_a_count * group_a_mean + group_b_count * group_b_mean
combined_mean = total / (group_a_count + group_b_count)
print(combined_mean) # 85.0A weighted average has the general form (w1 × x1 + w2 × x2 + ...) / (w1 + w2 + ...), where the weights w are counts, percentages, or any other measure of importance. Later chapters in this tutorial return to weighted averages in more detail.
Effects of removing or changing a value
Removing or changing one value changes the sum, and often the count.
- Changing one value by d changes the sum by d and the mean by d / n. If one of 8 values increases by 16, the sum rises by 16 and the mean rises by 2.
- Removing a value equal to the mean leaves the mean unchanged.
- Removing a value above the mean lowers the mean. Removing one below the mean raises it.
Common errors
| Error | Why it is wrong | Fix |
|---|---|---|
| Averaging two group means without weights | Ignores group sizes | Convert to sums, add, divide by the total count |
| Forgetting repeated values | Each occurrence counts | Count every entry in the list |
| Dividing by the wrong count | Off by one, or counting distinct values only | Count entries before dividing |
| Treating "mean of 85" as "sum of 85" | Mean and sum are different | Use sum = mean × count |
| Sign mistakes with negatives | Subtracting a negative adds | Write each step out |
| Assuming the mean is a member of the set | The mean can fall between or beyond typical values | Do not assume this |
Estimation techniques
On the GRE you often only need to compare a mean with a value, or pick among answer choices. Useful shortcuts:
- Pick a convenient anchor near the data and sum the deviations from it. For 98, 101, 103, 99, anchor at 100: deviations are -2, +1, +3, -1, which total +1. The mean is 100 + 1/4 = 100.25.
- Check that your answer lies between the minimum and maximum.
- For a consecutive or evenly spaced list, the mean equals the average of the first and last terms. The mean of 10, 13, 16, 19, 22 is (10 + 22) / 2 = 16.
Summary
- The mean is the sum divided by the count.
- The sum equals mean times count. Use it to find missing values.
- Adding a value above the mean raises the mean. Adding the mean itself leaves it unchanged.
- Combine groups by weighting each group mean by its count.
- Deviations from the mean sum to zero.
Exercise
The mean of 6 numbers is 20. A seventh number is added, and the new mean is 22. What is the seventh number?
Show answer
The original sum is 6 × 20 = 120. The new sum is 7 × 22 = 154. The seventh number is 154 - 120 = 34.
Exercise
A class of 12 students has a mean score of 75. A second class of 18 students has a mean score of 80. What is the mean score of all 30 students?
Show answer
The sums are 12 × 75 = 900 and 18 × 80 = 1,440, for a total of 2,340. Divide by 30 to get 78.
Exercise
The mean of 5 numbers is 9. One number, 15, is removed. What is the mean of the remaining 4 numbers?
Show answer
The original sum is 5 × 9 = 45. After removing 15, the sum is 30. The new mean is 30 / 4 = 7.5.