| Study Guides
AP · Variables · 14 min read · Updated 2026-05-10

Variables — AP Statistics Study Guide

For: AP Statistics candidates sitting AP Statistics.

Covers: classification of variables as categorical or quantitative, discrete vs continuous quantitative variables, levels of measurement, standard statistical notation for variables, and variable identification in real-world study contexts.

You should already know: Basic definition of a study population, how to interpret numerical data, the difference between groups and numerical measurements.

A note on the practice questions: All worked questions in the "Practice Questions" section below are original problems written by us in the AP Statistics style for educational use. They are not reproductions of past College Board / Cambridge / IB papers and may differ in wording, numerical values, or context. Use them to practise the technique; cross-check with official mark schemes for grading conventions.


1. What Is Variables?

In statistics, a variable is any characteristic, quantity, or attribute that can be measured or recorded for each individual or unit in a study population or sample, that varies between units. The AP Statistics Course and Exam Description (CED) lists this topic as Learning Objective 1.1, and it makes up approximately 12% of the weight for Unit 1 (Exploring One-Variable Data), which accounts for 15-23% of the overall AP exam score. Questions about variables appear in both the multiple-choice (MCQ) section and as the opening part of longer free-response questions (FRQ), where you are asked to describe variables before conducting analysis.

Standard notation conventions used on the AP exam are: a generic variable is denoted with an uppercase italic letter or , while individual observed values of the variable are denoted with lowercase or , where the subscript indexes the -th unit in the sample. Mastery of variable classification is the foundational first step for every statistical analysis, because the type of variable you have determines which graphs and which summary statistics you can use to describe the data. Skipping this step leads to incorrect analysis and lost points.

2. Categorical vs Quantitative Variables

The most fundamental classification of variables divides them into two groups: categorical and quantitative. A categorical variable (also called qualitative) places an individual unit into a distinct group or category based on an attribute, rather than measuring a meaningful numerical quantity. A quantitative variable is a numerically measured variable where the number represents a count or measurement, so arithmetic operations (adding, averaging) produce a meaningful result.

A common trick tested on the AP exam is numeric categorical variables: variables that are recorded as numbers but do not measure a meaningful quantity. Examples include zip codes, student ID numbers, and jersey numbers. The simple test to avoid misclassification is: does averaging the values of this variable give a meaningful result? If the average is meaningless, the variable is categorical even if it is written as a number. This classification drives all subsequent analysis: categorical variables are summarized with proportions and displayed with bar charts or pie charts, while quantitative variables are summarized with means, medians, and standard deviations and displayed with histograms, dotplots, or boxplots.

Worked Example

Problem: A campus coffee shop records the following data for each customer order: (1) the type of drink ordered (latte, espresso, drip, cold brew), (2) the total pre-tax cost of the order in US dollars, (3) the customer’s 7-digit phone number. Classify each variable as categorical or quantitative.

Solution:

  1. Apply the meaningful average test to each variable:
  2. Drink type: This variable places each order into one of four unmeasured groups. An average "drink type" has no real meaning, so drink type is categorical.
  3. Total pre-tax cost: This is a numerical measurement of the amount owed, and averaging the cost of 10 orders gives a meaningful average order value. So cost is quantitative.
  4. 7-digit phone number: Even though phone numbers are recorded as numbers, they only identify customers, not measure a quantity. An average phone number gives no useful information, so phone number is categorical.

Exam tip: When the AP exam shows you a variable recorded as a number, always run the "meaningful average" test before classifying it as quantitative. 90% of trick classification questions use numeric categorical variables like IDs or zip codes.

3. Discrete vs Continuous Quantitative Variables

After classifying a variable as quantitative, you must further classify it as discrete or continuous, because this determines which probability models and graphs you can use later in the course. A discrete quantitative variable is a variable that can only take on a countable number of distinct values. Discrete variables are almost always counts: for example, the number of customers in a shop, the number of defective batteries in a pack, or the number of children in a family. You can list all possible values of a discrete variable, even if the list is very long.

A continuous quantitative variable is a variable that can take on any value within an interval of numbers, with an uncountable number of possible values. Continuous variables are almost always measurements: height, weight, time, distance, or cost. The value depends on the precision of your measuring tool: if you measure time to the nearest millisecond, you can always measure it more precisely to the nearest microsecond, so there are infinitely many possible values between any two measured values. A common edge case: money measured to the nearest cent is technically discrete, but AP Statistics almost always treats it as continuous because there are so many possible values that the discrete distinction does not affect analysis.

Worked Example

Problem: A hiking club records the following quantitative variables for each of its weekend trips: (1) the number of hikers on the trip, (2) the total distance hiked in kilometers, (3) the highest elevation reached on the trip. Classify each as discrete or continuous.

Solution:

  1. Recall the core distinction: discrete variables have countable distinct values, continuous variables can take any value in an interval.
  2. Number of hikers: You can only have whole-number values (0, 1, 2, ... hikers), you cannot have 12.5 hikers. The number of possible values is countable, so this is discrete.
  3. Total distance hiked: Distance can be measured to any level of precision: 12.4 km, 12.42 km, 12.421 km, etc. There are infinitely many possible values between 12 km and 13 km, so distance is continuous.
  4. Highest elevation reached: Elevation is a measurement that can be divided infinitely, so it is continuous, even if rounded to the nearest meter.

Exam tip: Remember that even if a continuous variable is rounded to whole numbers, it is still continuous. For example, age rounded to the nearest year is continuous, not discrete.

4. Levels of Measurement

Levels of measurement (or scales of measurement) are a further classification of variables based on the statistical properties of their values, which determines what operations are valid. There are four standard levels, tested occasionally on AP multiple choice:

  1. Nominal: For categorical variables with no inherent order between categories. Examples: eye color, drink type, gender. You cannot rank one category as "higher" than another.
  2. Ordinal: For categorical or ranked variables where categories have a clear inherent order, but the differences between consecutive categories are not equal. Examples: movie ratings (1-5 stars), education level, satisfaction scores. You know 5 stars is better than 4 stars, but you cannot say the difference between 1 and 2 stars equals the difference between 4 and 5 stars.
  3. Interval: For quantitative variables where differences between values are meaningful, but there is no true zero point (zero does not mean the absence of the quantity). The classic example is temperature in Celsius or Fahrenheit: 0°C does not mean no heat, so 20°C is not twice as hot as 10°C.
  4. Ratio: For quantitative variables with a true zero point (zero means the absence of the quantity), so ratios of values are meaningful. Most quantitative variables (height, weight, time, cost) are ratio level.

Worked Example

Problem: Classify each variable by its level of measurement: (1) T-shirt size (XS, S, M, L, XL), (2) Temperature of a refrigerator in °C, (3) Number of calories in a sandwich.

Solution:

  1. T-shirt size: The sizes have a clear order from smallest to largest, but the difference between XS and S is not the same as the difference between L and XL, so this is ordinal level.
  2. Refrigerator temperature in °C: Differences between values are meaningful (4°C is 2°C colder than 6°C, same as 0°C is 2°C colder than 2°C), but 0°C is an arbitrary reference point, not the absence of heat. This is interval level.
  3. Number of calories in a sandwich: 0 calories means no energy (true zero), and a 400-calorie sandwich has twice as much energy as a 200-calorie sandwich. This is ratio level.

Exam tip: The only common interval-level variable you will see on the AP exam is temperature in Celsius or Fahrenheit. All other quantitative variables you encounter will almost always be ratio level. If you are stuck, ratio is the most likely correct answer.

5. Common Pitfalls (and how to avoid them)

  • Wrong move: Classifying a numeric identifier (zip code, student ID, jersey number) as quantitative because it is written as a number. Why: Students assume all numbers are quantitative, and forget classification depends on what the number measures, not how it is written. Correct move: Always apply the "meaningful average" test before classifying any numeric variable. If averaging gives a meaningless result, it is categorical.
  • Wrong move: Classifying a rounded continuous variable (age rounded to years, height rounded to inches) as discrete because it only takes whole number values. Why: Students confuse how the variable is recorded with the underlying nature of the variable. Correct move: Ask if the variable can in principle take any value in an interval. If yes, it is continuous even if rounded.
  • Wrong move: Claiming interval-level temperature is ratio level because it has numerical values. Why: Students forget the requirement of a true zero point for ratio level, and assume all quantitative variables are automatically ratio. Correct move: Check for a true zero: if zero means "none of the quantity", it is ratio; if zero is an arbitrary reference point, it is interval.
  • Wrong move: Treating ordinal variables as interval for calculating means. Why: Many surveys use 1-5 ratings, so students assume differences between ratings are equal and calculate a mean. Why it's wrong: Ordinal variables do not have equal intervals, so means are not statistically meaningful. Correct move: Always report medians or proportions for ordinal variables, unless the problem explicitly states intervals are equal.
  • Wrong move: Confusing categorical ordinal variables with quantitative variables. Why: Ordinal variables have numbers assigned to ranks, so students mistake them for quantitative. Correct move: Check if the number represents a count or measurement, not just a rank. If it is just a rank label, it is categorical ordinal, not quantitative.

6. Practice Questions (AP Statistics Style)

Question 1 (Multiple Choice)

A public health researcher collects data on patients at a community clinic. Which of the following correctly matches the variable to its classification? A) Blood pressure (mm Hg): Categorical nominal B) Education level (less than high school, high school, college, graduate): Categorical ordinal C) Patient social security number: Quantitative discrete D) Number of clinic visits in the last year: Quantitative continuous

Worked Solution: We check each option against our classification rules. Option A: Blood pressure is a numerical measurement with meaningful arithmetic, so it is quantitative, not categorical, so A is incorrect. Option B: Education level is grouped into ordered categories, but the difference between adjacent categories is not equal, so it is correctly classified as categorical ordinal. Option C: Social security number is a numeric identifier, not a meaningful measurement, so it is categorical, so C is incorrect. Option D: Number of clinic visits is a whole-number count, so it is discrete, not continuous, so D is incorrect. The correct answer is B.


Question 2 (Free Response)

A local bookstore collects data on all customer purchases to adjust its inventory. For each of the following variables: (i) Genre of book purchased (fiction, nonfiction, poetry, biography), (ii) Total pre-tax cost of the purchase, (iii) Number of books purchased. (a) Classify each variable as categorical or quantitative. (b) For each quantitative variable in (a), classify it as discrete or continuous. (c) Identify the level of measurement for the genre of book variable, and explain why it cannot be ordinal.

Worked Solution: (a) Classification: (i) Genre of book: Places purchases into groups, so it is categorical. (ii) Total pre-tax cost: Numerical measurement with a meaningful average, so it is quantitative. (iii) Number of books purchased: Count of items with meaningful arithmetic, so it is quantitative. (b) Discrete/continuous classification: (i) Total pre-tax cost: While technically discrete (measured to the nearest cent), it is treated as continuous in AP Statistics due to the large number of possible values, so it is classified as continuous. (ii) Number of books purchased: Only takes whole-number countable values, so it is discrete. (c) Genre of book is nominal level of measurement. It cannot be ordinal because there is no inherent, consistent order to the genres: one genre is not "higher" or "better" than another, which is required for ordinal level.


Question 3 (Application / Real-World Style)

A high school biology class conducts an experiment to measure the growth of bean plants over four weeks. Students record the following data for each bean plant: (1) the group the plant is assigned to (low light, medium light, high light), (2) the height of the plant after four weeks in centimeters, (3) the number of leaves on the plant after four weeks. Classify each variable by all appropriate classifications, and explain why classification matters for summarizing the data.

Worked Solution:

  1. Light group: This is a categorical nominal variable. It places plants into three unordered groups (order is arbitrary for classification here), so there is no meaningful measurement.
  2. Height after four weeks: This is a quantitative continuous ratio variable. It is quantitative because height is a measurement, and averaging heights gives a meaningful result. It is continuous because height can be measured to any level of precision, and it is ratio because 0 cm means no growth (true zero).
  3. Number of leaves: This is a quantitative discrete ratio variable. It is a count of leaves, with only whole-number countable values, and 0 leaves means no leaves (true zero).
  4. Classification matters because we can only use summary statistics like mean height and standard deviation of height for the quantitative height variable, while we can only use proportions of plants in each light group for the categorical light group variable.

7. Quick Reference Cheatsheet

Category Rule Notes
Categorical Variable Groups units into categories; averaging is not meaningful Numeric identifiers (IDs, zip codes) are categorical; includes nominal and ordinal levels
Quantitative Variable Numerical measurement where averaging is meaningful Further classified as discrete or continuous; includes interval and ratio levels
Discrete Quantitative Countable number of distinct possible values Almost always counts; e.g., number of leaves, number of purchases
Continuous Quantitative Any value in an interval; uncountable possible values Almost always measurements; still continuous even if rounded; e.g., height, time, cost
Nominal Level Categorical, no inherent order between categories All unranked categorical variables; e.g., eye color, book genre
Ordinal Level Categorical, inherent order, no equal intervals between ranks E.g., movie ratings, education level, clothing size
Interval Level Quantitative, meaningful differences, no true zero Only common example: temperature in °C/°F
Ratio Level Quantitative, meaningful differences, true zero, meaningful ratios Most quantitative variables; e.g., height, time, cost, count

8. What's Next

This chapter on variables is the absolute foundation for all of Unit 1: Exploring One-Variable Data, and for the entire AP Statistics course. Next you will learn how to appropriately represent variables graphically: for categorical variables you use bar charts and pie charts, while for quantitative variables you use histograms, boxplots, and dotplots. Without correctly classifying variables, you will consistently choose the wrong graph or wrong summary statistic for your data, leading to easily avoidable lost points on both MCQs and FRQs. This topic also feeds into later units: when you design studies, you need to distinguish between explanatory and response variables, which builds on this basic classification, and when you use probability models, you need discrete vs continuous classification to choose the correct model.

← Back to topic

Stuck on a specific question?
Snap a photo or paste your problem — Ollie (our AI tutor) walks through it step-by-step with diagrams.
Try Ollie free →