Categorical data Knowledge-Based Study
Math topic explanations on Categorical data.
Study notes
Understanding Categorical Data
In statistics, variables are broadly classified based on the nature of the information they describe. Categorical data (also referred to as qualitative data) consists of values that represent characteristics, qualities, or attributes. Instead of measuring a quantity, categorical data places each observation into one of two or more distinct groups or categories.
Everyday Examples
- Eye color: Brown, Blue, Green, Hazel
- Preferred mode of transportation: Bicycle, Bus, Car, Train, Walking
- Binary responses: Yes/No, True/False
A simple test to determine whether a variable is categorical is to ask: Does calculating a standard arithmetic average make physical sense? If computing a numerical mean is meaningless, the variable is categorical.
Two Subtypes of Categorical Data
Categorical data is further categorized into two principal types depending on whether an inherent order exists among the categories.
1. Nominal Data
Nominal data consists of categories that have no natural order, rank, or hierarchy. One category is not inherently higher or lower than another.
- Examples: Blood type (A, B, AB, O), nationality, marital status, color preferences.
- Key feature: Rearranging the order in which the categories are listed does not alter the mathematical meaning of the data.
2. Ordinal Data
Ordinal data consists of categories that follow a clear, natural sequence or ranking.
- Examples: Clothing size (Small, Medium, Large, Extra Large), customer satisfaction ratings (Unsatisfied, Neutral, Satisfied), educational attainment (High School, Bachelor's, Master's, Doctorate).
- Key feature: Although there is a definite order, the difference or distance between consecutive categories is not precisely measurable or uniform. For instance, the difference between "Neutral" and "Satisfied" cannot be measured in fixed numerical units.
Summarizing Categorical Data
Because categorical data cannot be added or averaged, it is summarized by counting occurrences within each category.
Frequency and Relative Frequency Tables
- Frequency: The raw count of observations falling into a specific category.
- Relative Frequency: The proportion or percentage of total observations belonging to that category, calculated as:
Graphical Displays
Categorical distributions are typically displayed using two common types of graphs:
- Bar Charts: Rectangular bars represent the frequency or relative frequency of each category. A crucial convention is leaving distinct gaps between adjacent bars to emphasize that the categories are separate and non-continuous.
- Pie Charts: A circular chart divided into sectors, where each sector's angle and area are proportional to that category's relative frequency.
Avoiding Common Classification Errors
Distinguishing categorical data from numerical data requires careful examination of how values function in context.
Numbers Used as Labels
A frequent misconception is assuming that any dataset recorded in digits must be quantitative. In many situations, numbers serve purely as identifiers or categorical labels:
- Postal / ZIP Codes: A ZIP code such as 90210 represents a geographic zone, not a measured quantity. Computing an average ZIP code produces an uninterpretable value.
- Jersey Numbers: An athlete wearing number 24 does not have twice as much of an attribute as an athlete wearing number 12.
- Telephone Area Codes: These identify regions, making them strictly nominal data.
Summary Checklist
- Can the data be grouped into distinct descriptive categories? (Yes → Categorical)
- Do the categories have a natural ranking? (Yes → Ordinal; No → Nominal)
- Are numbers present purely as identification tags? (Yes → Nominal categorical)

