Variables may be classified as categorical, with values expressed as labels or ordered groups; discrete numerical, with separate countable values produced by counting; or continuous numerical, with any value in an interval in principle, as in measurement. This distinction supports appropriate data displays, summaries, and models, while clarifying that numerical codes for categories are not measurements and that rounding a continuous measurement does not make the underlying variable discrete.
To classify a variable, ask what its values mean and how they are obtained.
Categorical data are labels or groups. They may be:
Even if categories are given numerical codes, they are still categorical. For example, coding eye colours as brown, blue, and green does not make eye colour numerical data.
Discrete numerical data are numbers produced by counting. The possible values are separate, such as . You cannot usually have a fraction of the object being counted.
Continuous numerical data are measurements. In principle, a measurement can have any value within an interval, even if it is rounded when recorded.
Worked example
A school surveys students and records:
Classify each variable.
Step 1: Method of travel
Possible values might be bus, car, bicycle, or walking. These are labels, not amounts that can be added or measured.
Therefore, method of travel is categorical data.
Step 2: Number of pets
Possible values are counts such as . A student can have pets or pets, but not usually pets.
Therefore, number of pets is discrete numerical data.
Step 3: Travel time
Travel time is measured. A student’s actual time could be minutes, minutes, or another value in an interval. Recording it as minutes is only rounding the measurement.
Therefore, travel time is continuous numerical data.
So the classifications are:
| Variable | Type | Reason |
|---|---|---|
| Method of travel | Categorical | Values are labels |
| Number of pets | Discrete numerical | Values are counted |
| Travel time | Continuous numerical | Values are measured and can vary continuously |
When deciding, remember: labels are categorical, counts are discrete, and measurements are continuous—even when measurements are rounded.
Click a topic below to practice the foundational skills you'll need, learn the steps, or master this skill
Earned ?