Tutorials › Introduction to Statistics › Frequency Tables for Categorical Data

Graphs for Categorical Data · Tutorial 102 of 996

Frequency Tables for Categorical Data

Build and check frequency tables that show both the number and the proportion of observations in each category.

Beginner 9 min read

What You'll Learn

  • Distinguish category frequencies from relative frequencies
  • Choose a clear denominator for a table
  • Organize hypothetical campus-survey responses into a frequency table
  • Convert counts to proportions and percentages
  • Check category labels, totals, and rounding
  • Explain how missing responses affect a table

Why Use a Frequency Table?

A list of categorical responses can be difficult to summarize by inspection. A frequency table makes the pattern easier to read by showing each category and how many observations fall into it. Adding relative frequencies shows what share of the observations each category represents. Together, these columns answer two different questions: “How many?” and “What proportion?”

This tutorial focuses on one categorical variable at a time. A table can summarize the recorded responses, but it does not by itself explain why people gave those responses or support a claim about people who were not observed. The interpretation depends on what was counted and which observations make up the denominator.

Definition: A frequency is the number of observations assigned to a category. A relative frequency is that category’s frequency divided by the total number of observations included in the table. Relative frequencies may be reported as proportions, decimals, or percentages.

Building the Table

Before calculating, define the variable and the set of observations to be summarized. The categories should be clear enough that a response can be assigned consistently. For a complete table of valid responses, each observation should belong to exactly one category, and the categories together should cover all valid responses. These conditions make the categories mutually exclusive and collectively exhaustive for the data being tabulated.

A basic frequency table has one row per category and a frequency column. A relative-frequency column can be added by dividing each category’s frequency by the total number of observations included. If there are \(n\) included observations and the frequency for category \(i\) is \(f_i\), then its relative frequency is \(f_i/n\). Multiply by 100 to express it as a percentage.

$$ \text{Relative frequency for category }i = \frac{f_i}{n} \qquad \text{Percentage for category }i = \frac{f_i}{n}\times 100\% $$

The row labels should identify the categories rather than leave the reader to guess what a code means. Include units or a short description where needed, and state the total used as the denominator. A total row is useful: frequencies should add to the number of included observations, and relative frequencies should add to 1 (or 100%) before rounding.

Worked Example: Commute Modes in a Campus Survey

Suppose a hypothetical campus survey asks 20 students, “How did you travel to campus today?” Each student gives one valid response. The responses are: bus, walk, car, bus, bike, bus, walk, car, bus, walk, bike, bus, car, bus, walk, car, bus, bike, car, bus. Construct a frequency and relative-frequency table.

Step 1: Identify the observations and categories. The observations are the 20 students’ answers to this question. The categories are bus, walk, bike, and car. Each answer is assigned to one category only.

Step 2: Count responses. Counting the list gives 8 bus responses, 4 walk responses, 3 bike responses, and 5 car responses. The count check is \(8+4+3+5=20\), matching the number of students.

Step 3: Divide each count by 20. For bus, for example, the relative frequency is \(8/20=0.40\), or \(40\%\). The same calculation gives \(4/20=0.20\) for walk, \(3/20=0.15\) for bike, and \(5/20=0.25\) for car.

Travel modeFrequencyRelative frequencyPercentage
Bus80.4040%
Walk40.2020%
Bike30.1515%
Car50.2525%
Total201.00100%

The table says that 8 of these 20 respondents reported traveling by bus, which is 40% of the responses included. It does not establish that 40% of all students at the campus traveled by bus; that broader claim would require an appropriate basis for generalizing beyond these 20 responses.

Why the Relative Frequencies Add to One

The total check follows from the way relative frequencies are defined. If every included observation belongs to exactly one listed category, adding the category frequencies counts every observation once and only once. Thus the sum of the frequencies is \(n\). Dividing each frequency by the same \(n\) gives the corresponding result for relative frequencies.

$$ \sum_{i=1}^{k} f_i=n \qquad\Longrightarrow\qquad \sum_{i=1}^{k}\frac{f_i}{n} = \frac{\sum_{i=1}^{k}f_i}{n} = \frac{n}{n} = 1 $$

Here \(k\) is the number of categories in the table. The implication depends on the categories covering all included observations without overlap. If a response can be counted in two categories, or a valid response has no category, the frequency total will not correctly represent the included observations.

Worked Example: Making the Denominator Explicit

Suppose a hypothetical survey asks 18 students where they most often study on campus. Two students do not answer, and the 16 valid responses are classified as Library: 7, Dormitory: 5, and Other campus location: 4. Construct a table for valid answers and explain its denominator.

The question is about the distribution of valid answers, so the denominator is 16, not 18. The counts sum to \(7+5+4=16\). The relative frequency for Library is \(7/16=0.4375\), or \(43.75\%\). For Dormitory it is \(5/16=0.3125\), or \(31.25\%\); for Other campus location it is \(4/16=0.25\), or \(25\%\).

Study locationFrequencyRelative frequencyPercentage
Library70.437543.75%
Dormitory50.312531.25%
Other campus location40.250025.00%
Total valid answers161.0000100.00%

These percentages describe the distribution among the 16 students who answered. The two unanswered cases are not part of this table’s denominator, so the table does not show the response rate. If the goal were also to report how many students did not answer, a separate “No response” count could be shown, with the denominator and purpose made explicit. That category should not be mixed into a table described as the distribution of valid study-location answers.

Precision, Totals, and Clear Labels

A table should preserve enough precision to represent its calculations without implying more certainty than the data support. Frequencies are whole-number counts. Relative frequencies can be displayed with a consistent number of decimal places, and percentages can be rounded consistently. When values are rounded, their displayed sum may differ slightly from 1 or 100%. This does not necessarily indicate an error; check the unrounded calculations and the frequency total.

Worked Example: Checking a Rounded Percentage Column

In a hypothetical survey, 28 students each name one preferred campus activity. The counts are: sports, 9; music events, 7; clubs, 6; volunteering, 4; and other, 2. Calculate relative frequencies and report percentages to one decimal place.

The frequency check is \(9+7+6+4+2=28\). Divide each count by 28, then multiply by 100 for the percentage. For sports, \(9/28=0.3214\) to four decimal places, so the percentage is \(32.1\%\) to one decimal place. The same process gives music events \(7/28=0.2500=25.0\%\), clubs \(6/28=0.2143=21.4\%\), volunteering \(4/28=0.1429=14.3\%\), and other \(2/28=0.0714=7.1\%\).

Preferred activityFrequencyRelative frequency (4 decimals)Percentage (1 decimal)
Sports90.321432.1%
Music events70.250025.0%
Clubs60.214321.4%
Volunteering40.142914.3%
Other20.07147.1%
Total281.000099.9%

The displayed percentages total \(99.9\%\) because each category’s percentage has been rounded to one decimal place. The unrounded percentages total 100%, as the counts total 28 and each relative frequency uses the same denominator. A note such as “Percentages may not sum to 100% because of rounding” prevents readers from mistaking this small discrepancy for a missing response.

Common Mistakes and Checks

A frequency table is simple to calculate, but small choices can change what it communicates. Before sharing one, check the response definition, category labels, denominator, and arithmetic.

  • Using the wrong denominator. If the table summarizes valid answers, divide by the number of valid answers, not automatically by everyone invited or surveyed. State which total is used.
  • Counting a response more than once. For a single-response question, each observation should contribute to exactly one category. If the question allowed multiple selections, say so; category counts may then sum to more than the number of respondents, and the usual relative-frequency total of 1 will not apply when dividing by respondents.
  • Leaving categories unclear. Use labels readers can understand, and ensure each valid response can be assigned consistently. Data-cleaning decisions about inconsistent labels should be made explicit where they affect the categories.
  • Treating rounded totals as exact. A displayed percentage total such as 99.9% can result from rounding. Recheck the counts and unrounded relative frequencies before changing values to force a displayed total of 100%.
  • Overstating what the table shows. A table describes the observations included. Do not present the sample’s percentages as population percentages unless the study design justifies that interpretation.

Frequency and relative-frequency tables are useful because they provide a compact, auditable summary of categorical data. Frequencies preserve the actual counts, while relative frequencies make the distribution interpretable as shares of a clearly defined total. Reporting both, with an explicit denominator and clear labels, lets readers check the arithmetic and understand exactly what is being summarized.

Check Your Understanding

For each question, pay attention to the category definitions and the denominator.

  1. A hypothetical survey records 30 students’ preferred campus café: 12 choose North, 10 choose Central, and 8 choose South. Find each relative frequency and verify the total.
  2. In a survey of 25 students, 20 provide a valid response. If a frequency table summarizes only the valid responses, what should its frequency total and relative-frequency denominator be?
  3. Explain why the frequencies in a one-response-per-student table should add to the number of valid responses.
  4. A table’s displayed percentages add to 100.1%. Give one reason this may happen and one check to make before concluding there is an error.
  5. A question allows each student to select every campus service they use. Why might the category counts add to more than the number of students?