Skip to main content
The new Teacher Workspace is here. Your first 3 assignments are free. Try it →
A colleague sent you $30 off Fiveable. Get the annual plan for $99 →

Categorical Variable in AP Statistics

In AP Statistics, a categorical variable places each individual into one of several groups or categories (like eye color or yes/no). You summarize it with counts and proportions, not means, and it leads to proportion and chi-square procedures.

Verified for the 2027 AP Statistics exam•Last updated October 2026

What is Categorical Variable?

A categorical variable records which group an individual belongs to. Think favorite music genre, whether a patient recovered (yes/no), or political party. Each individual lands in exactly one category, and the data are labels, not measurements.

The quick test is simple. Ask yourself whether it makes sense to average the values. If not, the variable is categorical. Numbers can still show up as labels, though. Zip codes, jersey numbers, and phone area codes are categorical, because averaging them is meaningless. Since you can't take a mean, you describe categorical data with counts (frequencies) and relative frequencies (proportions). You graph it with bar charts or pie charts, not histograms or box plots.

Why Categorical Variable matters in AP® Statistics

This term first appears in Topic 1.2 (Variables), where you learn to classify variables as categorical or quantitative. That one decision then follows you through the whole course. In Topic 2.2 (Summary Statistics for Two Categorical Variables), you compare two categorical variables using two-way tables and joint, marginal, and conditional relative frequencies. In the inference topics, categorical data turn into proportions. That covers sampling distributions for p̂ (3.2) and for p̂₁ − p̂₂ (3.9), confidence intervals for one and two proportions (3.3, 3.10), significance tests for proportions (3.5, 3.12), and chi-square tests for homogeneity or independence (3.14). If you misidentify the variable type, you'll pick the wrong graph, the wrong summary statistic, and the wrong test. That costs points across the exam.

Keep studying AP® Statistics Unit 2

How Categorical Variable connects across the course

Quantitative variables and choosing the right tools (Unit 1)

Categorical and quantitative are the two variable types you sort everything into. Categorical data get bar charts and proportions. Quantitative data get histograms, box plots, and means. Get the type right first and the rest of the analysis follows.

Two-way tables and conditional relative frequencies (Unit 2)

When you have two categorical variables, a two-way table crosses them. Comparing conditional relative frequencies (like the percent of each age group who prefer a brand) is how you spot an association between the variables before you do any formal inference.

Sample proportions and z-procedures for p (Unit 3)

A sample proportion p̂ is just a categorical variable boiled down to one number, the fraction of individuals in the category you care about. That's why one-proportion and two-proportion intervals and tests (Topics 3.2, 3.3, 3.5, 3.9, 3.10, 3.12) all start from categorical data, usually a variable with two outcomes, success or failure.

Chi-square tests for homogeneity and independence (Unit 3)

Chi-square tests are basically the two-way table from Unit 2 promoted to formal inference. Homogeneity asks whether the distribution of one categorical variable is the same across several populations. Independence asks whether two categorical variables are associated in a single population.

Is Categorical Variable on the AP® Statistics exam?

The exam rarely asks you to define a categorical variable outright. Instead, it expects you to recognize one and act on it. Multiple-choice questions often describe a study and ask which variable is categorical, which graph is appropriate, or which inference procedure fits. A classic trap is offering a box plot, a mean, or a t-test for data that are counts in categories. On free-response questions, identifying the variable type is the hidden first step of every inference problem. If the response is a category (support/oppose, defective/not defective), you're working with proportions and a z-procedure. If there are more than two categories or two categorical variables in a table, you're likely heading toward a chi-square test. No released FRQ has used the term "categorical variable" as a direct prompt, but nearly every proportion or chi-square FRQ depends on you correctly treating the data as categorical.

Categorical Variable vs Quantitative variable

A quantitative variable takes numerical values where arithmetic makes sense, like height, test score, or reaction time. A categorical variable places individuals into groups. The confusion happens when categories are written as numbers, such as zip codes, survey codes (1 = yes, 2 = no), or student ID numbers. Use the averaging test. If the average of the values means something real, the variable is quantitative. If the average is nonsense, it's categorical.

Key things to remember about Categorical Variable

  • A categorical variable puts each individual into a group, while a quantitative variable gives a numerical measurement that you can meaningfully average.

  • Numbers can be categorical, so zip codes, jersey numbers, and coded survey answers are categorical variables.

  • You summarize one categorical variable with counts and proportions and display it with a bar chart or pie chart, never a histogram or box plot.

  • Two categorical variables go in a two-way table, and comparing conditional relative frequencies is how you check for an association.

  • Inference on categorical data uses proportions, so expect one-proportion or two-proportion z-intervals and z-tests, or chi-square tests when there are multiple categories or two variables.

Frequently asked questions about Categorical Variable

What is a categorical variable in AP Stats?

A categorical variable records which group or category an individual falls into, like blood type or whether someone voted. You describe it with counts and proportions, and it leads to proportion and chi-square procedures in inference.

Is a zip code a categorical variable?

Yes, a zip code is categorical even though it's written as a number. Averaging two zip codes gives a meaningless result, so the numbers are acting as labels, not measurements.

What's the difference between a categorical and a quantitative variable?

A categorical variable sorts individuals into groups (like favorite sport), while a quantitative variable measures a numerical amount (like hours of sleep). Categorical data get bar charts and proportions. Quantitative data get histograms, box plots, means, and standard deviations.

Can you make a box plot or find the mean of a categorical variable?

No. Box plots and means need numerical values that can be ordered and averaged. For categorical data, use a bar chart, pie chart, or segmented bar chart, and report counts or proportions instead.

Which inference tests use categorical variables?

One-proportion and two-proportion z-intervals and z-tests (Topics 3.3, 3.5, 3.10, 3.12) use categorical data summarized as proportions. Chi-square tests for homogeneity or independence (Topic 3.14) handle categorical variables with several categories or two variables in a two-way table.