Mean from a frequency table and weighted mean
A table says how many times each value happened instead of listing every value. How do you find the mean without writing the whole list out, and what if some values should count for more than others?
Where you are 3 in Mean
When you reach for it
Duncan keeps a small flock of hens and notes how many eggs he collects each day. After twenty days his notebook could hold twenty numbers, but most of them repeat, so he keeps a frequency table instead: each number of eggs, beside the number of days it happened. A dot plot holds the same information as stacks of dots.
The mean is the total of the values divided by how many values there are. A table or a dot plot writes down neither number, but both can be read straight off it.
Sometimes values are meant to count for different amounts. A spelling bee may make its final round worth half of the overall score, and a farm stand may sell many boxes of eggs at one price and few at another. The mean that respects those differences is the weighted mean, and it is the same calculation with the counts renamed weights.
The procedure
Each column stands for a value repeated. In Duncan’s table, the column “8 eggs on 6 days” stands for the list 8, 8, 8, 8, 8, 8. Adding those six values means adding 8 six times, which is 8 \times 6 = 48, because multiplication is repeated addition. So each column puts value \times frequency into the total, and the total of all the values is the sum of those products.
The count is the total frequency. Every day is one value, so the number of values is the sum of the frequency row. It is not the number of columns: Duncan’s table has five columns only because five different egg counts happened, but it holds twenty values. Then the definition of the mean, unchanged, reads
Figure 1 shows why a dot plot works the same way. Each stack is one column: its position is the value and its height is the frequency. Count the dots for the total frequency.
Weights. Divide each frequency by the total frequency and you get the share of the data that has each value, a fraction of the whole; the shares always add to 1. Dividing the total of the values by the total frequency gives the same answer as dividing each product by it first and then adding, because dividing a sum by a number divides each part of the sum by that number. So the mean is also the sum of value \times share.
A weighted mean uses this form for any set of shares. Each value carries a weight, a number saying how much it counts. Multiply each value by its weight, add the products, and divide by the total weight:
The weights can be counts (days, boxes, litters), and then the weighted mean is exactly the mean from a frequency table. They can be fractions that add to 1, or percents that add to 100\%; then the total weight is the whole, dividing by 1 changes nothing, and the weighted mean is simply the sum of the products. Write a percent as a decimal first: 30\% = 0.3. When every weight is the same, the weighted mean is the ordinary mean.
The balance picture still holds. A weight acts like a stack of coins at its value, and the weighted mean is where the stacks balance. A heavier weight pulls the mean toward its value, and the mean always lands between the smallest and the largest value.
Worked examples
Eggs from a frequency table
Duncan’s table records the eggs his hens laid each day for 20 days. Find the mean number of eggs a day.
| Eggs in a day | 6 | 7 | 8 | 9 | 10 |
|---|---|---|---|---|---|
| Days | 2 | 5 | 6 | 4 | 3 |
Multiply each value by its frequency, since the column for 6 eggs on 2 days stands for 6 + 6, and so on:
| Eggs in a day | 6 | 7 | 8 | 9 | 10 |
|---|---|---|---|---|---|
| Days | 2 | 5 | 6 | 4 | 3 |
| Eggs \times days | 12 | 35 | 48 | 36 | 30 |
The total of all the eggs is 12 + 35 + 48 + 36 + 30 = 161. The number of days is 2 + 5 + 6 + 4 + 3 = 20, which matches the twenty days recorded. The mean is
Check with shares. The five columns hold \displaystyle \frac{2}{20} = 0.1, 0.25, 0.3, 0.2 and 0.15 of the days, which add to 1, and the sum of value \times share is the same mean:
Kittens from a dot plot
Edith helps at an animal shelter and records the number of kittens in each litter that arrives. Figure 2 shows her dot plot for 16 litters. Find the mean number of kittens in a litter.
Read each stack as a column of a frequency table: 1 litter of 2, 4 litters of 3, 5 of 4, 3 of 5, 2 of 6 and 1 of 7. The frequencies add to 1 + 4 + 5 + 3 + 2 + 1 = 16, the number of dots. The products are 2, 12, 20, 15, 12 and 7, so the total number of kittens is 68, and the mean is
The tallest stack is at 4, but the mean sits a little above it. Measured from 4.25, with each distance counted as often as its value occurs, the low side totals 2.25 + 5 + 1.25 = 8.5 and the high side 2.25 + 3.5 + 2.75 = 8.5. The plot balances there, as Figure 2 shows: the litters of 6 and 7 sit far out and pull the balance point right of the tallest stack.
A score of zero and an empty column
In the first round of a spelling bee, each of 20 spellers was given five words and scored a point for every word spelled correctly. Find the mean score.
| Points | 0 | 1 | 2 | 3 | 4 | 5 |
|---|---|---|---|---|---|---|
| Spellers | 1 | 0 | 3 | 6 | 7 | 3 |
Two columns need care. The speller who scored 0 is a value like any other: the product 0 \times 1 = 0 adds nothing to the total, but that speller is still one of the 20 values in the count. The column for 1 point has frequency 0: no speller is there, so it adds 1 \times 0 = 0 to the total and nothing to the count.
The products are 0, 0, 6, 18, 28 and 15, which total 67 points. The count is 1 + 0 + 3 + 6 + 7 + 3 = 20. The mean score is
A score made of weighted rounds
Efe’s spelling bee works out an overall score from three rounds. The written round counts 20\%, the spoken round 30\% and the final round 50\%. Efe scored 80, 70 and 92 points out of 100. Find Efe’s overall score and compare it with the plain mean of the three scores.
SolutionThe weights 20\%, 30\% and 50\% add to 100\%, so the overall score is the sum of each score times its weight, with the percents written as decimals:
This really is a mean from a frequency table. Picture the overall score cut into 100 equal slices: 20 slices hold 80, 30 hold 70 and 50 hold 92. The total is 1{,}600 + 2{,}100 + 4{,}600 = 8{,}300 over 100 slices, and \displaystyle \frac{8{,}300}{100} = 83.
The plain mean treats the three rounds as equal: \displaystyle \frac{80 + 70 + 92}{3}, which is \displaystyle \frac{242}{3} = 80\tfrac{2}{3}. The weighted score is higher because the 92 carries the largest weight and pulls the mean toward itself.
The mean price of a box
Edgar sells his hens’ eggs at a farm stand in boxes of six. On Saturday he sold 10 boxes of small eggs at 3 dollars each, 15 boxes of medium eggs at 4 dollars and 5 boxes of large eggs at 6 dollars. What was the mean price of a box sold?
SolutionEach box sold is one value, so the weights are the numbers of boxes. The money taken is 10 \times 3 + 15 \times 4 + 5 \times 6, which is 30 + 60 + 30 = 120 dollars, for 10 + 15 + 5 = 30 boxes. The mean price is
The mean of the three prices, \displaystyle \frac{3 + 4 + 6}{3} = 4\tfrac{1}{3} dollars, answers another question: the average of the price labels, each counted once. The 10 small boxes sit 1 dollar below 4 and the 5 large boxes sit 2 dollars above it, so the sides balance at the medium price: 10 \times 1 = 5 \times 2.
Working back to a missing score
At another spelling bee, rounds one and two each count \displaystyle \frac{1}{4} of the overall score and the final round counts \displaystyle \frac{1}{2}. Dusan scored 60 and 76 in the first two rounds. What must he score in the final round for an overall score of 75?
SolutionThe weights \displaystyle \frac{1}{4} + \frac{1}{4} + \frac{1}{2} add to 1, so the overall score is the sum of the products. The first two rounds give \displaystyle \frac{1}{4} \times 60 = 15 and \displaystyle \frac{1}{4} \times 76 = 19, which is 34 so far. The final round must bring the rest, 75 - 34 = 41.
The final round adds half of its score, so half of Dusan’s final score is 41, and the score itself is 2 \times 41 = 82. Check: half of 82 is 41, and 15 + 19 + 41 = 75.
Combining two groups
Edith’s shelter took in 16 litters with a mean of 4.25 kittens (Example 2). A second shelter took in 4 litters with a mean of 5.5 kittens. What is the mean litter size across both shelters?
SolutionA mean times its count gives back the total. Edith’s litters hold 16 \times 4.25 = 68 kittens and the second shelter’s hold 4 \times 5.5 = 22. Together that is 90 kittens in 20 litters, so the combined mean is
The mean of the two means, \displaystyle \frac{4.25 + 5.5}{2} = 4.875, is too high: it counts the second shelter’s 4 litters as if there were as many of them as of Edith’s 16. The right answer is a weighted mean of the two means, each weighted by its number of litters:
Boundaries
- The values must be numbers. A frequency table of favorite fruits has a most common category, its mode, but no mean.
- Each column must be a single value. A table of ranges, such as 0 to 10 and 10 to 20, or a histogram, hides the exact values, and using the middle of each range gives only an estimate of the mean.
- Weights cannot be negative, and they cannot all be 0. Percents that do not add to 100\% are not shares of a whole; divide by their total, as with counts.
- The mean of several group means is the mean of all the data only when every group has the same size. Otherwise weight each group’s mean by its size.
Where this goes next
The same table gives the median too, by running totals rather than products, and its tallest column is the mode. Spread can be read from a table in the same spirit: in the mean absolute deviation, each value’s distance from the mean is counted as many times as the value occurs. Later, in probability, the weights become chances, and the weighted mean of the possible outcomes is called the expected value.
Exercises
Means from a frequency table
- Dusan counted the eggs his hens laid each day for ten days. Find the mean number of eggs a day.
| Eggs in a day | 4 | 5 | 6 | 7 |
|---|---|---|---|---|
| Days | 1 | 3 | 4 | 2 |
- In a spelling bee round of five words, 20 spellers scored a point for each correct word. Find the mean score.
| Points | 1 | 2 | 3 | 4 | 5 |
|---|---|---|---|---|---|
| Spellers | 2 | 4 | 5 | 6 | 3 |
- The table counts the kittens in each of 20 litters. Find the mean litter size.
| Kittens | 1 | 2 | 3 | 4 | 5 |
|---|---|---|---|---|---|
| Litters | 1 | 3 | 6 | 7 | 3 |
- On one day, 9 of Edgar’s 12 hens laid one egg each and the other 3 laid none. Make a frequency table and find the mean number of eggs a hen laid that day.
- Find the mean number of eggs a day, over all the days counted.
| Eggs in a day | 3 | 4 | 5 | 6 |
|---|---|---|---|---|
| Days | 2 | 0 | 6 | 8 |
Means from a dot plot
- Figure 3 shows the eggs Efe collected each day for 12 days. Find the mean number of eggs a day.
- A dot plot of 10 litters has 1 dot at 2 kittens, 4 dots at 3, 4 dots at 4 and 1 dot at 6. Find the mean litter size.
Weighted means
- Edith’s course mark counts homework 20\%, quizzes 30\% and a project 50\%. She scored 90, 70 and 80 out of 100. Find her overall mark.
- In a spelling bee the three rounds count \displaystyle \frac{1}{5}, \displaystyle \frac{2}{5} and \displaystyle \frac{2}{5} of the overall score. A speller scored 70, 85 and 90. Find the overall score.
- Edgar bought 4 bags of chicken feed at 12 dollars a bag and 6 bags at 17 dollars a bag. Find the mean price of a bag, and compare it with the mean of the two prices.
- A spelling judge scores a speller 6 for accuracy, 9 for pronunciation and 8 for pace, out of 10. Accuracy counts three times as much as each of the other two. Find the weighted score.
- Duncan’s course mark counts homework 25\% and tests 75\%. He scored 88 on homework and 80 on tests. Find his overall mark.
Combining groups and missing values
- One shelter took in 10 litters with a mean of 4 kittens, and another took in 15 litters with a mean of 5 kittens. Find the mean litter size across both shelters.
- A spelling bee counts its first round 30\% and its second round 70\%. A speller scored 60 in the first round. What second-round score gives an overall score of 74?
- Dusan’s hens laid 7 eggs on each of 6 days and 10 eggs on some other days. Over all those days the mean was 8 eggs a day. On how many days were 10 eggs laid?
- Over one week Duncan’s hens laid a mean of 6 eggs a day, and over the next week a mean of 8 eggs a day. Find the mean over the two weeks, and say why here it equals the mean of the two means.
Reasoning
- Hens laid 5 eggs on 1 day and 9 eggs on 9 days. Explain why the mean is not 7, the number halfway between 5 and 9, and find it.
- Explain why a weighted mean can never be larger than the largest of its values.
- For a table with 2 on 1 day and 4 on 3 days, find the mean by totals and again as the sum of value \times share. Explain why the two ways always agree.
- Every frequency in a table is doubled. Explain what happens to the mean.
- Explain why a weighted mean in which every weight is the same is the ordinary mean.
Answers
- 5.7 eggs. The products are 4, 15, 24 and 14, total 57, over 1 + 3 + 4 + 2 = 10 days: \displaystyle \frac{57}{10} = 5.7.
- 3.2 points. The products are 2, 8, 15, 24 and 15, total 64, over 20 spellers: \displaystyle \frac{64}{20} = 3.2.
- 3.4 kittens. The products are 1, 6, 18, 28 and 15, total 68, over 1 + 3 + 6 + 7 + 3 = 20 litters: \displaystyle \frac{68}{20} = 3.4.
- 0.75 eggs. The table has 0 eggs for 3 hens and 1 egg for 9 hens. The total is 0 \times 3 + 1 \times 9 = 9 eggs over 12 hens, and \displaystyle \frac{9}{12} = 0.75. The hens that laid none still count among the 12.
- 5.25 eggs. The products are 6, 0, 30 and 48, total 84, over 2 + 0 + 6 + 8 = 16 days: \displaystyle \frac{84}{16} = 5.25.
- 10.25 eggs. The plot shows 8 once, 9 twice, 10 four times, 11 three times and 12 twice. The products are 8, 18, 40, 33 and 24, total 123, over 12 days: \displaystyle \frac{123}{12} = 10.25.
- 3.6 kittens. The total is 2 + 12 + 16 + 6 = 36 kittens over 10 litters: \displaystyle \frac{36}{10} = 3.6.
- 79. 0.2 \times 90 + 0.3 \times 70 + 0.5 \times 80 is 18 + 21 + 40 = 79.
- 84. \displaystyle \frac{1}{5} \times 70 + \frac{2}{5} \times 85 + \frac{2}{5} \times 90 is 14 + 34 + 36 = 84.
- 15 dollars a bag. The bags cost 48 + 102 = 150 dollars for 10 bags, and \displaystyle \frac{150}{10} = 15. The mean of the two prices is 14.5 dollars, lower, because more bags were bought at the higher price.
- 7. The weights are 3, 1 and 1, total 5: \displaystyle \frac{3 \times 6 + 9 + 8}{5} = \frac{35}{5} = 7.
- 82. 0.25 \times 88 + 0.75 \times 80 is 22 + 60 = 82.
- 4.6 kittens. The totals are 10 \times 4 = 40 and 15 \times 5 = 75, so 115 kittens in 25 litters: \displaystyle \frac{115}{25} = 4.6.
- 80. The first round gives 0.3 \times 60 = 18, so the second must give 74 - 18 = 56, which is 0.7 of its score: 56 \div 0.7 = 80.
- 3 days. Measured from the mean 8, each 7 is 1 below, so the six of them put 6 on the low side. Each 10 is 2 above, so 3 of them balance it. Check: \displaystyle \frac{42 + 30}{9} = \frac{72}{9} = 8.
- 7 eggs. The totals are 7 \times 6 = 42 and 7 \times 8 = 56, so \displaystyle \frac{98}{14} = 7. Both weeks have 7 days, equal weights, so the weighted mean of 6 and 8 is their plain mean.
- 8.6 eggs. The number 7 counts each column once, but 9 eggs happened on nine days and 5 on only one, so the mean sits much nearer 9: \displaystyle \frac{5 + 81}{10} = \frac{86}{10} = 8.6.
- Replace every value by the largest one. No product goes down, since no weight is negative, and the weighted mean becomes the largest value itself: the total weight times the largest value, divided by the total weight. So before the change it was at most the largest value.
- 3.5 both ways. By totals: \displaystyle \frac{2 \times 1 + 4 \times 3}{4} = \frac{14}{4} = 3.5. By shares: \displaystyle 2 \times \frac{1}{4} + 4 \times \frac{3}{4} is 0.5 + 3 = 3.5. Dividing the total by 4 at the end, or dividing each product by 4 first, gives the same result, because dividing a sum by a number divides each part of the sum by it.
- The mean does not change. The total of the values doubles and the total frequency doubles, so the quotient is the same; each value still holds the same share of the data.
- Say there are n values and each has weight w. The sum of the products is w times the total of the values, and the total weight is n \times w. Dividing, the w cancels and leaves the total of the values divided by n, the ordinary mean.