AP STATISTICS • EXPLORING ONE-VARIABLE DATA

Representing a Categorical Variable with Tables

How frequency and relative frequency tables transform raw categorical data into interpretable summaries for statistical analysis.

Historical Context & Motivation

Long before the advent of modern statistical software, researchers and governments faced a fundamental challenge: how to organize and make sense of large collections of observations that fell into distinct groups rather than along a numerical continuum. Census data, medical records, and trade inventories all required a method for tallying counts across named categories—a need that gave rise to the frequency table. The intellectual lineage of tabulating categorical data stretches back centuries, reflecting humanity's enduring need to compress raw information into structured summaries that reveal patterns at a glance.

1662
Graunt's Bills of Mortality
John Graunt published Natural and Political Observations Made upon the Bills of Mortality, tabulating London deaths by cause—one of the earliest systematic uses of categorical frequency tables to draw demographic conclusions.
1786
Playfair's Statistical Graphics
William Playfair introduced bar charts and pie charts, but his visual innovations were built upon underlying frequency tables that organized trade and economic data by categorical groupings such as country and commodity.
1900
Pearson's Chi-Square Test
Karl Pearson formalized the chi-square goodness-of-fit test, which relies on comparing observed frequencies in a table against expected frequencies—cementing the frequency table as a foundational tool of inferential statistics.
2000s
Modern Data Science
With the explosion of digital data, frequency and relative frequency tables became standard first steps in exploratory data analysis (EDA), automated within tools like R, Python, and TI-84 calculators used on the AP Statistics exam.

The central question that motivates this topic is deceptively simple: given a dataset of categorical responses—such as political party affiliation, blood type, or preferred mode of transportation—how do we summarize the distribution in a way that communicates both the count structure and the proportional makeup? The answer lies in constructing well-organized frequency tables and relative frequency tables, which form the bedrock of categorical data analysis on the AP Statistics exam and in professional practice.

Core Principles & Definitions

Before constructing any table, it is essential to distinguish between the two fundamental types of variables in statistics. A categorical variable (also called a qualitative variable) places each individual into one of several groups or categories; arithmetic operations on these labels are meaningless. Examples include eye color, zip code (despite being numeric in appearance), and college major. In contrast, a quantitative variable takes numerical values for which operations such as averaging make sense. Representing categorical variables with tables is the primary method for describing their distribution—a term that, in the AP Statistics framework, refers to the pattern of values a variable takes and how often it takes them.

1

Categorical Variable

A variable whose values are labels or group names rather than numbers. The categories may be unordered (nominal) or naturally ordered (ordinal). Example: class year (Freshman, Sophomore, Junior, Senior).
2

Frequency Table

A table listing each category alongside the count of observations that fall into it. The sum of all frequencies equals the total sample size n.
3

Relative Frequency Table

A table listing each category alongside its proportion (or percentage) of the total. Relative frequency = frequency ÷ n. All relative frequencies sum to 1 (or 100%).
4

Distribution of a Variable

Describes what values a variable takes and how often it takes them. For categorical data, the distribution is fully captured by a frequency or relative frequency table.
KEY TAKEAWAY
Think of a frequency table as a mail-sorting operation. Imagine a postal worker with a stack of letters and a row of labeled bins—one per zip code. Each letter goes into exactly one bin, and at the end you simply count the contents of each bin. The counts are your frequency table; dividing each count by the total number of letters gives the relative frequency table. The bins are exhaustive (every letter has a destination) and mutually exclusive (no letter ends up in two bins), which are the exact properties every set of categories must satisfy.

Visual Explanation — From Raw Data to Table

The following diagram illustrates the process of converting raw categorical data into a frequency table. On the left, you see a collection of 20 raw observations representing the favorite subject reported by students in a survey. On the right, the same information appears in a neatly organized table with counts and proportions. The arrows between the two representations emphasize the tallying process—each observation is sorted into its corresponding category.

The left panel shows 20 raw categorical responses. The arrow represents the tallying process, and the right panel shows the resulting frequency table with both counts and relative frequencies. Notice that the frequencies sum to n = 20 and the relative frequencies sum to 1.00—two essential checks for any valid table.

Several features of this diagram merit attention. First, every observation from the raw data appears in exactly one row of the table—categories must be mutually exclusive (no observation belongs to two categories) and exhaustive (every observation has a category). Second, the relative frequency column converts raw counts into proportions that facilitate comparison across samples of different sizes. Third, the two check conditions at the bottom—frequencies summing to n and relative frequencies summing to 1—serve as verification steps you should always perform when constructing or interpreting a table on the AP exam.

Mathematical Framework

Although categorical data analysis does not involve the same algebra as quantitative methods, there is a clean mathematical structure underlying frequency and relative frequency tables. Let a categorical variable have k distinct categories labeled C₁, C₂, …, Ck in a sample of size n. We denote the frequency of category i as fi and the corresponding relative frequency as p̂i. The equations below formalize the relationships.

RELATIVE FREQUENCY
p̂ᵢ = fᵢ / n
where fi is the count of observations in category i and n is the total sample size.
FREQUENCY SUM CONSTRAINT
f₁ + f₂ + … + fₖ = n
The sum of all category frequencies must equal the total number of observations. This constraint verifies that no observations were lost or double-counted.
RELATIVE FREQUENCY SUM CONSTRAINT
p̂₁ + p̂₂ + … + p̂ₖ = 1
Equivalently, all relative frequencies sum to 1 (or 100% if expressed as percentages). Due to rounding, the sum may appear as 0.99 or 1.01; this is acceptable on the AP exam but should be noted.
PERCENTAGE CONVERSION
Percentage = p̂ᵢ × 100%
To express a relative frequency as a percentage, multiply the proportion by 100. For instance, a relative frequency of 0.40 corresponds to 40%.
Rounding Caution
On the AP exam, rounding relative frequencies to two or three decimal places is standard practice. However, if you round each proportion individually before summing, the total may differ slightly from 1.00. The College Board expects you to acknowledge this discrepancy—state 'Due to rounding, percentages do not sum to exactly 100%'—rather than force the numbers to add up by altering one entry.

Detailed Breakdown — Types of Categorical Tables

While the AP Statistics curriculum focuses primarily on one-variable frequency tables and relative frequency tables, it is important to understand how these structures relate to the broader family of categorical data displays. The diagram below classifies the main table types you will encounter, distinguishing between one-way tables (which describe a single categorical variable) and two-way tables (which explore the relationship between two categorical variables). Though two-way tables are treated in depth in a later unit on bivariate categorical data, understanding the taxonomy now helps you see where one-variable tables fit within the larger framework.

This taxonomy shows how one-way frequency and relative frequency tables (highlighted in the dashed box) relate to the broader family of categorical data tables. Two-way tables, which include joint and marginal distributions, are explored in later units dealing with bivariate categorical data.

The distinction between a frequency table and a relative frequency table is not merely cosmetic. A frequency table preserves the raw count information necessary for computing test statistics such as chi-square, while a relative frequency table enables direct comparisons across datasets of different sizes. For instance, knowing that 120 out of 400 respondents prefer Brand A and 45 out of 150 respondents prefer Brand A in a second survey is harder to compare than seeing 0.30 versus 0.30—the relative frequency table immediately reveals that both groups share the same proportion. In AP Statistics free-response questions, you may be asked to construct either type of table and to justify which representation is more appropriate for a given context.

Worked Example — Transportation Survey

A university researcher surveys 250 students about their primary mode of transportation to campus. The raw data are compiled into the following unorganized list: Car (92), Bus (68), Bicycle (45), Walk (30), Other (15). Construct a frequency table and a relative frequency table, and identify the mode of the distribution.

Constructing Frequency and Relative Frequency Tables
1
Step 1 — Identify the Variable and CategoriesThe categorical variable is primary mode of transportation. The five categories are: Car, Bus, Bicycle, Walk, and Other. Each student falls into exactly one category, satisfying the mutually exclusive and exhaustive requirement.
2
Step 2 — Record FrequenciesList each category alongside its count: Car = 92, Bus = 68, Bicycle = 45, Walk = 30, Other = 15.
3
Step 3 — Verify the Frequency SumCheck: 92 + 68 + 45 + 30 + 15 = 250, which matches the stated sample size n = 250. ✓
Sum of frequencies = 250 ✓
4
Step 4 — Compute Relative FrequenciesDivide each frequency by n = 250. Car: 92 ÷ 250 = 0.368, Bus: 68 ÷ 250 = 0.272, Bicycle: 45 ÷ 250 = 0.180, Walk: 30 ÷ 250 = 0.120, Other: 15 ÷ 250 = 0.060.
5
Step 5 — Verify Relative Frequency SumCheck: 0.368 + 0.272 + 0.180 + 0.120 + 0.060 = 1.000. ✓ No rounding discrepancy in this case.
Sum of relative frequencies = 1.000 ✓
6
Step 6 — Present the Completed TableThe table should include all three columns: Category, Frequency, and Relative Frequency, with a Total row at the bottom.
7
Step 7 — Identify the ModeThe mode of a categorical distribution is the category with the highest frequency. Here, Car has the highest frequency (92), so Car is the modal category.
Mode = Car (frequency 92, relative frequency 0.368 or 36.8%)
Completed frequency and relative frequency table for the transportation survey.
Transportation ModeFrequencyRelative FrequencyPercentage
Car920.36836.8%
Bus680.27227.2%
Bicycle450.18018.0%
Walk300.12012.0%
Other150.0606.0%
Total2501.000100.0%

Strengths & Limitations of Categorical Tables

Frequency and relative frequency tables are deceptively simple tools, but like all statistical representations, they come with trade-offs. Understanding these strengths and limitations is critical not only for the AP exam—where free-response questions may ask you to justify your choice of display—but also for professional statistical practice.

Strengths and limitations of frequency and relative frequency tables for categorical data.
FeatureStrengthsLimitations
PrecisionExact counts and proportions are displayed; no information is lost from the original data.Large tables with many categories can be difficult to scan quickly; patterns are less visually obvious than in a bar chart.
ComparabilityRelative frequency tables allow direct comparison across groups with different sample sizes.Relative frequencies alone hide the original sample size, which is needed for inference.
SimplicityEasy to construct by hand or with a calculator; minimal computational burden.Cannot show relationships between two variables—only one variable at a time.
Foundation for InferenceFrequency tables serve as the input for chi-square tests, confidence intervals for proportions, and other inferential procedures.Tables alone do not indicate whether observed differences are statistically significant; formal tests are still needed.
KEY TAKEAWAY
A frequency table is like an inventory ledger in a warehouse. It tells you exactly how many units of each product are in stock (frequency) and what percentage of total inventory each product represents (relative frequency). It is precise and foundational, but if you want to spot trends over time or compare across warehouses, you will need additional tools such as charts and statistical tests. On the AP exam, always present both the counts and the proportions to give a complete picture—and always report the sample size n alongside any relative frequency table.

Connection to Advanced Topics

The one-variable frequency table you master now is not an isolated skill—it serves as the conceptual and computational foundation for several major topics later in the AP Statistics curriculum. Understanding how this basic structure scales up will help you approach those units with greater confidence and see the curriculum as a coherent whole rather than a collection of disjointed techniques.

How one-way categorical table concepts extend to advanced AP Statistics topics.
One-Way Table ConceptAdvanced ExtensionWhere in AP Curriculum
Frequency table for one variableTwo-way (contingency) table for two categorical variables with joint, marginal, and conditional distributionsUnit 2: Exploring Two-Variable Data
Relative frequency as proportion p̂Sampling distribution of p̂; confidence intervals and hypothesis tests for a single proportionUnits 6–7: Inference for Proportions
Observed frequencies fᵢChi-square goodness-of-fit test comparing observed vs. expected frequenciesUnit 8: Chi-Square Tests
Categories must be mutually exclusive and exhaustiveSample space partitioning in probability; addition rule for mutually exclusive eventsUnit 4: Probability

In particular, the leap from a one-way frequency table to a chi-square goodness-of-fit test is remarkably direct. In that test, you construct a table of observed frequencies (exactly the table you build now), place a set of expected frequencies next to it (derived from a hypothesized model), and compute a test statistic that measures the discrepancy between the two. Without a thorough understanding of how to build and interpret a frequency table, the mechanics of the chi-square test will feel opaque. Similarly, the relative frequency of a category is a sample proportion—the very quantity around which confidence intervals and hypothesis tests for proportions are built in later units.

Practice Problems

1
A researcher records the eye color of 200 participants. Which of the following best describes why the researcher should use a relative frequency table rather than only a frequency table when comparing results with a second study that surveyed 500 participants?
2
A survey of 500 college students asked about their class year. The frequency table shows: Freshman = 145, Sophomore = 130, Junior = 120, Senior = 105. What is the relative frequency for Juniors?
3
A partial relative frequency table for preferred streaming service among 800 subscribers is shown below: Service A: 0.35 Service B: 0.25 Service C: ? Service D: 0.10 Service E: 0.08 What is the frequency (count) of subscribers who prefer Service C?
PROBLEM 4APPLIED
A public health researcher surveys 1,200 adults about their vaccination status for a new vaccine. The results are: Fully Vaccinated (528), Partially Vaccinated (264), Unvaccinated (312), Declined to Answer (96). (a) Construct a relative frequency table showing proportions rounded to three decimal places. (b) The researcher wants to compare these results with a national study of 50,000 adults that found 48% fully vaccinated, 20% partially vaccinated, 27% unvaccinated, and 5% declined to answer. Explain which type of table (frequency or relative frequency) is more appropriate for this comparison and why. (c) Do the relative frequencies from this sample suggest a different distribution from the national study? Justify your answer by comparing specific proportions. (d) Identify one limitation of using a one-way table alone to draw conclusions about vaccination behavior.
PROBLEM 5CRITICAL THINKING
A political polling firm surveys registered voters in two different states about party affiliation. In State X (n = 600), the results are: Democrat = 234, Republican = 204, Independent = 108, Other = 54. In State Y (n = 1,500), the results are: Democrat = 510, Republican = 555, Independent = 300, Other = 135. (a) Construct relative frequency tables for both states, rounding to three decimal places. Each table should include category names and a total row. (b) A news reporter claims, "State Y has more Democrats than State X because 510 > 234." Explain the statistical flaw in this reasoning, and use the relative frequency tables from part (a) to provide a more accurate comparison. (c) One analyst proposes combining the data from both states into a single frequency table. Under what conditions would this be appropriate, and under what conditions would it be misleading? Discuss at least two considerations. (d) Suppose a third state has results reported only as percentages: Democrat = 42%, Republican = 31%, Independent = 19%, Other = 8%. These sum to 100%. Can you determine the frequency of Democrats in this third state? Explain why or why not, and discuss the implication for the completeness of relative frequency tables.

Summary & Review

A categorical variable assigns each individual to a named group or category rather than a numerical value. The distribution of a categorical variable describes what values it takes and how often it takes them. A frequency table lists each category alongside its count (fᵢ), and the counts must sum to the total sample size n. A relative frequency table replaces counts with proportions (p̂ᵢ = fᵢ ÷ n), all of which must sum to 1. Relative frequency tables are essential when comparing distributions across groups with different sample sizes.

When constructing or reading these tables, always verify the two sum constraints (frequencies sum to n, relative frequencies sum to 1), acknowledge any rounding discrepancies, and confirm that categories are mutually exclusive and exhaustive. The mode of a categorical distribution is the category with the highest frequency. These one-way table skills form the foundation for two-way tables, chi-square tests, and inference for proportions later in the AP Statistics curriculum.

Varsity Tutors • AP Statistics • Representing a Categorical Variable with Tables