Categorical Data Tables
Categorical data consists of observations that fall into distinct groups or categories — such as favourite colour, type of transport used to school, or blood type. Unlike numerical data, categorical values cannot be meaningfully averaged or ordered; instead, we summarise them by counting how often each category appears. The two most fundamental tools for organising this information are the frequency table and the proportion (relative frequency) table. A frequency table lists every category alongside the number of times it was observed in the dataset, called its frequency. Once frequencies are recorded, we can convert each count into a proportion by dividing by the total number of observations. Proportions (and their percentage equivalents) allow us to compare distributions even when two datasets have different total sizes — for example, comparing survey results from a class of 25 students with results from a school of 400. Mastering categorical data tables is the entry point to almost all of statistics. From these simple summaries, you can construct bar charts, pie charts, and two-way tables, and you can begin to ask deeper questions: Are certain categories more common than expected? Do two categorical variables appear to be related? Building the table correctly — labelling categories, recording counts accurately, and checking that everything sums to the total — is the disciplined first step.
- Identify and List All Categories
- Tally the Frequencies
- Calculate Relative Frequencies (Proportions)
- Convert to Percentages (Optional)
- Check Your Work and Add Totals Row
Identify and List All Categories
Before tallying, write down every distinct value (category) that appears in the dataset. For example, if students were asked their preferred sport — Football, Basketball, Swimming, or Other — list all four. Make sure categories are mutually exclusive (no overlap) and exhaustive (every observation fits into exactly one category).
Tally the Frequencies
Go through each observation and add 1 to the count for the matching category. Using tally marks (groups of five) helps avoid errors. The frequency f_i for category i is simply the count of observations in that category. When finished, the frequencies must sum to n, the total number of observations: f_1 + f_2 + ... + f_k = n.
Calculate Relative Frequencies (Proportions)
Divide each frequency by the total n to obtain the relative frequency (proportion) p_i = f_i / n. Each proportion is a number between 0 and 1 inclusive. The sum of all proportions must equal exactly 1 (small rounding discrepancies of ±0.01 are acceptable when rounding to two decimal places).
Convert to Percentages (Optional)
Multiply each proportion by 100 to express it as a percentage: % i = (f_i / n) × 100. Percentages are often easier to communicate to a general audience. The percentages must sum to 100% (again allowing for small rounding differences).
Check Your Work and Add Totals Row
Always include a totals row at the bottom of the table. The frequency total should equal n, the proportion total should equal 1.00, and the percentage total should equal 100%. If any of these checks fail, re-examine your tally for errors. A well-presented table has clear column headings: Category | Frequency | Relative Frequency | Percentage.
The Key Equation
- p_i — Relative frequency (proportion) (dimensionless (0 to 1)): The fraction of all observations that belong to category i.
- f_i — Frequency (count): The number of observations that fall into category i.
- n — Total observations (count): The total number of data values collected, equal to the sum of all frequencies: n = \sum_{i=1}^{k} f_i.
Worked Example
Problem. A class of 30 students was asked: 'How do you usually travel to school?' The responses were recorded as: Bus (12), Walk (8), Car (7), Cycle (3). Construct a complete frequency and proportion table, including a percentage column. Verify your totals.
Answer. The most common mode of travel is Bus (40%), followed by Walking (26.7%), Car (23.3%), and Cycling (10%). All frequency, proportion, and percentage totals verify correctly.
Origins · 1 minKarl Pearson and how this was discovered
Karl Pearson was a founding figure of modern mathematical statistics. He developed the chi-squared test (1900), which uses frequency tables for categorical data to assess whether observed counts differ significantly from expected counts. He also coined the term 'histogram' and introduced the correlation coefficient, laying the groundwork for how we analyse both categorical and numerical data today. Pearson was so passionate about statistics that he founded the world's first university statistics department at University College London in 1911, and edited the journal Biometrika for 35 years without interruption.
Related Concepts
- Bar Charts for Categorical Data — Bar charts are the primary graphical display of frequency or proportion tables; each bar's height represents a category's frequency or proportion directly from the table.
- Two-Way (Contingency) Tables — Two-way tables extend categorical data tables to cross-classify two categorical variables simultaneously, enabling analysis of relationships between categories.
- Pie Charts — Pie charts use the proportions calculated in a relative frequency table to determine the angle of each sector: angle = proportion × 360°.
- Chi-Squared Goodness-of-Fit Test — This hypothesis test compares observed frequencies from a categorical table with theoretically expected frequencies to determine whether a claimed distribution fits the data.