Sub topic 6
Weighted averages and finding a missing value
This chapter assumes you can compute a mean as sum divided by count, solve a one-variable linear equation, and work with percents and decimals. It builds on the mean chapter. The goal is to handle two question families the GRE asks often: combining groups of different sizes, and working backward from a known mean to an unknown value.
Why the simple average of averages fails
Suppose a class of 10 students averages 70 on a test, and a second class of 30 students averages 90. The tempting answer for the combined average is (70 + 90) / 2 = 80. That answer treats both classes as equally important. The second class has three times as many students, so it should pull the combined mean three times as hard.
A weighted average is a mean in which each value counts according to a weight, such as a group size, a percent, or a number of hours. The weights say how much each value contributes to the result.
The weighted average formula
Multiply each value by its weight, add the products, and divide by the total weight:
weighted average = (w1·x1 + w2·x2 + ... + wk·xk) / (w1 + w2 + ... + wk)
For the two classes, each class mean is multiplied by its student count:
- Total points: 10 × 70 + 30 × 90 = 700 + 2700 = 3400.
- Total students: 10 + 30 = 40.
- Combined mean: 3400 / 40 = 85.
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.0The key idea is that a mean times a count recovers a sum. Every weighted-average problem is really a sum problem: convert each mean back into a total, add the totals, and divide by the combined count.
Weights given as percents
Weights do not have to be counts. A course grade might be 30% first exam, 30% second exam, and 40% final. With scores of 80, 90, and 70:
- 0.30 × 80 = 24
- 0.30 × 90 = 27
- 0.40 × 70 = 28
- Weighted average: 24 + 27 + 28 = 79.
When the weights already add to 1 (or 100%), the division step is built in, so you only add the products. If the weights add to something else, you must divide by their total.
def weighted_mean(values, weights):
total_weight = sum(weights)
return sum(v * w for v, w in zip(values, weights)) / total_weight
print(weighted_mean([80, 90, 70], [0.30, 0.30, 0.40])) # 79.0 (floating point may show 78.99999999999999 or similar)
print(weighted_mean([70, 90], [10, 30])) # 85.0The balance shortcut
You can often skip the arithmetic by reasoning about position. The weighted mean always lies between the smallest and largest values, and it sits closer to the value with the larger weight.
For the two classes, the means are 20 points apart (70 and 90). The weights are in the ratio 10 : 30, which is 1 : 3. The distances from the combined mean to each class mean are in the opposite ratio, 3 : 1. So the combined mean is 1/4 of the way from 90 down toward 70, or 5 points below 90.
- Total gap: 20
- Distance from the heavier group (90): 20 × 10/40 = 5
- Combined mean: 90 − 5 = 85
This method is fast for two groups and useful on quantitative comparison questions, where you only need to know whether the combined mean is above or below some value.
The distances 15 and 5 are in the ratio 3 : 1, the reverse of the weights 10 : 30.
Finding a missing value from a known mean
The second family of problems gives you a mean and all but one value, and asks for the missing one. The method is always the same:
- Compute the total the full list must have: mean × count.
- Add up the values you know.
- Subtract: the missing value is the required total minus the known sum.
Example: five scores have a mean of 80. Four of them are 72, 85, 90, and 78. Find the fifth.
- Required total: 80 × 5 = 400.
- Known sum: 72 + 85 + 90 + 78 = 325.
- Missing value: 400 − 325 = 75.
scores = [72, 85, 90, 78]
target_mean = 80
count = len(scores) + 1
missing = target_mean * count - sum(scores)
print(missing) # 75Targets for a new value
A common variant asks what score you need on one more test to reach a target mean. A student has six test scores averaging 82. What must the seventh score be to raise the average to 84?
- Required total for 7 tests: 84 × 7 = 588.
- Current total for 6 tests: 82 × 6 = 492.
- Needed score: 588 − 492 = 96.
The final step in the diagram matters here. If the target were 87, the needed score would be 87 × 7 − 492 = 117. On a test scored out of 100, that is impossible. Check the result against any limits stated in the problem, such as a maximum score.
Several missing values
If two values are missing, one equation is not enough on its own. You will usually get a second piece of information, such as "the two missing values are equal" or "one is twice the other". Compute the total of the missing values first, then use the relationship. For example, if the two missing values must sum to 60 and one is twice the other, then x + 2x = 60 gives x = 20 and 2x = 40.
Weighted averages in other settings
The same formula appears under different names on the GRE.
- Mixtures. 20 liters of a 30% solution mixed with 30 liters of a 50% solution contain 20 × 0.30 + 30 × 0.50 = 6 + 15 = 21 liters of the active ingredient in 50 liters total. The mixture is 21 / 50 = 42%. The volumes are the weights.
- Average price or rate. Buying 4 pounds at $3 per pound and 6 pounds at $5 per pound costs 12 + 30 = $42 for 10 pounds, so the average price is $4.20 per pound.
- Average speed. Speed is distance divided by time, so time is the weight, not distance. Driving 120 miles at 60 mph takes 2 hours. Returning 120 miles at 40 mph takes 3 hours. The total is 240 miles in 5 hours, an average of 48 mph. The simple average of 60 and 40, which is 50, is wrong.
Common errors
| Error | Why it fails | Fix |
|---|---|---|
| Averaging the group means directly | Ignores unequal group sizes | Multiply each mean by its count first |
| Forgetting to divide by the total weight | Gives a sum, not a mean | Divide by the sum of the weights |
| Using the wrong count for a missing value | The count includes the unknown value | Use the full count, known values plus the missing one |
| Averaging speeds for a round trip | Equal distances do not mean equal weights | Use total distance divided by total time |
| Ignoring limits on the answer | Algebra can produce an impossible score | Compare the result to the stated range |
Connection to the rest of the tutorial
Finding a missing value from a mean is the same total-based thinking that later explains how adding or removing a value changes the mean. A new value above the current mean raises the mean, and one below it lowers the mean. A value exactly equal to the mean leaves it unchanged, which you will see again when comparing standard deviations.
import statistics
data = [2, 4, 4, 4, 5, 5, 7, 9]
print(statistics.mean(data)) # 5
print(statistics.mean(data + [statistics.mean(data)])) # 5Adding the mean to the list keeps the total-to-count ratio the same, so the mean does not move.
Practice
Exercise
A group of 20 employees has a mean salary of $50,000. A group of 5 managers has a mean salary of $90,000. What is the mean salary of all 25 people?
Show answer
Total pay is 20 × 50,000 + 5 × 90,000 = 1,000,000 + 450,000 = 1,450,000. Divide by 25 people: 1,450,000 / 25 = $58,000. Unweighted averaging would give $70,000, which is wrong because the managers are a small group.
Exercise
The mean of six numbers is 14. Five of the numbers are 10, 12, 15, 18, and 9. What is the sixth number?
Show answer
Required total: 14 × 6 = 84. Known sum: 10 + 12 + 15 + 18 + 9 = 64. Missing value: 84 − 64 = 20.
Exercise
A student has an average of 78 on 4 quizzes. The final quiz counts the same as each earlier quiz and is scored out of 100. Can the student reach an overall average of 85 across 5 quizzes? If so, what score is needed?
Show answer
Required total: 85 × 5 = 425. Current total: 78 × 4 = 312. Needed score: 425 − 312 = 113. That is above 100, so reaching an average of 85 is impossible.
Exercise
A cyclist rides 30 miles uphill at 10 mph and then 30 miles back downhill at 30 mph. What is the average speed for the whole trip?
Show answer
The uphill leg takes 3 hours and the downhill leg takes 1 hour. The total is 60 miles in 4 hours, so the average speed is 15 mph, not 20 mph.