Relative frequency tables
Two schools ran the same survey, and one school is about three times the size of the other. How can their answers be compared fairly?
Where you are 8 in Data and variables
When you reach for it
A frequency table answers “how many?” for each category of one categorical variable. That is enough while you look at one group. It stops being enough the moment you compare two groups of different sizes.
Here is a made-up survey. Two schools asked every student, “Which kind of book do you like best?”, and each student gave exactly one answer. Each school’s column is its own frequency table.
| Book | Ashby | Brookfield |
|---|---|---|
| adventure | 28 | 70 |
| mystery | 20 | 105 |
| comics | 24 | 50 |
| poetry | 8 | 25 |
| total | 80 | 250 |
Brookfield has more readers of every kind of book, simply because it has more students. So the counts cannot answer the question people usually mean: at which school is adventure the more popular choice? For that you need the adventure readers as a part of each school: 28 out of 80 against 70 out of 250. A relative frequency table gives every category that way, as a share of its own total, so groups of any size sit on the same scale.
You reach for it whenever the question is “what part of the group?” rather than “how many?”.
The procedure
Frequency and relative frequency
The frequency of a category is the number of responses that fall in it. Its relative frequency is that frequency divided by the total number of responses:
A relative frequency table lists each category beside its relative frequency, and usually beside its count as well. The relative frequency can be written in three equal forms. For Ashby’s adventure readers:
The fraction shows where the number came from, the decimal is easy to compare and to multiply with, and the percent is the form most reports use. Changing a fraction into a percent is finding what percent one number is of another, with the category as the part and the total as the whole.
Dividing by the total turns each school, 80 students or 250, into a whole of exactly 1, so 0.35 of Ashby and 0.28 of Brookfield are parts of equal wholes and compare directly.
Why the shares add to 1
Each student gave exactly one answer, so each student is counted in exactly one row, and the counts add up to the total. At Ashby, 28 + 20 + 24 + 8 = 80. All the shares have the same denominator, so they add the way fractions with a common denominator add:
The same argument works for any table: if the counts are a, b, c and so on with total n, the shares add to \displaystyle \frac{n}{n} = 1, which as a percent is 100\%. This gives a free check on every table you build. A share like \displaystyle \frac{5}{24} has no short decimal, so it gets rounded, and rounded shares can then miss 1 by a little (Example 2 shows how). A gap bigger than the rounding could cause means a count or a division has gone wrong.
Reading a count back
Multiplying both sides of \displaystyle \text{relative frequency} = \frac{\text{frequency}}{\text{total}} by the total gives
This is finding a percent of a quantity: 35\% of Ashby’s 80 students is 0.35 \times 80 = 28 adventure readers. If instead you know one count and its share but not the total, divide both sides by the relative frequency:
Ashby’s 8 poetry readers are 0.1 of the school, so the school has \displaystyle \frac{8}{0.1} = 80 students.
Worked examples
Building a table from a list of answers
Tadhg asked everyone in his class, “Which season do you like best?”, and wrote down the 24 answers in the order he heard them (made-up data):
summer, autumn, summer, spring, winter, summer, autumn, spring, summer, summer, winter, autumn, spring, summer, autumn, winter, summer, spring, autumn, summer, winter, spring, summer, autumn.
Make a relative frequency table, giving each share as a fraction, as a decimal to three places and as a percent to one decimal place.
SolutionFirst count. Going through the list once and making one tally mark per answer means no answer is skipped or counted twice:
| Season | Tally | Frequency |
|---|---|---|
| spring | \cancel{\mathsf{IIII}} | 5 |
| summer | \cancel{\mathsf{IIII}}\;\mathsf{IIII} | 9 |
| autumn | \cancel{\mathsf{IIII}}\;\mathsf{I} | 6 |
| winter | \mathsf{IIII} | 4 |
The frequencies add to 5 + 9 + 6 + 4 = 24, the number of answers, so the count is complete.
Now divide each frequency by the total, 24. Two of the fractions simplify to fractions with short decimals: \displaystyle \frac{9}{24} = \frac{3}{8} = 0.375 and \displaystyle \frac{6}{24} = \frac{1}{4} = 0.25. The other two do not end: \displaystyle \frac{5}{24} = 0.20833\ldots and \displaystyle \frac{4}{24} = \frac{1}{6} = 0.1666\ldots, so they are rounded.
| Season | Share | Decimal | Percent |
|---|---|---|---|
| spring | \displaystyle \frac{5}{24} | 0.208 | 20.8\% |
| summer | \displaystyle \frac{3}{8} | 0.375 | 37.5\% |
| autumn | \displaystyle \frac{1}{4} | 0.25 | 25\% |
| winter | \displaystyle \frac{1}{6} | 0.167 | 16.7\% |
| total | 1 | 1 | 100\% |
Check: 0.208 + 0.375 + 0.25 + 0.167 = 1.000. Here the roundings happen to cancel; the next example shows that they need not.
Rounded shares that miss 1
A made-up bakery sold 70 loaves in one day: 26 white, 17 wholemeal, 15 sourdough and 12 rye. (a) Make a relative frequency table with percents to one decimal place. (b) Add the rounded percents and explain the total. (c) The baker’s printed report gives only “rye: 17.1\%” and “70 loaves in all”. Recover the number of rye loaves from the report.
Solution(a) Divide each count by 70 and multiply by 100\%:
| Bread | Loaves | Share | Percent |
|---|---|---|---|
| white | 26 | \displaystyle \frac{26}{70} | 37.1\% |
| wholemeal | 17 | \displaystyle \frac{17}{70} | 24.3\% |
| sourdough | 15 | \displaystyle \frac{15}{70} | 21.4\% |
| rye | 12 | \displaystyle \frac{12}{70} | 17.1\% |
(b) 37.1 + 24.3 + 21.4 + 17.1 = 99.9, so the rounded percents add to 99.9\%. The exact shares add to \displaystyle \frac{70}{70} = 1, since every loaf is exactly one kind of bread. Three of the four percents were rounded down and only wholemeal up, and together the small changes come to 0.1 of a percent down, which is the whole gap.
(c) Read the count back with \text{frequency} = \text{relative frequency} \times \text{total}:
The answer is not a whole number because 17.1\% was rounded. Loaves are counted in whole numbers, so the bakery sold 12 rye loaves. Check: \displaystyle \frac{12}{70} = 17.14\ldots\%, which does round to 17.1\%, and 11 or 13 loaves would give 15.7\% or 18.6\%.
Comparing two schools of different sizes
Use the book survey in the opening section. (a) Which school has more students who chose adventure? (b) At which school is adventure the more popular choice? (c) Answer the same question for mystery and for poetry.
Solution(a) Brookfield: 70 adventure readers against Ashby’s 28.
(b) “More popular” asks for a share of each school, so divide each school’s counts by that school’s own total, 80 for Ashby and 250 for Brookfield:
| Book | Ashby | Brookfield |
|---|---|---|
| adventure | \displaystyle \frac{28}{80} = 35\% | \displaystyle \frac{70}{250} = 28\% |
| mystery | \displaystyle \frac{20}{80} = 25\% | \displaystyle \frac{105}{250} = 42\% |
| comics | \displaystyle \frac{24}{80} = 30\% | \displaystyle \frac{50}{250} = 20\% |
| poetry | \displaystyle \frac{8}{80} = 10\% | \displaystyle \frac{25}{250} = 10\% |
| total | 100\% | 100\% |
Each column adds to 100\%, as it must. Adventure is more popular at Ashby: 35\% of Ashby chose it against 28\% of Brookfield, even though Brookfield has more than twice as many adventure readers.
(c) Mystery is far more popular at Brookfield, 42\% against 25\%. Poetry is equally popular, 10\% at each. The counts, 25 and 8, hid that: Brookfield has \displaystyle \frac{250}{80} = 3.125 times as many students as Ashby, and 25 is exactly 3.125 times 8, so its poetry readers are the same part of a bigger whole.
Counts from a relative frequency table
Wren’s nature club counted 160 trees in a wood (made-up data) and made a relative frequency table. The maples’ entry was smudged. The rest read: oak 35\%, beech 22.5\%, birch 17.5\%, ash 10\%. Find the maples’ share, then the number of trees of each kind.
SolutionEvery tree is exactly one kind, so the shares add to 100\%. The four that can be read add to 35 + 22.5 + 17.5 + 10 = 85, so the maples are 100\% - 85\% = 15\%.
Each count is the share times the total, 160:
Check: 56 + 36 + 28 + 16 + 24 = 160. Every count came out whole, which also suggests the shares were exact rather than rounded.
Finding the total from one count
In a second wood the club’s table gave only shares: pine 0.25, larch 0.4, spruce 0.275, yew 0.075. Ulrike-Mae remembers that the club counted 9 yews. How many trees did the club count, and how many of each kind?
SolutionThe yews are a known count with a known share, so the total is the count divided by the share:
One way to see it: \displaystyle 0.075 = \frac{3}{40}, so 9 trees are 3 fortieths of the total. Then one fortieth is 3 trees and the whole is 40 \times 3 = 120.
Now read the other counts back:
Check: 30 + 48 + 33 + 9 = 120, and the shares add to 0.25 + 0.4 + 0.275 + 0.075 = 1.
Which totals are possible?
On another day the bakery’s table gave exact shares: white 0.375, wholemeal 0.25, sourdough 0.125, rye 0.25. (a) What is the smallest number of loaves the bakery could have sold? (b) Could it have sold 60 loaves? (c) Could it have sold 96?
SolutionAs eighths, white is \displaystyle 0.375 = \frac{3}{8} of the total, wholemeal and rye are each \displaystyle 0.25 = \frac{2}{8}, and sourdough is \displaystyle 0.125 = \frac{1}{8}.
Every count is a share times the total, and every count must be a whole number. The sourdough count is \displaystyle \frac{1}{8} of the total, so the total must divide exactly by 8. Going the other way, if the total is 8k for a whole number k, the counts are 3k, 2k, k and 2k, all whole. So the possible totals are exactly the multiples of 8.
(a) The smallest is 8 loaves: 3 white, 2 wholemeal, 1 sourdough, 2 rye.
(b) No. 60 \div 8 = 7.5, and the white count would be 0.375 \times 60 = 22.5 loaves, which is impossible.
(c) Yes. 96 = 8 \times 12, giving 36 white, 24 wholemeal, 12 sourdough and 24 rye, which add to 96.
Boundaries
One answer per individual. The shares add to 1 only because each response lands in exactly one category. If a survey lets each person choose several answers (“tick every season you enjoy”), one person can be counted in several rows, and the shares can add to more than 1: they are no longer pieces of one whole.
A share hides its total. 50\% could be 1 person out of 2 or 400 out of 800, and the table of shares alone cannot tell which. A relative frequency table should state its total. The total also matters for how much to trust a share: in a group of 4, each single response is 25\% of the whole, so one changed answer moves a share a long way.
Shares of different wholes do not add or average. Put Ashby and Brookfield together and the adventure readers are 28 + 70 = 98 out of 80 + 250 = 330 students, and \displaystyle \frac{98}{330} \approx 29.7\%. That is not 31.5\%, the average of 35\% and 28\%: Brookfield is bigger, so it pulls the combined share toward its own 28\%. To combine groups, add the counts and add the totals, and only then divide.
A total of zero has no shares. With no responses there is nothing to divide by, since division by 0 is not defined.
Where this goes next
The same division by the total turns a histogram of numerical data into a relative frequency histogram, whose bar heights are shares instead of counts, so that two data sets of different sizes can be drawn on one scale.
When the outcomes are the results of repeating a chance process, such as tossing a coin or watching which bird comes to a feeder next, a relative frequency is an experimental probability: the share of trials so far that gave a result, used as an estimate of how likely it is.
The book table records two variables for each student, school and kind of book, so it is really a small two-way table, and its totals are the marginal frequencies that lesson starts from.
Exercises
Building a table
- Xiadani asked 20 classmates “Which season do you like best?” (made-up data): summer, winter, autumn, summer, spring, autumn, summer, summer, winter, spring, autumn, summer, autumn, spring, summer, autumn, winter, summer, spring, autumn. Make a frequency table, then give each share as a decimal and a percent.
- A nature club counted these birds on a pond (made-up data): ducks 18, geese 12, swans 3, herons 3, coots 14. Make a relative frequency table with decimals and percents.
- A bakery sold 60 loaves on one day (made-up data): 25 white, 19 wholemeal and 16 rye. Give each share as a percent rounded to the nearest whole percent, add the three rounded percents, and explain the total.
Reading counts and totals back
- A nature club counted 240 birds in a park (made-up data). The relative frequencies were gulls 37.5\%, starlings 25\%, pigeons 20\% and crows 17.5\%. How many birds of each species did the club count?
- At a third made-up school, 150 students answered the book survey: 34\% chose adventure, 46\% chose mystery and the rest chose comics. What percent chose comics, and how many students chose each kind?
- A bakery’s report says 9 of its loaves were rye, which was 12\% of the day’s loaves. How many loaves did it sell that day? Sourdough was 32\% of the loaves; how many were sourdough?
- A report on a class of 36 students gives summer as 41.7\% and winter as 13.9\%, both rounded to one decimal place. How many students chose each?
- In Wren’s class, 7 students chose winter, and that is 17.5\% of the class. How many students are in the class? If 35\% chose summer, how many is that?
Comparing groups
- A bakery sold 80 loaves on a Monday, 20 of them sourdough, and 200 loaves on a Saturday, 44 of them sourdough. On which day was sourdough the larger share of the sales?
- At Fenwick School, 18 of 120 students play a musical instrument. At Garrow School, 54 of 360 students do. Compare how common playing an instrument is at the two schools.
- Vincenzo’s club counted 64 birds in a wood, 16 of them robins, and 90 birds by a marsh, 9 of them robins. (a) Where were robins the larger share? (b) At least how many of the 90 marsh birds would have had to be robins for the marsh’s share to be at least the wood’s?
Reasoning
- Explain why the relative frequencies in a table must add to 1 when every individual gives exactly one answer. Use letters for the counts.
- Xiadani asked 40 people “Which seasons do you enjoy? Choose as many as you like.” The counts were spring 26, summer 30, autumn 18, winter 12. Find the sum of the four shares, and explain why this sum is not a mistake.
- Tadhg’s table for one class gives three shares, rounded to two decimal places: 0.40, 0.35 and 0.30. Show that rounding alone cannot explain the total, so the table must hold an error.
- Yorick-Jo says that 62.5\% of the birds his club counted were sparrows, and the percent is exact. What is the smallest number of birds the club could have counted? Explain.
Answers
- Spring 4, summer 7, autumn 6, winter 3, total 20. Shares: spring \displaystyle \frac{4}{20} = 0.2 = 20\%, summer \displaystyle \frac{7}{20} = 0.35 = 35\%, autumn \displaystyle \frac{6}{20} = 0.3 = 30\%, winter \displaystyle \frac{3}{20} = 0.15 = 15\%. Check: 0.2 + 0.35 + 0.3 + 0.15 = 1.
- Total 18 + 12 + 3 + 3 + 14 = 50. Ducks \displaystyle \frac{18}{50} = 0.36 = 36\%, geese \displaystyle \frac{12}{50} = 0.24 = 24\%, swans \displaystyle \frac{3}{50} = 0.06 = 6\%, herons 0.06 = 6\%, coots \displaystyle \frac{14}{50} = 0.28 = 28\%. They add to 100\%.
- White \displaystyle \frac{25}{60} = 41\tfrac{2}{3}\% \approx 42\%, wholemeal \displaystyle \frac{19}{60} = 31\tfrac{2}{3}\% \approx 32\%, rye \displaystyle \frac{16}{60} = 26\tfrac{2}{3}\% \approx 27\%. The rounded percents add to 101\%. The exact ones add to 100\%, but each was rounded up by \displaystyle \frac{1}{3} of a percent, and three of those make 1\%.
- Gulls 0.375 \times 240 = 90, starlings 0.25 \times 240 = 60, pigeons 0.2 \times 240 = 48, crows 0.175 \times 240 = 42. Check: 90 + 60 + 48 + 42 = 240.
- Comics is 100\% - 34\% - 46\% = 20\%. Adventure 0.34 \times 150 = 51, mystery 0.46 \times 150 = 69, comics 0.2 \times 150 = 30, which add to 150.
- Total \displaystyle = \frac{9}{0.12} = 75 loaves. Sourdough 0.32 \times 75 = 24 loaves.
- Summer 0.417 \times 36 = 15.012, so 15 students; winter 0.139 \times 36 = 5.004, so 5 students. Check: \displaystyle \frac{15}{36} = 41.66\ldots\% and \displaystyle \frac{5}{36} = 13.88\ldots\% round to the reported values.
- The class has \displaystyle \frac{7}{0.175} = 40 students, and 0.35 \times 40 = 14 chose summer.
- Monday \displaystyle \frac{20}{80} = 0.25 = 25\%, Saturday \displaystyle \frac{44}{200} = 0.22 = 22\%. Saturday sold more sourdough loaves, but sourdough was the larger share on Monday.
- Fenwick \displaystyle \frac{18}{120} = 0.15 = 15\%, Garrow \displaystyle \frac{54}{360} = 0.15 = 15\%. Playing an instrument is equally common at both: Garrow has three times as many players but also three times as many students.
- (a) Wood \displaystyle \frac{16}{64} = 0.25, marsh \displaystyle \frac{9}{90} = 0.1, so robins were the larger share in the wood. (b) 0.25 \times 90 = 22.5 is not a whole number, so 22 robins (\displaystyle \frac{22}{90} \approx 0.244) fall short and at least 23 are needed (\displaystyle \frac{23}{90} \approx 0.256).
- Say the counts are a, b, c, ..., with total n. Each individual is counted in exactly one row, so a + b + c + \ldots = n. Then the shares add to \displaystyle \frac{a}{n} + \frac{b}{n} + \ldots = \frac{a + b + \ldots}{n} = \frac{n}{n} = 1.
- The shares are 0.65, 0.75, 0.45 and 0.3, and their sum is \displaystyle \frac{86}{40} = 2.15. It is not a mistake: a person who enjoys two seasons is counted in two rows, so the counts add to 86, more than the 40 people.
- The three rounded shares add to 0.40 + 0.35 + 0.30 = 1.05. Each rounded share is within 0.005 of the exact one, so the exact sum is at least 1.05 - 3 \times 0.005 = 1.035. That is more than 1, so the exact shares cannot add to 1, and a count or a division in the table is wrong.
- The smallest total is 8 birds. \displaystyle 62.5\% = 0.625 = \frac{5}{8}, so the number of sparrows is \displaystyle \frac{5}{8} of the total. Since 5 and 8 share no factor, that is a whole number only when the total divides by 8. With 8 birds, 5 are sparrows.