AP Statistics · Topic 1.3 · Reading guide, about 5 min

Counting categories with frequency tables

Build frequency and relative frequency tables for a categorical variable and compare groups using proportions, not raw counts.

In one minute

The simplest way to summarize a categorical variable is to count how many individuals fall in each category. That count, and the same information expressed as a proportion of the total, is the basis for every graph of categorical data in the next topic.

The key skill is knowing when counts are enough and when you need proportions. Counts describe one group well; comparing groups of different sizes needs relative frequencies.

Key terms

Frequency
The number of observations that fall in a category.
Frequency table
A table listing each category of a variable with its frequency.
Relative frequency
The frequency of a category divided by the total number of observations; a proportion between 0 and 1.
Relative frequency table
A table listing each category with its relative frequency, so the values add to 1 (or 100%).
Proportion
A part divided by a whole, written as a decimal, such as 0.400.40.
Percentage
A proportion multiplied by 100 and written with a percent sign, so 0.400.40 is 40%.
Ratio
A comparison of two amounts by division, such as 4 bus riders for every 1 bike rider.

Frequency tables

A frequency table lists the categories of a variable and counts how many observations are in each. The counts add up to the total number of observations, nn. That sum is a useful check: if the counts do not add to nn, you missed or double-counted someone.

Categories should not overlap, and every observation should fit exactly one category. If some responses do not fit, a category such as "other" keeps the total complete.

Relative frequency tables

A relative frequency divides a category's count by the total: relative frequency =count/n= \text{count} / n. The values are proportions between 0 and 1, and they add to 1, apart from small rounding differences. Multiplying by 100 gives percentages that add to about 100%.

Proportions, percentages and relative frequencies are three ways to write the same information. The proportion 0.300.30, the percentage 30% and the relative frequency 30/10030/100 all say the same thing. A ratio can carry the same information in a different form. At School A, 32 of 80 students ride the bus: the proportion is 32/80=0.4032/80 = 0.40, the percentage is 40%, and the ratio of bus riders to students who travel another way is 32:4832 : 48, which simplifies to 2 to 3. Two bus riders for every 3 others means 2 out of every 5 students, and 2/5=0.402/5 = 0.40. A ratio can also compare two categories directly: 32 bus riders to 8 bike riders is 32:832 : 8, or 4 to 1.

Frequency and relative frequency, School A (n = 80)
TransportationFrequencyRelative frequencyPercentage
Bus320.4040%
Car240.3030%
Walk160.2020%
Bike80.1010%
Total801.00100%

Comparing groups: use relative frequencies

Suppose a second school surveys more students and you want to compare. Raw counts mislead when groups differ in size, because a bigger group has bigger counts in almost every category. Relative frequencies put both groups on the same scale, since each is a share of its own total. The rule is simple: compare groups of different sizes with relative frequencies, not raw counts.

When you use counts or proportions to support a claim, quote the numbers and say what they describe. "Riding in a car is the most common way to get to school among the surveyed School B students: 40% ride in a car, compared with 30% by bus, 20% walking and 10% biking" is a claim with evidence in context. A different claim needs different evidence: to say a larger share rides in cars at School B than at School A, compare 40% with 30%.

Worked example

Invented data. School A surveys n=80n = 80 students (the table above). School B surveys n=250n = 250 students: 75 bus, 100 car, 50 walk and 25 bike.

Step 1: check the totals. For School B, 75+100+50+25=25075 + 100 + 50 + 25 = 250, which matches nn. For School A, 32+24+16+8=8032 + 24 + 16 + 8 = 80.

Step 2: compute School B's relative frequencies. Bus: 75/250=0.3075/250 = 0.30. Car: 100/250=0.40100/250 = 0.40. Walk: 50/250=0.2050/250 = 0.20. Bike: 25/250=0.1025/250 = 0.10. These add to 1.001.00.

Step 3: compare. Raw counts say 100 car riders at School B versus 24 at School A, which looks like a huge difference. But School B surveyed over three times as many students. The relative frequencies are 0.400.40 and 0.300.30, so the real difference is 10 percentage points.

Step 4: conclude in context. "Among the students surveyed, a larger share at School B ride in cars (40%) than at School A (30%). Walking (20%) and biking (10%) have the same share at both schools, while School A has more bus riders (40% versus 30%)." Because these come from samples, the percentages describe the surveyed students; they are only estimates of each school.

How it connects

  • Back to 1.2: a frequency table summarizes a categorical variable; quantitative variables are summarized differently starting at 1.5.
  • Forward to 1.4: bar charts and pie charts are pictures of these same tables.
  • Forward to 2.1: two-way tables extend frequency tables to two categorical variables at once.

Common mistakes

  • Comparing raw counts across groups of different sizes. Switch to relative frequencies before comparing.
  • Dividing by the wrong total. Divide each count by the total number of observations in that group, not by another category.
  • Leaving out units or context. A proportion needs a statement of what it is a proportion of.
  • Letting relative frequencies fail to add up. They should sum to 1 apart from rounding; if they do not, recheck.

How it shows up on the exam

  • You are given counts for a categorical variable and asked to find relative frequencies or percentages.
  • A question gives data for two groups of different sizes and asks which group has the larger share, requiring you to justify with proportions.
  • A written response asks you to support a claim using counts or proportions from a table, in context.

Check yourself

  1. A frequency table has counts 18, 12, 6 and 4. What is nn, and what is the relative frequency of the first category?
  2. Why is 30 of 60 not the same evidence as 40 of 200 for deciding which group has a larger share?
  3. How are the proportion 0.250.25, the percentage 25% and the ratio 1 to 3 related?

Practice this topic. AP Practice questions on exactly what this lesson covers, with an explanation for every answer.