From the free course AP Statistics on Lykke
1.3 Tabular Representation and Summary Statistics for One Categorical Variable
Key concepts: Frequency table — the count of observational units in each category · Relative frequency table — the proportion of units in each category · Proportion, percentage and ratio all carry the same information · Relative frequencies of all categories add to 1, or 100% · Comparing unequal-sized groups needs proportions, not raw counts · Justifying a claim about a categorical variable in context
Raw data is often a chaotic stream of labels—"Red," "Blue," "Red," "Green"—that offers little insight until it is structured. For a categorical variable, the primary goal of analysis is to determine how often each category occurs within a data set.
Raw data is often a chaotic stream of labels—"Red," "Blue," "Red," "Green"—that offers little insight until it is structured. For a categorical variable, the primary goal of analysis is to determine how often each category occurs within a data set. By condensing individual observations into a frequency table, we transform a list of names into a distribution that reveals the "shape" of the categorical data: which outcomes are common, which are rare, and how they relate to the whole.
Organizing Counts: The Frequency Table (UNC-1.B)
The most fundamental summary of a categorical variable is the frequency, which is simply the count of individuals that fall into a specific category. When we list every possible category alongside its corresponding count, we have constructed a frequency table (Skill 3.A). This table serves as the bedrock for all subsequent categorical analysis, ensuring that no individual datum is lost while making the overall pattern visible.
Consider a study of 50 commuters and their primary mode of transportation. The raw data might be a messy spreadsheet, but a frequency table provides immediate clarity:
| Transportation Mode | Frequency (Count) |
|---|---|
| Personal Vehicle | 32 |
| Public Transit | 10 |
| Bicycle | 5 |
| Walking | 3 |
| Total | 50 |
Proportions and Percentages: Relative Frequency (UNC-1.B)
While counts are useful for understanding a single group, they are difficult to compare across groups of different sizes. To solve this, we use relative frequency, which is the proportion or percentage of the total observations that fall into a category. To calculate a relative frequency, you divide the frequency of a category by the total number of individuals in the data set ($n$).
Relative frequencies allow us to make "apples-to-apples" comparisons. Saying "10 people used public transit" is less informative than saying "20% of commuters used public transit." The latter provides a sense of scale and importance relative to the entire population being studied.
Summary Statistics for Categorical Data (UNC-1.C)
Unlike quantitative data, where we calculate means and standard deviations, the summary statistics for categorical variables are limited to frequencies and relative frequencies (Skill 4.A). We describe the distribution by identifying the mode—the category with the highest frequency—and by noting the relative "weight" of each group.
When interpreting these statistics, precision in language is vital. A statistical description should always include:
- The category name (e.g., "Personal Vehicle").
- The numerical value (e.g., "32" or "64%").
- The context (e.g., "of the 50 commuters surveyed").
Misconception Check: The "Average" Category
A common error is attempting to calculate a "mean" for categorical data that uses numbers as labels. For example, if you are analyzing a data set of Zip Codes (e.g., 90210, 60601), calculating the average Zip Code is mathematically possible but statistically meaningless. A Zip Code is a categorical variable; the "average" location does not exist in the way a mean height or weight does. For these variables, you must stick to frequencies and the mode.
Contextual Application: App Usage
Imagine a developer tracks which feature 200 users click first when opening a fitness app. They find that 120 users click "Start Workout," 50 click "View Progress," and 30 click "Settings."
To describe this distribution (Skill 4.A), the developer would report that the mode is "Start Workout," which accounts for a relative frequency of 0.60 (or 60%). They might observe that "Settings" is the least frequent initial action, representing only 15% of the users. This tabular summary directly informs the developer that the majority of their audience uses the app for its primary functional purpose immediately upon launch.
In-Flow Interpretation Check A survey of 80 students identifies their favorite lunch option: 40 choose Pizza, 20 choose Tacos, 15 choose Salad, and 5 choose "Other."
- What is the relative frequency of students who prefer Tacos?
- Identify the mode of this distribution.
Response Check:
- $20 / 80 = 0.25$ (or 25%).
- The mode is Pizza (the category with the highest frequency of 40).
