Lesson 1.2 · Unit 1 · CED topic 1.2

Variables: observational units, parameters and statistics

Behind every statistical analysis is a table of data, even if no one ever draws it. Each row describes one thing that was observed, and each column records one characteristic of those things. Before choosing a graph or a summary number you must decide what the rows are, what the columns are, and what kind of column each one is: an average of zip codes is meaningless, while an average of heights is not. This lesson names those pieces so you can spot them in any study.

Required content · 1.2.A, 1.2.B, 1.2.C

Learning objectives.

  • 1.2.A. Identify observational units, variables, parameters, and statistics from a statistical study or data set.
  • 1.2.B. Identify types of variables.
  • 1.2.C. Identify types of quantitative variables.

Essential knowledge.

  • 1.2.A.1. An observational unit is an item or individual from which a datum is collected.
  • 1.2.A.2. A variable is a characteristic that may change from one observational unit to another.
  • 1.2.A.3. Data collected on numerical and categorical variables measured on observational units, including photographs, sounds, videos, and text, can convey meaningful information.
  • 1.2.A.4. A parameter is a numerical attribute or summary of the variable of interest for a population.
  • 1.2.A.5. A statistic is a numerical attribute or summary of the variable of interest for a sample. The value of a statistic from a certain sample is often not equal to the unknown value of the population parameter but may provide the basis for making inferences about the population parameter.
  • 1.2.B.1. A categorical variable, also called a qualitative variable, takes on values that are category names or group labels.
  • 1.2.B.2. A quantitative variable, also called a numerical variable, takes on numerical values for a measured or counted quantity and generally has units of measure.
  • 1.2.C.1. A discrete quantitative variable can take on a countable number of values. The number of values may be finite or countably infinite, as with the whole numbers.
  • 1.2.C.2. A continuous quantitative variable can take on an infinite number of possible values within a given interval. The number of values the variable can take on is measurable but not countable. This variable can take on all possible values between any pair of values.

Observational units and variables

An observational unit is an item or individual from which a datum is collected: a person, a turtle, a house, a flight, a tweet. A variable is a characteristic that may change from one observational unit to another. The word variable matters because if every unit had the same value there would be nothing to study.

Here is a small data set from a sea turtle project. The observational units are the turtles (one per row) and there are four variables besides the tag number.

TagSpeciesShell length (cm)Eggs laid this seasonNesting beach
T01Green98.43North
T02Loggerhead91.22South
T03Green104.74North
T04Olive ridley67.51East
T05Green101.33South
Variable Categoricallabels or group names Quantitativemeasured or counted numbers Discretecountable values Continuousany value in an interval eye color, zip code, favorite lunch siblings, text messages sent today height, commute time, sleep (hours)
Figure 1.2. Every variable is categorical or quantitative; a quantitative variable is discrete (a countable list of values) or continuous (every value in an interval).

Variables are not always numbers recorded in a spreadsheet. Photographs, sounds, videos and text can all be turned into data, because each can be summarized with numerical or categorical variables. A wildlife camera takes a photo (the observational unit) that researchers label by the species it shows (categorical) and the number of animals in it (quantitative). A collection of customer reviews can be summarized by each review's word count (quantitative) and whether the tone is positive, neutral or negative (categorical).

Categorical and quantitative variables

A categorical variable (also called a qualitative variable) takes on values that are category names or group labels. A quantitative variable (also called a numerical variable) takes on numerical values for a measured or counted quantity and generally has units of measure.

The test is whether arithmetic on the values means anything. The mean of the shell lengths is a meaningful number of centimeters; the "mean" of the beach names is not. Be careful with numbers that act as labels: a tag number, a zip code, a jersey number or a student ID is a categorical variable even though it is written with digits, because adding or averaging such numbers tells you nothing. A grade level (9, 10, 11, 12) in a survey of students is usually treated as a category for the same reason.

Discrete and continuous quantitative variables

A quantitative variable is one of two kinds.

  • A discrete quantitative variable takes a countable number of values. The list may be finite (0, 1, 2, 3 eggs) or go on forever (0, 1, 2, 3, ...), but you could in principle count through the values one by one. Counts are the typical case: eggs laid, siblings, text messages sent.
  • A continuous quantitative variable can take every value in an interval. The values are measured, not counted, and between any two possible values there is another one. Shell length, time, weight and temperature are continuous: a turtle's shell could be 98.4 cm or 98.41 cm or 98.413 cm. In practice we round measurements, but the variable itself is still continuous.

Parameters and statistics

Two other words describe the numbers a study produces.

  • A parameter is a numerical attribute or summary of the variable of interest for a population. Its value is a single fixed number, but it is usually unknown.
  • A statistic is a numerical attribute or summary of the variable of interest for a sample. Its value can be calculated, and it changes from sample to sample.

The value of a statistic from one sample is often not equal to the unknown value of the population parameter. It may still provide the basis for making inferences about that parameter, and the whole second half of the course is the careful theory of how to do that.

Worked example · Identifying units, variables and their types

Using the turtle table above, identify the observational unit and classify each variable.

The observational unit is a single sea turtle. Tag is categorical (an identifier). Species is categorical. Shell length is quantitative and continuous (measured in centimeters). Eggs laid this season is quantitative and discrete (a count: 0, 1, 2, ...). Nesting beach is categorical.

A quick check on the two numerical-looking columns: the mean shell length of the five turtles is \((98.4+91.2+104.7+67.5+101.3)/5=92.62\) cm, a meaningful number, so shell length is quantitative. Averaging tag numbers would have no meaning, so tag is categorical.

Worked example · Parameter or statistic?

A polling organization contacts 1,000 randomly selected U.S. adults. In the sample, 58% say they support a proposed park fee. The organization wants to learn about the proportion of all U.S. adults who support the fee. Identify the variable, the parameter and the statistic.

The variable is whether an adult supports the fee (categorical, with two possible values). The parameter is the proportion of all U.S. adults who support the fee. It is a fixed number that no one knows. The statistic is the sample proportion, 0.58, computed from the 1,000 adults who were contacted. Another random sample of 1,000 adults would almost certainly give a different statistic, such as 0.55 or 0.61, while the parameter would not change. The statistic 0.58 is our best single estimate of the parameter, but we should not claim that exactly 58% of all adults support the fee.

Worked example · Classifying tricky variables

Classify each variable as categorical, discrete quantitative or continuous quantitative: (a) a student's zip code; (b) the number of text messages a student sent yesterday; (c) the time, in seconds, a student takes to run 400 meters; (d) a runner's bib number; (e) the star rating (1 to 5 stars) a customer gives a product.

(a) Categorical: a zip code is a label, and the mean of zip codes means nothing. (b) Discrete quantitative: it is a count with possible values 0, 1, 2, .... (c) Continuous quantitative: time can take any value in an interval, such as 68.42 seconds. (d) Categorical: a bib number identifies a runner and has no numerical meaning. (e) Star rating is a judgment placed on a scale of 1 to 5; it is often treated as a category (ordered), and calling it quantitative is justified only when averaging the ratings is meaningful for the question being asked. On the exam, state the reason you give: a variable is quantitative if its values are measured or counted amounts for which arithmetic makes sense.

Exam focus
  • An observational unit is the individual from which a datum is collected; a variable is a characteristic that changes from unit to unit.
  • Categorical: values are labels (including identifiers such as zip codes and ID numbers). Quantitative: measured or counted numbers with units; discrete if countable, continuous if any value in an interval.
  • A parameter describes a population (fixed, usually unknown); a statistic describes a sample (known, varies from sample to sample).
  • When asked to classify a variable, give the type and a reason in context.
Practice
  1. A fitness study records, for each of 40 volunteers, the age in years, the type of exercise they chose (run, bike or swim), the number of workouts completed last week, and the minutes needed to run 2 kilometers. Identify the observational unit and classify each variable.
    Show answer

    The observational unit is a volunteer. Age: quantitative (continuous, since it is a measured time since birth). Type of exercise: categorical. Number of workouts: quantitative and discrete (a count). Minutes to run 2 km: quantitative and continuous.

  2. A researcher counts the number of birds in each of 300 photographs taken by trail cameras. Identify the observational unit and the variable, and classify it.
    Show answer

    The observational unit is a photograph. The variable is the number of birds in the photograph, which is quantitative and discrete (a count).

  3. A teacher says a student's identification number is a quantitative variable because it is a number. Explain why this is incorrect.
    Show answer

    An ID number labels each student. It does not measure or count anything, and arithmetic on ID numbers (such as finding their mean) has no meaning, so it is a categorical variable.

  4. In a random sample of 500 voters in a state, 46% support a ballot measure. Identify the parameter and the statistic in context.
    Show answer

    Parameter: the proportion of all voters in the state who support the measure (a fixed but unknown number). Statistic: the sample proportion, 0.46, computed from the 500 sampled voters.

  5. A different random sample of 500 voters from the same state supports the measure at a rate of 49%. Does this mean the first sample was wrong? Explain using the words parameter and statistic.
    Show answer

    No. The two samples give two values of the statistic (0.46 and 0.49). Statistics vary from sample to sample, while the parameter, the true proportion for all voters, does not change. Neither value is expected to equal the parameter exactly, but each is an estimate of it.

  6. Customer service messages are collected, and for each message a worker records whether the tone is positive, neutral or negative, and the number of words. Which variable is categorical and which is quantitative?
    Show answer

    The tone is categorical (labels). The number of words is quantitative (a discrete count).

← 1.1 Statistical studies: asking questions with data1.3 One categorical variable: tables and graphs →

Keep going in the full AP Statistics course

All of U1 (Exploring One-Variable Data and Collecting Data) is free to everyone, with no account. The course has 51 lessons, each with worked examples and practice problems that come with full solutions. A free account can also start a free month of the whole course, with no card.

Open this lesson in the courseSee the whole course