AP Statistics  /  Unit 1: Exploring One-Variable Data and Collecting Data  /  Topic 1.2
NUM8ERS study notes · Topic 1.2

Variables and Data Types

What does each row of data describe? What do the numbers and labels mean? Learn to identify variables, classify their types, and tell a sample statistic from a population parameter.

2026–27 curriculum3 worked examples6 practice questionsNo calculator needed

By the end of this lesson, you should be able to:

  • Identify an observational unit, a variable and a recorded value in a study.
  • Explain whether a variable is categorical or quantitative.
  • Distinguish discrete and continuous quantitative variables.
  • Identify parameters and statistics, and explain them in context.

Before you start: Know the difference between a population and a sample. Need a reminder? Review Topic 1.1.

First time learning this? Start with the school data table, then follow the classification steps.

Here to revise? Review the key ideas, then try the practice questions.

The concept in 60 seconds

An observational unit is who or what we collect information about. A variable is a characteristic we record about that unit. A value is the answer or measurement recorded for one unit.

Student → travel time → 24.624.6 minutes.
The student is the unit. Travel time is the variable. The recorded 24.624.6 minutes is one value.

Some variables describe categories, such as bus, car or walk. Others describe quantities, such as minutes or a number of siblings. For quantities, ask whether the possible values are separate, countable values or measurements that can vary throughout an interval.

When we summarize a whole population, we describe a parameter. When we summarize a sample, we calculate a statistic. The group being summarized decides which word to use.

What can we record about Cedar High students?

In Topic 1.1, Cedar High had 1,2001{,}200 enrolled students and selected a sample of 6060. We will reuse that fictional teaching scenario. For this lesson, the school records each selected student’s code, main travel method, one-way travel time on the Tuesday being studied, and number of siblings.

Here are 44 example records from the sample of 6060:

Invented teaching data. One record describes one selected student.
Student codeMain travel methodTravel time (minutes)Number of siblings
101Bus24.624.622
102Walk8.48.400
103Car14.214.211
104Bus31.831.833

The other 5656 sample records are not shown. These 44 rows do not reduce the sample size to 44. The codes identify students; they are not student counts.

Predict before reading on: Which columns contain labels? Which contain amounts? Does the student code become quantitative just because it uses digits?

Check your prediction

Travel method is a category. Student code is an identifying label, even though it uses numbers. Travel time is a measured amount; number of siblings is a counted amount. The students are the observational units.

Observational units, variables and values

Observational unit

The person, object or other item described by an observation.

Here: an individual selected Cedar High student.

Variable

A characteristic that can differ from one unit to another.

Here: main travel method, travel time or number of siblings.

Value

The particular category or amount recorded for a variable.

Here: “Bus” is one travel-method value; 24.624.6 minutes is one travel-time value.

Data set

The collected records we use to investigate a question.

Here: the information recorded for all 6060 selected students.

A useful way to read a data table

In a table with one record per individual, a row describes an observational unit and a column records a variable. Read the study description too: if the same person has several records, the question may focus on people, visits or another kind of unit.

Do not name the unit by guessing the largest group mentioned. If a table records information about schools, the units may be schools even when the measurements concern students at those schools.

Can data include more than numbers?

Yes. Text responses, photographs, audio and video can provide information. A written answer might describe a travel method; a photograph might help identify a bird species. Ask what characteristic is recorded and what each observation describes, rather than assuming all data must begin as numbers.

How to classify a variable

1. Identify the unitWho or what does each observation describe?
2. Ask: label or amount?A group label is categorical. A measured or counted amount is quantitative.
3. Check the possible valuesFor a quantitative variable, are values countable or possible throughout an interval?
4. Explain your choiceName the variable and say what its values mean. Include measurement units when relevant.

Categorical

Values name categories or act as labels. Another name is qualitative.

Examples: travel method, blood type, yes/no response, or a bus route code.

Quantitative

Values describe numerical amounts. Another name is numerical.

Examples: travel duration in minutes, height in centimeters, or number of siblings.

Variables divide into categorical labels or groups and quantitative amounts. Quantitative variables divide into discrete countable values, such as number of siblings, and continuous measurements, such as travel time.
Read the branches: Discrete and continuous are types of quantitative variables. A categorical variable is a label or group, even when its label contains digits. View this visual at full size.

Discrete versus continuous: look at the possible values

Discrete quantitative

The possible values can be counted or listed. There may be finitely many values or a never-ending countable list.

Number of siblings can be 0,  1,  2,  30,\;1,\;2,\;3, and so on. A value such as 2.42.4 siblings is not possible.

Continuous quantitative

A measurement can take any value within an interval in the model.

Travel duration could be 2424 minutes, 24.624.6 minutes, 24.6324.63 minutes or a value between those measurements.

Precision is not the same as variable type. Recording travel time to the nearest minute rounds a continuous duration. Seeing only whole numbers in the table does not, by itself, make the underlying duration a discrete count.

Discrete values do not have to be whole numbers. If a quiz awards scores only in half-point steps, the possible scores form a discrete list: 0,  0.5,  1,  1.50,\;0.5,\;1,\;1.5, and so on up to the maximum. The key is the set of allowed values, not the presence of a decimal point.

Numbers can also be category labels

A student code of 101 does not mean “101101 students.” It identifies a student. Similarly, route 12 and route 18 identify different bus routes; route 18 is not a measured amount six units greater than route 12.

Ordered categories still remain categories when they describe levels rather than measured amounts. For example, “low,” “medium” and “high” satisfaction are ordered labels. Check the meaning and definition of the variable before classifying it.

Parameter versus statistic

A parameter describes the population. A statistic describes a sample. Both can be numerical summaries, such as a mean or a proportion. A proportion is the fraction of a group with a particular characteristic.

Parameter: whole population

The proportion of all 1,2001{,}200 Cedar High students whose main travel method on the Tuesday being studied is bus.

This population proportion is unknown unless we have suitable information about the whole population.

Statistic: selected sample

Suppose 2020 of the 6060 selected students travel by bus. The sample proportion is p^=2060=13\hat{p}=\frac{20}{60}=\frac{1}{3}, or approximately 33.3%33.3\%.

This result summarizes the sample of 6060, not all 1,2001{,}200 students.

The result for 2020 out of 6060 students is an invented summary of the full teaching sample. It is not calculated from the 44 preview rows.

The population is all 1,200 students, whose bus-travel proportion is an unknown parameter. In the sample of 60, 20 travel by bus, giving a statistic of about 33.3 percent. The statistic estimates the population parameter.
Keep the groups separate: The sample proportion is known. The population proportion is the quantity we want to learn about. An estimate need not equal the population value. Icons are symbolic. View this visual at full size.

Useful notation: connect each symbol to its group

These symbols will appear throughout the course. Start with their meanings.
SummaryPopulation parameterSample statistic
Mean: the average of quantitative valuesμ\mu (mu): population mean travel timexˉ\bar{x} (x-bar): sample mean travel time
Proportion: the fraction in a categorypp: population proportion travelling by busp^\hat{p} (p-hat): sample proportion travelling by bus

N=1,200N = 1{,}200 and n=60n = 60 still describe the population and sample sizes from Topic 1.1. They count students. The mean travel time is measured in minutes; a proportion is a fraction without measurement units.

Size does not decide the label. A summary from a large sample is still a statistic. A summary describing an entire small population is a parameter. Also, a parameter can be known; “unknown” is common, but is not its definition.

Worked examples

Example 1: Read a student’s record

Question: Identify the unit, variables and variable types in the Cedar High data table. Then explain what the value 24.624.6 represents.

  1. Find the unit. One record describes one selected student, so a student is an observational unit.
  2. Separate the columns. Student code is an identifying label. Main travel method names a category. Travel time records an amount in minutes. Number of siblings records a count.
  3. Classify by meaning. Student code and travel method are categorical. Travel duration is quantitative continuous. Number of siblings is quantitative discrete.
  4. Interpret the value. Student 101’s one-way home-to-school journey took 24.624.6 minutes on the Tuesday being studied.

Reflect: “Bus” and “24.624.6” are recorded values. They are not the names of the variables.

Example 2: Identify a statistic and its target parameter

Question: Suppose the mean travel time for the full sample of 6060 selected students is 24.824.8 minutes. Identify the statistic and the parameter the school wants to estimate.

  1. Ask which group produced 24.824.8. It comes from the 6060 selected students, so it is a sample statistic: xˉ=24.8 minutes\bar{x}=24.8\,\text{minutes}.
  2. Name the target group. The school wants to learn about all 1,2001{,}200 enrolled students.
  3. Name the matching population summary. The parameter μ\mu is the mean one-way travel time, in minutes, for all enrolled students on the Tuesday being studied.
  4. Avoid turning an estimate into a fact. We do not know that μ\mu equals 24.824.8 minutes just because xˉ\bar{x} does.

The 24.824.8-minute mean is an invented full-sample summary, not the mean of the 44 displayed rows.

Example 3: The definition changes the classification

Question: A researcher records exact age in years, number of completed years of age, and an age group such as “under 16” or “16–18.” Classify each variable.

  1. Exact elapsed age: quantitative continuous. Age is elapsed time and can take fractional values between years.
  2. Number of completed years: quantitative discrete. As defined, its values are 0,  1,  20,\;1,\;2, and so on.
  3. Age group: categorical. Each value is a group label, even when the label includes numbers.

Reflect: Do not classify a vague word such as “age” in isolation. Use the way the study defines and records it.

How to explain an answer in context

A useful answer names the actual unit or variable and explains the classification. Give the reader more than a one-word label.

Weak answerImproved answerWhy it is clearer
“The variable is students.”“A selected Cedar High student is the unit. One variable is that student’s one-way travel time in minutes.”Separates who is studied from what is recorded.
“It is continuous because it has decimals.”“Travel duration is quantitative continuous because it is a measurement that can vary throughout an interval of times.”Uses possible values rather than the appearance of the data.
“33.3%33.3\% is a parameter.”“Approximately 33.3%33.3\% is a statistic because it summarizes the bus-travel category among the 6060 sampled students.”Identifies the group summarized and the characteristic.

Writing frame for a variable: “[Variable] is [type] because its values represent [labels / countable amounts / measurements within an interval].”

Writing frame for a summary: “[Summary] is a [parameter / statistic] because it describes [the whole population / the selected sample] of [units in context].”

Common mistakes and how to correct them

Confusing a unit with a variable

Mistake: “The variable is a student.”

Fix: The student is the unit. Travel method or travel time is a variable recorded about that student.

Classifying by digits alone

Mistake: “Student code is quantitative because it is 101.”

Fix: The code is an identifier. A number can be a label rather than an amount.

Using decimals as the test

Mistake: “Whole-number data must be discrete.”

Fix: A continuous measurement may be rounded. Some discrete variables also allow decimal values.

Calling a sample result a parameter

Mistake: “The sample mean is the population parameter.”

Fix: A statistic can estimate a parameter, but the two describe different groups.

Assuming unknown means parameter

Mistake: “If the value is known, it cannot be a parameter.”

Fix: Population versus sample decides the label. A population parameter can be known if the necessary population information is available.

Try a correction: “The observational units are travel times. Travel method is quantitative because we coded Bus↦1,Car↦2,Walk↦3\text{Bus}\mapsto\text{1},\quad\text{Car}\mapsto\text{2},\quad\text{Walk}\mapsto\text{3}. The 33.3%33.3\% sample result is the school’s exact bus-travel proportion.”

Show the corrected reasoning

The observational units are students. Travel times are values of a variable. Travel method remains categorical: 1, 2 and 3 stand for group labels. The approximately 33.3%33.3\% sample proportion is a statistic that may help estimate the school’s population proportion; it is not automatically the exact population value.

Check your understanding: practice with solutions

These are original AP-style practice questions. Try a question, use the hint if needed, then explain why the solution makes sense.

1. Identify a unit, variable and value

A researcher surveys 4545 students about the number of books they read last month. One student reports 33. Identify an observational unit, the variable and this recorded value. Classify the variable.

Hint

Separate the person from the characteristic and that person’s answer.

Solution and reasoning

An observational unit is a surveyed student. The variable is the number of books read last month. The recorded value is 33 books. The variable is quantitative discrete because it is a count with separate whole-number possibilities.

2. Recognize a numerical label

A transport company records route codes 12, 18 and 25 for buses. The codes identify routes. How should the route-code variable be classified?

  1. Quantitative continuous, because routes have lengths.
  2. Quantitative discrete, because the codes are whole numbers.
  3. Categorical, because the codes name routes.
  4. A statistic, because several buses are recorded.
Hint

The question concerns the route code, not route length or the number of buses.

Solution and reasoning

C. Route codes are category labels. Route length would be a different variable. A statistic is a numerical summary of sample information, rather than a variable type.

3. Classify by the possible values

Classify each variable as categorical, quantitative discrete or quantitative continuous: (a) exact running duration in seconds, recorded to the nearest second; (b) number of attempts to finish a puzzle; (c) quiz score when only half-point steps are awarded; (d) satisfaction recorded as low, medium or high.

Hint

Rounding does not change an underlying duration into a count. A list of permitted half-point scores is still countable.

Solution and reasoning

(a) Quantitative continuous: the underlying elapsed duration can take values throughout an interval, although recorded values are rounded. (b) Quantitative discrete: attempts are counted. (c) Quantitative discrete: only specified score steps are permitted. (d) Categorical: the values are ordered category labels.

4. Identify the statistic and parameter

A school has 900900 enrolled students. In a sample of 5050 students, 1818 report walking to school on Monday. Identify the sample statistic, then describe the corresponding population parameter.

Hint

One proportion concerns the 5050 selected students. The other concerns all 900900 students.

Solution and reasoning

The sample proportion p^=1850=0.36\hat{p}=\frac{18}{50}=0.36, or 36%36\%, is a statistic. The parameter pp is the proportion of all 900900 enrolled students who walked to school on that Monday. Its value is not given. Do not assume the population proportion must be 36%36\%.

5. Find the observational unit

A district data table has one record per school. It lists school code, number of students enrolled and mean student commute time in minutes for each school. Are the observational units schools or students? Classify school code and enrollment count.

Hint

Ask what each record describes, rather than choosing the people mentioned in a measurement.

Solution and reasoning

The observational units in this table are schools. Each row describes one school, even though two characteristics concern its students. School code is a categorical identifier. Enrollment count is quantitative discrete because it counts students at a school.

6. Correct a parameter–statistic mistake

A researcher calculates the mean height of every member of a small club. A student says, “That mean must be a statistic because the club is small and the mean is known.” The target population is the club’s entire membership. Correct the reasoning.

Hint

Use the target group and the group actually summarized. Neither size nor knowledge of the result decides the label.

Solution and reasoning

The mean is a parameter for the stated population because it summarizes the entire club membership. A parameter can describe a small population and can be known. If the club members were instead a sample used to study a wider population, the same mean would play the role of a statistic for that wider investigation.

Quick revision notes

  • Unit: who or what an observation describes.
  • Variable: a characteristic recorded about a unit.
  • Value: one recorded answer or measurement.
  • Categorical: labels or groups; numerical codes can still be categorical.
  • Quantitative: measured or counted amounts.
  • Discrete: a finite or countably infinite set of possible quantitative values.
  • Continuous: a quantitative measurement modeled as taking any value in an interval.
  • Parameter: a numerical attribute or summary describing the population.
  • Statistic: a numerical attribute or summary describing a sample.
  • Explain in context: name the actual unit, variable or summarized group.

Memory check: Who is described? What is recorded? Is it a label or an amount? What values are possible? Does the summary describe the sample or the population?

A final AP-style understanding check

A school district operates 4848 buses. It randomly selects 1212 buses and makes one record for each selected bus. The recorded characteristics are bus ID number, fuel type (diesel or electric), number of passenger seats, and bus length in meters. The sample’s mean bus length is 11.211.2 meters.

  1. Identify the observational units, population and sample.
  2. Classify all four recorded characteristics. Explain why bus ID and number of seats have different types, even though both use numbers.
  3. Identify what 11.211.2 meters represents and describe the corresponding population parameter.
Show a model answer and self-check

(a) An observational unit is a bus. The population is all 4848 district buses; the sample is the 1212 selected buses. N=48N = 48 and n=12n = 12.

(b) Bus ID is a categorical identifier. Fuel type is categorical. Number of seats is quantitative discrete because it is a count. Bus length is quantitative continuous because it is a measurement that can vary throughout an interval. An ID labels a bus; a seat count measures how many passenger seats it has.

(c) The 11.211.2-meter sample mean, xˉ\bar{x}, is a statistic because it summarizes the 1212 sampled buses. The corresponding parameter μ\mu is the mean length, in meters, of all 4848 district buses. That population mean is not given.

Self-check: Did you name buses as the units, separate the population from the sample, explain the four classifications, and identify the mean’s group and units?

Before you move on, check that you can:

  • Separate a unit, a variable and a value in a new study.
  • Explain why an ID number is a label.
  • Use possible values to distinguish discrete and continuous variables.
  • Describe a statistic and its matching parameter without assuming they are equal.

Continue learning

Now that you can identify categorical variables, learn how to organize their values into frequency and relative frequency tables.

Previous: Topic 1.1 · Review variable types · Back to the lesson overview