Twenty-five students each name their main way of traveling to a learning center, and 12 of them say bus. Is that a lot? The count alone cannot say, and a percentage can mean several different things depending on which total it is taken from. This lesson builds frequency tables and bar charts from raw answers, compares two groups with conditional percentages, and shows when percentages can correctly add to more than 100 percent.
Key terms
Frequency table and relative frequency
Definition The frequency of a category is the number of observations that fall in it. A frequency table lists the categories of a variable beside their frequencies. For the table to account for every observation once, the categories must be mutually exclusive, so that no observation falls in two of them, and exhaustive, so that every observation falls in one, if necessary through an explicit category such as other or no answer. The frequencies then add to the total number of observations . The relative frequency of a category with frequency is its share of that total,
and its percentage is the relative frequency multiplied by 100. With mutually exclusive and exhaustive categories, the relative frequencies add to 1 and the percentages add to 100 percent, apart from rounding.
In plain words A frequency table counts how many answers landed in each box, and a relative frequency says what share of a named group that is. Before dividing, decide which group the share is of, for example everyone invited, everyone who answered, or only those who gave a valid answer to this question.
Example A constructed survey asks 25 students for their main way of traveling to a learning center. The question allows one answer, so each student is counted exactly once.
| Main mode | Frequency | Relative frequency | Percentage |
|---|---|---|---|
| Bus | 12 | 0.48 | 48 |
| Walk | 8 | 0.32 | 32 |
| Cycle | 5 | 0.20 | 20 |
| Total | 25 | 1.00 | 100 |
If 30 students had been invited and 5 had not answered, the 12 bus users would be 40 percent of those invited but 48 percent of those who answered. Both figures are correct, and the label has to say which one is meant. Keep the count beside the percentage as well, since 48 percent of 25 answers rests on far less data than 48 percent of 2500 answers.
Bar chart
Definition A bar chart for a categorical variable draws one bar per category against a common axis. The length of each bar, measured from a baseline at zero, is proportional to the category’s frequency or relative frequency. The bars have equal widths and are separated by gaps, which show that the categories are separate groups rather than intervals of a number line. The axis is labeled with what the bars measure, a count or a percentage, and a percentage axis comes with its denominator. For categories with no natural order, the order of the bars is a free choice, such as descending frequency, and changing it changes no count.
In plain words The eye compares lengths, so the lengths must stand in the same ratios as the numbers. That needs a shared zero baseline and bars that differ only in length.
Example For the travel survey the bars have lengths 12, 8 and 5 on a count axis that starts at 0. The bus bar is 2.4 times as long as the cycle bar, matching . If the axis started at 4, the visible bars would have lengths 8, 4 and 1, and bus travel would look 8 times as common as cycling. Pictures that grow in both width and height mislead in a similar way, since doubling both dimensions multiplies the area by 4.
Contingency table
Definition A contingency table, also called a two-way table, cross-classifies each observation by two categorical variables. The categories of one variable label the rows and those of the other label the columns, and each cell holds the number of observations in one row category and one column category. The row totals and the column totals are the margins. When the categories of each variable are mutually exclusive and exhaustive, every observation lies in exactly one cell, each margin is the frequency table of one variable, and the cells, the row totals and the column totals each add to the grand total.
In plain words A contingency table is two frequency tables woven together. The margins give back the counts for each variable alone, and the cells show how the two variables occur together.
Example Split the 25 students into group A with 10 students and group B with 15.
| Group | Bus | Walk | Cycle | Total |
|---|---|---|---|---|
| A | 8 | 2 | 0 | 10 |
| B | 4 | 6 | 5 | 15 |
| Total | 12 | 8 | 5 | 25 |
The column totals 12, 8 and 5 reproduce the frequency table above, a quick check that no student was lost or counted twice. A cell can be 0, as for cyclists in group A, and it still belongs in the table.
Conditional percentage
Definition A conditional percentage is a percentage whose denominator is restricted to a specified group, the condition. In a contingency table, a row percentage divides a cell by its row total and gives the percentage of that row’s group falling in the cell’s column category. A column percentage divides the cell by its column total instead. Each needs a positive total, and when the categories are mutually exclusive and exhaustive, the row percentages add to 100 percent within each row and the column percentages within each column. Dividing a cell by the grand total gives yet another quantity, the percentage of all observations that fall in both categories.
In plain words Ask “percent of what?” before dividing. The group named after words such as among or within goes in the denominator, and the same cell gives different answers for different groups.
Example Among the 10 students in group A, 8 take the bus, so the bus percentage within group A is , or 80 percent. Within group B it is , about 26.7 percent. Because the groups differ in size, these within-group percentages, not the raw counts 8 and 4, are the fair way to compare bus use in the two groups. The reversed question asks which share of the bus users belong to group A. Its denominator is the 12 bus users, which gives , about 66.7 percent. The figure , or 32 percent, is the share of all 25 students who are both in group A and bus users, a different quantity again.
Cumulative frequency
Definition For a variable whose categories or values have a natural order, the cumulative frequency of a category is the number of observations in that category or in any earlier one. Cumulative frequencies never decrease along the order and end at the total . Dividing them by gives cumulative relative frequencies, which end at 1, or 100 percent. For categories without a natural order, a running total depends on the order in which the categories happen to be listed, so it has no natural meaning.
In plain words A cumulative count answers the question of how many observations are at or below a given level. That question only makes sense when the levels run from low to high.
Example Suppose the same 25 students also report their usual travel time, grouped as under 10 minutes, 10 to under 20 minutes, and 20 minutes or more, with frequencies 9, 11 and 5. The cumulative frequencies are 9, 20 and 25, so 20 students, or 80 percent, usually travel for less than 20 minutes. A running total down the list bus, walk, cycle gives 12, 20 and 25, but “at or below walk” has no meaning, since the list could just as well run cycle, walk, bus and give 5, 13 and 25.
Multiple-response question
Definition A multiple-response question allows one respondent to choose more than one category, so its categories are not mutually exclusive. A tally of its answers counts selections, and the number of selections can differ from the number of respondents. Two kinds of percentage can then be reported, and the table or chart should say which it shows. The percentage of respondents divides each count by the number of respondents. These percentages add to 100 times the average number of selections per respondent, so they need not add to 100 percent and often add to more. The percentage of selections divides by the total number of selections, adds to 100 percent, and describes a share of choices, not of people.
In plain words When people can tick several boxes, one person can appear in several bars. A total above 100 percent is then possible and is not an error, but the bars no longer split the group into separate parts that can be added.
Example A constructed survey asks 20 students which modes they used at least once last week, with any number of choices allowed. Bus receives 14 selections, walk 9 and cycle 6, which makes 29 selections from 20 respondents. As percentages of respondents these are 70, 45 and 30 percent, adding to 145 percent. As a share of selections, bus has , about 48.3 percent. The counts alone cannot tell how many students took the bus or walked. That number lies somewhere from 14 to 20, depending on how much the two groups overlap.
Check yourself
- A single-choice question is answered by 30 students. Eleven prefer morning sessions, 11 prefer afternoon sessions and 8 prefer evening sessions. Give each relative frequency as a percentage rounded to a whole number, and explain why the rounded percentages do not add to 100.
Show the answer
Each relative frequency divides by the 30 students. Morning and afternoon each have , about 36.7 percent, and evening has , about 26.7 percent, so the rounded percentages are 37, 37 and 27. Their sum is 101. The unrounded percentages add to exactly 100, because each student gave exactly one answer, but each was rounded up by one third of a percentage point, and the three rounding errors add to 1 percentage point. A short note that rounded percentages may not add to 100, or one more decimal place, makes this clear to the reader.
- A constructed survey of 60 people records age group and preferred contact channel.
| Age group | Phone | Total | |
|---|---|---|---|
| Under 30 | 6 | 18 | 24 |
| 30 and over | 21 | 15 | 36 |
| Total | 27 | 33 | 60 |
A report says that 30 percent of people under 30 prefer email. Which denominator did the writer use, and what is the correct figure? What percentage of the people who prefer email are under 30?
Show the answer
The writer computed , or 30 percent, which is the share of all 60 people who are both under 30 and prefer email. A statement about people under 30 restricts the denominator to the 24 people in that row, so the correct figure is , or 75 percent. For comparison, 15 of the 36 people aged 30 and over prefer email, about 41.7 percent.
The last question conditions on the email column instead. Of the 33 people who prefer email, 18 are under 30, which is about 54.5 percent. The figures 30, 75 and 54.5 percent all share the numerator 18, and only the denominator changes with the question.
- In a constructed survey, 50 people are asked which of three study apps, A, B and C, they use, and they may choose any number of them. App A is chosen 30 times, app B 25 times and app C 15 times. Find the percentage of respondents for each app and explain their total. What does the fraction describe, and can you find the percentage of people who use A or B?
Show the answer
Dividing by the 50 respondents gives 60, 50 and 30 percent, a total of 140 percent. The total is above 100 percent because the categories overlap, and it equals 100 times the average number of apps chosen per respondent, . Nothing has gone wrong.
The fraction , about 42.9 percent, is app A’s share of the 70 selections, not a share of people. The percentage of people who use A or B cannot be found from these counts, because they do not say how many people chose both. At least 30 people use A or B, since 30 use A, and at most all 50 do, so the answer lies somewhere from 60 to 100 percent.