Course contentsShow
← Data Science
Lesson 1174 of 2,14530. Exploratory Data Analysis (EDA) ProcessFree lesson

Categorical Variable Frequency Tables

Creating frequency and proportion tables to understand the distribution of categorical data.

Categorical Variable Frequency Tables

What you'll learn: How to summarize categorical data by counting occurrences and calculating proportions to reveal distribution patterns.

The Core Idea

When exploring categorical variables (like product categories, regions, or customer types), you need to know how many times each category appears and what percentage of your data each represents. Frequency tables and proportion tables answer these questions directly.

Think of it like sorting mail: you want to know how many letters go to each department (frequency) and what fraction of total mail each department receives (proportion). This helps you spot which categories dominate, which are rare, and whether your data is balanced or skewed.

Frequency Tables

A frequency table counts how many observations fall into each category. If you have a "Customer Type" variable with values like "Individual," "Business," and "Government," the frequency table shows the count for each.

This reveals:

  • Which categories are most/least common
  • Whether any category dominates your dataset
  • If rare categories might need special handling

Proportion Tables

A proportion table (or relative frequency table) converts counts to percentages or decimals. It shows what fraction of your total data each category represents.

This is crucial because raw counts can be misleading without context—knowing "Business" appears 500 times means more when you know that's 50% of all customers versus just 5%.

Why This Matters

Before diving into relationships between variables, you must understand each variable individually. Frequency and proportion tables give you this foundation for categorical data, helping you detect data quality issues (like unexpected categories), understand class imbalance, and plan appropriate analyses.

Key Takeaway: Frequency tables count category occurrences; proportion tables show their relative weight—both are essential first steps in understanding categorical variable distributions during EDA.