Categorical data practice: tables and graphs
By Jude Wallis · Published
These 8 problems cover one categorical variable: building frequency and relative frequency tables, reading proportions off a table, turning pie slice angles into counts, and deciding when a pie chart is not allowed. Work each on paper first, then check the solution steps.
AP Statistics: Unit 1 (topics 1.3 Tabular Representation and Summary Statistics for One Categorical Variable, 1.4 Graphical Representations for One Categorical Variable). These problems cover Unit 1 topics 1.3 (frequency and relative frequency tables and summary statistics for one categorical variable) and 1.4 (bar charts and pie charts for one categorical variable, including comparing the same variable across two or more data sets) in the Fall 2026 AP Statistics course, where Unit 1 carries 20 to 30% of the multiple-choice section.
What these problems build
These 8 problems cover the two Unit 1 topics on a single categorical variable: topic 1.3, which turns raw responses into a frequency table and a relative frequency table, and topic 1.4, which turns those tables into a bar graph or a pie chart. A categorical variable records which group each observational unit falls into, such as the drink a customer bought or the language a student enrolled in, rather than a number you could average. If that distinction is not automatic yet, read qualitative vs quantitative data first.
Problems 1, 2, and 7 work the tables: building one from a raw list, filling in a missing entry from the fact that relative frequencies add to 1, and catching a published table whose percentages cannot be right. Problems 3, 4, and 6 work the graphs: reading a bar graph without over-reading it, converting between a pie slice's angle and its count, and recognizing when a pie chart is not available at all. Problems 5 and 8 compare the same categorical variable across two or more data sets, which is where counts and shares can point in opposite directions. Difficulty rises through the set.
Supporting pages: frequency vs relative frequency, bar graph vs pie chart, and histogram vs bar graph for the trap of treating a bar graph like a histogram. Two-variable tables come later, in how to read a two-way table and the two-way table practice set. More sets are on the practice page.
Two checks, and three words that get confused
Every problem here can be checked before you look at the solution. Check one: the counts must add to the stated total. Check two: the relative frequencies must add to 1, or 100%, and if the display is a pie chart, the slice angles must add to 360 degrees. Those checks are not busywork. Problem 2's missing entry comes straight from the second one, and problems 6 and 7 are built around tables that fail it, because shares adding to 1.60, or percentages adding to 104%, are the fastest signal that the categories overlap or that a number is wrong.
A relative frequency is a count divided by the total, so it always sits between 0 and 1. Proportions, percentages, and ratios carry the same information: 0.35, 35%, and 7 out of 20 all say one thing. The mode of a categorical variable is the category with the largest count, and it is worth separating from two words students reach for instead. A plurality is the largest share of any category; a majority is a share above 0.5. In problem 3 one candidate has the first and not the second. Skew is not available here at all: skew describes values arranged along a number line, while a bar graph's axis is a list of labels rather than a scale. Every categorical variable in this set is nominal, so its bars can be reordered freely and the outline of its bars carries no information. Ordered categories such as small, medium, large do fix the bar order, and rearranging those does lose something; even there the description is the mode and the shares, not skew, because a fixed order still supplies no measured distance. Topic pages for the underlying material are 1.3 categorical tables and 1.4 categorical graphs.
Frequently asked questions
Do relative frequencies always add to 1?
For one categorical variable whose categories are non-overlapping and cover every observational unit, yes, up to rounding. Each unit lands in exactly one category, so the shares split the whole. When they do not add to 1, either a number is wrong or the categories are not what they appear to be. Problem 6 shows the usual cause: a check-all-that-apply item, where one member is counted in two categories, so the shares add to 1.60.
When is a pie chart the wrong graph?
If the categories overlap or fail to cover every case, a pie chart is not just a poor choice, it is not defined, because the slices cannot fill one circle. Past that it is a readability call. People judge lengths more accurately than angles, so a bar graph is easier to rank and to read against a scale, and a pie earns its place when the message is that a few categories divide one fixed total. See bar graph vs pie chart.
Should I report counts or percentages?
Report counts when the question is how many, and proportions or percentages when the question is what share, especially across groups of different sizes. Problem 5 shows why: School A has more than twice as many bike riders as School B, 48 against 20, and exactly the same share, 0.10 in both. Whichever you report, say which it is and name the total it came from.
Can a bar graph be skewed?
No. Skew describes how the values of a quantitative variable trail off along a number line. A bar graph's horizontal axis is a list of category labels, not a number line. For a nominal variable, which is every one in this set, the bars can be rearranged without changing a single fact, so any shape in their outline is an artifact of the order chosen. Ordered categories such as small, medium, large do fix the bar order, but a fixed order is still not a measured distance, so skew is not the right word there either. Describe a categorical distribution by naming the mode and quoting the counts and shares instead, as in histogram vs bar graph.
Problem 1
A school store clerk records the drink bought by each of the 20 customers in one lunch period, in arrival order. W is water, J is juice, M is milk, and S is a sports drink.
W J M W S J W M J W W S M J W M J W M J
(a) Build the frequency table. (b) Build the relative frequency table, as proportions and as percents. (c) Name the mode. (d) What proportion of customers bought water or juice?
Show the worked solution
Tally each letter in one pass. W appears at positions 1, 4, 7, 10, 11, 15, and 18, so 7 customers bought water. J appears at positions 2, 6, 9, 14, 17, and 20, so 6 bought juice. M appears at positions 3, 8, 13, 16, and 19, so 5 bought milk. S appears at positions 5 and 12, so 2 bought a sports drink.
Check the total before going further: , which matches the 20 customers, so every purchase is counted exactly once and no category is missing.
(a) The frequency table lists each category with its count.
Drink Water Juice Milk Sports drink Total Frequency 7 6 5 2 20 (b) A relative frequency is the category count divided by the total, so divide each entry by 20. Water: , or 35%. Juice: , or 30%. Milk: , or 25%. Sports drink: , or 10%.
Check the relative frequency table the way you check any of them: , or 100%.
Drink Water Juice Milk Sports drink Total Relative frequency 0.35 0.30 0.25 0.10 1.00 Percent 35% 30% 25% 10% 100% (c) The mode of a categorical variable is the category with the largest frequency. Water has 7, more than any other, so water is the mode. Note that the mode is a category name, not a number.
(d) Water and juice are separate categories and each customer bought exactly one drink, so the two counts can be added without double counting: customers, and , or 65%.
(a) Water 7, juice 6, milk 5, sports drink 2, total 20. (b) 0.35 (35%), 0.30 (30%), 0.25 (25%), 0.10 (10%), adding to 1.00. (c) Water, the category with the largest count. (d) , or 65%.
Problem 2
A library records the format of each of the 250 items checked out in one week. Every item falls in exactly one format. The relative frequency table went to print with one entry missing.
| Format | Print book | Ebook | Audiobook | DVD |
|---|---|---|---|---|
| Relative frequency | 0.48 | 0.26 | 0.14 | ? |
(a) Find the missing relative frequency. (b) Convert the whole table to counts. (c) How many more print books than ebooks were checked out? (d) A staff member says the missing entry could have been found without knowing the total of 250. Are they right?
Show the worked solution
The four formats are non-overlapping and cover every item, so each item is counted in exactly one column and the four relative frequencies must add to exactly 1.
(a) Add the three printed values: . The DVD share is whatever is left, so it is .
(b) A count is the relative frequency times the total, so multiply each share by 250. Print book: . Ebook: . Audiobook: . DVD: .
Check the counts against the stated total: .
Format Print book Ebook Audiobook DVD Total Relative frequency 0.48 0.26 0.14 0.12 1.00 Count 120 65 35 30 250 (c) Subtract the two counts: more print books than ebooks. You could also work from the shares first, since and .
(d) They are right. Part (a) used only the fact that the shares add to 1, and 250 never entered it. The total is needed to turn shares into counts in parts (b) and (c), but not to recover a missing proportion.
(a) . (b) Print book 120, ebook 65, audiobook 35, DVD 30, totaling 250. (c) more print books. (d) Yes: the missing share follows from the shares adding to 1, which does not involve the total.
Problem 3
A student council election drew 300 votes, displayed as a bar graph with one bar per candidate. The bar heights, read off the frequency axis, are below.
| Candidate | Alvarez | Brooks | Chen | Diallo |
|---|---|---|---|---|
| Votes | 126 | 84 | 57 | 33 |
(a) Convert the graph to relative frequencies. (b) A poster claims a majority of voters chose Alvarez. Evaluate it. (c) What share of the vote went to the top two candidates combined? (d) A student says the graph is skewed right because the bars get shorter from left to right. Explain what is wrong with that.
Show the worked solution
Check the heights against the stated turnout: votes, so every ballot is on the graph exactly once.
(a) Divide each bar height by 300. Alvarez: . Brooks: . Chen: . Diallo: . Check: .
(b) A majority means more than half of the votes, so more than 150 of the 300. Alvarez received 126, a share of 0.42, which is below 0.50. Alvarez would have needed at least 151 votes, 25 more than the 126 actually received, so the poster is wrong.
(b) What Alvarez does have is a plurality: the largest share of any candidate, 0.42 against the next-highest 0.28. That also makes Alvarez the mode of this categorical variable. Plurality and majority are different claims, and only the plurality one is supported here.
(c) The top two are Alvarez and Brooks: votes, and , so they took 70% of the vote between them. Equivalently, .
(d) Skew describes a quantitative variable, whose values sit on a number line in a fixed order, so that a longer tail on one side means something. Candidate is a categorical variable with no order among its categories, so the horizontal axis is a list of labels, not a scale. These bars happen to be printed tallest to shortest, but they could be printed alphabetically or in any other order without changing a single fact about the election, and the outline would change with them.
(d) Say what the graph does support instead: Alvarez is the mode with 126 votes (0.42), the four shares are 0.42, 0.28, 0.19, and 0.11, and no candidate won a majority.
(a) Alvarez 0.42, Brooks 0.28, Chen 0.19, Diallo 0.11, adding to 1.00. (b) False. A majority needs more than 150 of the 300 votes; Alvarez got 126, a share of 0.42, so Alvarez has a plurality, not a majority. (c) , or 70%. (d) Skew requires a fixed numeric order on the axis. Candidate is categorical with no order among its categories, so the bars can be reordered freely and the outline carries no information.
Problem 4
A high school surveys all 400 seniors, and each names exactly one plan for the year after graduation. The results are drawn as a pie chart with these central angles.
| Plan | Four-year college | Two-year college | Workforce | Gap year |
|---|---|---|---|---|
| Slice angle | 126 degrees | 90 degrees | 90 degrees | 54 degrees |
(a) Check that the chart is complete. (b) Find each plan's relative frequency and count. (c) A classmate reports that 126 seniors are headed to a four-year college. What did they misread? (d) Name one thing this pie chart makes harder to see than a bar graph would.
Show the worked solution
(a) The slices of a pie chart fill one circle, so their central angles must add to 360 degrees: . The chart accounts for every senior once.
(b) A slice's angle is its relative frequency times 360 degrees, so divide by 360 to go the other way. Four-year college: . Two-year college: . Workforce: . Gap year: . Check: .
(b) Now multiply each share by the 400 seniors. Four-year college: . Two-year college: . Workforce: . Gap year: . Check: .
Plan Angle Relative frequency Count Four-year college 126 degrees 0.35 140 Two-year college 90 degrees 0.25 100 Workforce 90 degrees 0.25 100 Gap year 54 degrees 0.15 60 Total 360 degrees 1.00 400 (c) They read a degree measure as a count. The number 126 is the slice's angle; the count is seniors. The two would only coincide if the total happened to be 360.
(d) A pie chart encodes each value as an angle, and people judge angles less accurately than lengths, so ranking the 126-degree slice against the 90-degree ones by eye, or reading either as a percent, is harder than reading four bar tops against a labeled axis. The chart also carries no counts on its own: part (b)'s counts came from the stated total of 400, not from the picture.
(a) degrees, so the chart is complete. (b) 0.35 and 140 seniors, 0.25 and 100, 0.25 and 100, 0.15 and 60, totaling 1.00 and 400. (c) They read the 126-degree angle as a count; the count is . (d) Angles are read less accurately than bar lengths, and the pie gives no counts without a stated total.
Problem 5
Two high schools survey their students on how they usually get to school. School A surveyed 480 students and School B surveyed 200. Every student named exactly one method.
| Method | School A | School B |
|---|---|---|
| Bus | 192 | 90 |
| Car | 144 | 50 |
| Walk | 96 | 40 |
| Bike | 48 | 20 |
| Total | 480 | 200 |
(a) Find each school's relative frequency distribution. (b) A district newsletter writes that more students ride the bus at School A, so busing is more popular there. Evaluate it. (c) Compare the two schools on biking, by count and by share. (d) Which display would let a reader compare the two schools fairly?
Show the worked solution
Check both columns first: and , matching the stated survey sizes.
(a) School A, dividing by its own total of 480: bus , car , walk , bike . Check: .
(a) School B, dividing by its own total of 200: bus , car , walk , bike . Check: .
Method School A share School B share Bus 0.40 0.45 Car 0.30 0.25 Walk 0.20 0.20 Bike 0.10 0.10 Total 1.00 1.00 (b) The count is right and the conclusion is not. School A does report more bus riders, 192 against 90, but School A also surveyed 480 students against School B's 200, which is times as many. As a share of its own students, busing is more common at School B: 0.45 against 0.40.
(b) The general point: comparing raw counts across groups of different sizes tells you about the group sizes as much as about the variable. Convert to relative frequencies before comparing.
(c) Biking makes it sharper. School A has 48 bike riders and School B has 20, so A has more than twice as many. Yet and , exactly the same share. Identical shares and very different counts is precisely what the raw numbers hide.
(d) A bar graph of relative frequencies, with School A's and School B's bars side by side for each method. Putting both schools on the same 0 to 1 scale removes the size difference, which is the only thing that made the count comparison mislead. If the question were instead how many buses each school needs, the frequency bar graph would be the right display.
(a) School A: 0.40, 0.30, 0.20, 0.10. School B: 0.45, 0.25, 0.20, 0.10. Both add to 1.00. (b) The count is right, the conclusion is wrong: School A surveyed 2.4 times as many students, and busing is the larger share at School B, 0.45 against 0.40. (c) Bikes: 48 against 20 by count, but 0.10 against 0.10 by share, identical. (d) A side-by-side relative frequency bar graph, which puts both schools on the same scale.
Problem 6
An outdoors club with 150 members runs a survey with one item: "Which of these three activities have you done this year? Check all that apply." The results are hiking 96, climbing 84, and kayaking 60.
(a) Find each activity's count as a share of the 150 members, and add the three shares. (b) Explain why these three categories cannot be drawn as a pie chart of the club's members. (c) The three counts represent 240 checks in total. Draw a pie chart of the checks instead: give each slice's angle, and state precisely what that chart does and does not say. (d) Describe a survey question about these same three activities that would produce a valid pie chart of members.
Show the worked solution
(a) Divide each count by the 150 members. Hiking: . Climbing: . Kayaking: . Their sum is , or 160%.
(b) A pie chart divides one circle into slices whose shares add to exactly 1, which requires the categories to be non-overlapping (each unit in at most one) and exhaustive (each unit in at least one). Neither holds here. The three counts total checks from only 150 members, and if no member had checked more than one box the total could not have exceeded 150, so at least one member is counted in two categories. Shares adding to 1.60 cannot be laid on one circle.
(b) Exhaustiveness fails too: a member who did none of the three activities checked no box and appears in no category, so the slices would not cover the membership even if the overlap were removed.
(c) Change the observational unit from the member to the check. Each of the 240 checks names exactly one activity, so as categories of a check the three are non-overlapping and exhaustive. Shares: , , . Check: .
(c) Angles are the share times 360 degrees: hiking degrees, climbing degrees, kayaking degrees. Check: .
(c) What it says: 40% of the activity checks were for hiking. What it does not say: that 40% of members hiked. That figure is 0.64 from part (a). A member who checked all three boxes contributes three times to this chart and once to the membership, so the two questions have different answers.
(d) Ask something every member answers exactly once, with an option that catches everyone. "Which one of these did you do most often this year: hiking, climbing, kayaking, or none of the three?" gives four non-overlapping categories, and the fourth makes them exhaustive, so the four shares add to 1 and the pie is valid. A second workable version reduces the variable to one yes-or-no question, such as "Did you kayak this year?" with categories yes and no.
(a) 0.64, 0.56, 0.40, adding to 1.60 (160%). (b) The 240 checks came from 150 members, so at least one member is in two categories, and a member who did none of the three is in no category. Overlapping, non-exhaustive categories cannot fill one circle. (c) Of the 240 checks: 0.40 and 144 degrees, 0.35 and 126 degrees, 0.25 and 90 degrees, adding to 1.00 and 360 degrees. It reports the share of checks, not the share of members. (d) A single-answer question with a "none of the three" option, or a yes-or-no question about one activity.
Problem 7
A campus paper surveys 200 students on their main source of news. Each student picks exactly one of four sources, so the four true percentages add to exactly 100%. The paper prints each percentage rounded to the nearest whole percent.
| Source | Social media | News app | Radio | |
|---|---|---|---|---|
| Printed percent | 35% | 30% | 24% | 15% |
(a) Show that this table cannot be a correct rounding of the survey. (b) Rounding to the nearest whole percent, how far off can the printed total be? Give the exact range the printed total has to fall in. (c) The paper reissues the table as counts: social media 70, news app 60, print 48, radio 22. Find the exact relative frequencies, then say which printed percentage was wrong and by how much.
Show the worked solution
(a) Add the printed percentages: , so the table claims 104%. The four sources are non-overlapping and cover every student, so the true percentages add to exactly 100%. A printed total 4 percentage points above that is more than rounding can account for, which part (b) makes precise.
(b) Rounding a value to the nearest whole percent moves it by at most 0.5 percentage points. With four categories, the printed total can therefore differ from the true total by at most percentage points.
(b) The true total is exactly 100%, so the printed total has to land between % and %, inclusive. The printed 104% is outside that window, so at least one of the four numbers is not a correct rounding of its true value.
(c) Check the counts against the stated sample size first: .
(c) Divide each count by 200. Social media: , or 35%. News app: , or 30%. Print: , or 24%. Radio: , or 11%. Check: . These four are exact rather than rounded, since all four counts are even and a count out of 200 is half that count as a percent, so each one lands on a whole percent with nothing to round. An odd count would not: .
(c) Line the two tables up. Social media, news app, and print match the printed figures exactly at 35%, 30%, and 24%. Radio was printed as 15% but is 11%, an error of 4 percentage points, which is exactly the amount by which the printed total overshot 100%.
(a) The printed percentages add to 104%, but four non-overlapping categories covering every student must have true percentages adding to exactly 100%. (b) At most 0.5 percentage points per category, so at most in total: the printed total must fall between 98% and 102% inclusive, and 104% does not. (c) 0.35, 0.30, 0.24, 0.11 from counts 70, 60, 48, 22 out of 200. Radio was printed as 15% but is 11%, a 4 percentage point error.
Problem 8
A high school reports its world language enrollment for three consecutive years. Every enrolled student takes exactly one language.
| Language | Year 1 | Year 2 | Year 3 |
|---|---|---|---|
| Spanish | 160 | 175 | 180 |
| French | 100 | 125 | 150 |
| Mandarin | 60 | 100 | 150 |
| Latin | 80 | 100 | 120 |
| Total | 400 | 500 | 600 |
(a) Build the relative frequency distribution for each year. (b) The department head says Spanish is growing. The student paper says Spanish is losing ground. Can both be right? (c) Which language gained the most share, and by how much? (d) A trustee asks for one bar graph that settles whether Spanish is growing. What do you tell them?
Show the worked solution
Check each column against its stated total: , , and .
(a) Year 1, dividing by 400: Spanish , French , Mandarin , Latin . Sum 1.00.
(a) Year 2, dividing by 500: Spanish , French , Mandarin , Latin . Sum 1.00.
(a) Year 3, dividing by 600: Spanish , French , Mandarin , Latin . Sum 1.00.
Language Year 1 Year 2 Year 3 Spanish 0.40 0.35 0.30 French 0.25 0.25 0.25 Mandarin 0.15 0.20 0.25 Latin 0.20 0.20 0.20 Total 1.00 1.00 1.00 (b) Both are right, because they measure different things. Counted in students, Spanish rose every year: 160, then 175, then 180. As a share of all language students, Spanish fell every year: 0.40, then 0.35, then 0.30.
(b) Why both can happen at once: the total grew from 400 to 600, an increase of , or 50%, while Spanish grew from 160 to 180, an increase of , or 12.5%. A category that grows more slowly than the total loses share even while its count rises.
(c) Compare each language's Year 1 share with its Year 3 share. Spanish went 0.40 to 0.30, a loss of 10 percentage points. French held at 0.25 and Latin held at 0.20, no change. Mandarin went 0.15 to 0.25, a gain of 10 percentage points, the largest gain. Its count went from 60 to 150, which is 2.5 times as many students.
(d) Tell them no single bar graph settles it, because growing has not been defined. A frequency bar graph of Spanish across the three years, at heights 160, 175, and 180, answers how many students take Spanish and shows an increase. A relative frequency bar graph, at heights 0.40, 0.35, and 0.30, answers what share of language students take Spanish and shows a decrease. Both are honest. Ask which question they mean, draw that one, and label the axis so the reader can tell which they are looking at.
(a) Spanish 0.40, 0.35, 0.30; French 0.25, 0.25, 0.25; Mandarin 0.15, 0.20, 0.25; Latin 0.20, 0.20, 0.20; each year sums to 1.00. (b) Yes. Spanish rose in count (160, 175, 180) and fell in share (0.40, 0.35, 0.30), because Spanish grew 12.5% while the total grew 50%. (c) Mandarin, up 10 percentage points from 0.15 to 0.25, with its count rising from 60 to 150. (d) Neither graph alone settles it: the frequency bar graph shows growth, the relative frequency bar graph shows decline, and the trustee has to say which question they mean.