03 · What You Need to Know
Start With What the Values Mean
Binary variables have two categories
A binary or dichotomous variable has two possible categories. Examples include yes/no, present/absent, completed/did not complete, treatment/control, and positive/negative.
The CDC describes dichotomous variables as nominal variables with two mutually exclusive categories. Penn State likewise treats binary variables as a form of categorical data.
Binary variables are frequently coded 0 and 1, but those numbers generally function as category codes. The coding can be computationally convenient, yet it does not mean that the substantive variable has become continuous.
Nominal variables have categories without an intrinsic order
A nominal variable classifies observations into categories that do not have an inherent quantitative ranking.
Examples might include blood type, academic program, country of residence, mode of transportation, or research methodology category.
If academic programs are coded engineering = 1, business = 2, and education = 3, the numbers remain labels. Education is not quantitatively “greater than” business because its code is larger.
NIST describes a nominal scale as classification without intrinsic ordering among the classes. That property is more important than whether the categories are represented by words, letters, or numbers.
Ordinal variables add meaningful order
An ordinal variable also consists of categories, but those categories have a meaningful ranking.
Examples include disease stage, educational attainment, class standing, agreement categories, or severity classifications such as mild, moderate, and severe.
What ordinal measurement does not guarantee is equal spacing. The CDC notes that ordinal values can be ranked but are not necessarily evenly spaced. NIST similarly emphasizes that ordinal scales support ordering, while differences between values are not necessarily comparable.
This is why coding low = 1, medium = 2, and high = 3 does not establish that the difference between low and medium is quantitatively identical to the difference between medium and high.
Continuous variables represent quantities along a continuum
A continuous variable is quantitative and can, conceptually, take any value within a range. Examples include height, weight, duration, blood pressure, and many physical measurements.
The CDC defines continuous variables as having the potential for an infinite number of values along a continuum. In practice, instruments record finite precision, but that does not necessarily alter the conceptual type of the underlying variable.
The broader continuous-versus-categorical distinction is useful because these kinds of variables generally require different descriptive and analytical treatment.
| Type |
Defining feature |
Example |
Does order matter? |
| Binary |
Exactly two categories |
Completed / did not complete |
Not necessarily |
| Nominal |
Categories without intrinsic order |
Academic program |
No |
| Ordinal |
Ordered categories without necessarily equal spacing |
Low / moderate / high |
Yes |
| Continuous |
Quantitative values along a continuum |
Time in seconds |
Yes, with quantitatively meaningful differences under the relevant measurement scale |
Binary is usually a special case, not a separate level of measurement
Binary, nominal, ordinal, and continuous are frequently listed together for practical convenience, but they do not occupy exactly the same conceptual level.
A binary variable tells you that there are two possible categories. Nominal and ordinal tell you something about the relationship among categories. A binary variable can therefore be nominal, and in some settings an ordering of its two states may also be substantively meaningful.
Penn State notes that for binary variables such as pass/fail, the distinction between nominal and ordinal treatment may make little practical difference for many purposes.
It is therefore more precise to think of binary as describing the number of categories rather than as a wholly separate measurement scale parallel to nominal and ordinal.
Discrete quantitative variables complete an important missing piece
Where does “number of children” fit? It is not nominal, ordinal, or continuous in the usual sense.
It is a discrete quantitative variable. Its values have numerical meaning, but the possible values are countable. Number of publications, hospital visits, errors, courses completed, or citations within a defined period are similar examples.
Penn State distinguishes discrete quantitative variables from continuous ones: counts take countable values, whereas continuous quantities such as elapsed time can vary along a continuum.
Categorical variables
Include nominal and ordinal variables; binary variables are commonly a two-category special case.
Quantitative variables
Include discrete variables such as counts and continuous variables such as time, distance, and weight.
Nominal and ordinal describe more than whether categories use numbers
Consider educational attainment coded as:
- 1 = less than high school;
- 2 = high school;
- 3 = two-year degree;
- 4 = bachelor's degree;
- 5 = master's degree;
- 6 = doctoral or professional degree.
The values are ordered, but the numerical difference between adjacent codes does not necessarily represent an equal amount of educational attainment. Penn State therefore classifies this kind of variable as categorical rather than quantitative.
Compare that with number of courses completed. Values 1, 2, 3, and 4 represent actual counts, and the difference between one and two courses has the same numerical interpretation as the difference between three and four. The second variable is quantitative and discrete.
Identical-looking integers can therefore encode very different information.
What about Likert-type responses?
An individual Likert-type item, such as strongly disagree, disagree, neither agree nor disagree, agree, and strongly agree, consists of ordered categories. At the item level, it is therefore naturally described as ordinal.
Questions become more complicated when several items are combined into a scale score. Researchers sometimes analyze such composite scores using methods ordinarily applied to quantitative data, but that practice involves assumptions about the measurement properties of the resulting score. It should not be justified merely by saying that the responses were coded 1 through 5.
If several measures are combined, the resulting variable may also raise separate questions about what constitutes a composite variable and how the combination is justified.
A variable's representation can change
Suppose age is originally recorded in years and months. Researchers might later create categories such as 18–24, 25–34, and 35–44.
The first representation is quantitative and may be treated as continuous for many purposes. The second is an ordinal categorical variable because the age groups have a meaningful order.
The underlying characteristic is still age, but the representation has changed. This is why researchers should distinguish the construct or characteristic being studied from the variable actually entered into the analysis.
Creating categories from a continuous measure may sometimes serve a substantive or practical purpose, but it also changes the information available. The implications are considered more directly when deciding whether a continuous variable should be categorized.
Variable type affects what summaries are meaningful
Nominal variables are commonly summarized using frequencies and proportions. Ordinal variables can additionally support ordered summaries such as cumulative percentages. Quantitative variables can support numerical summaries of magnitude, although the appropriate measures depend on their distributions and measurement properties.
The CDC, for example, distinguishes frequency distributions for nominal and ordinal variables from summaries of continuous variables using measures of central location and spread.
Variable type also affects graphical display and model selection. A bar chart of categories answers a different question from a histogram of continuous measurements, just as logistic regression for a binary outcome serves a different modeling purpose from ordinary linear regression for an appropriately modeled continuous outcome.
Watch Out
Do not classify data by asking whether the software column contains numbers. Codes such as 0, 1, 2, and 3 may represent categories, ordered levels, counts, or genuine quantitative measurements. Inspect the variable definition and what each value means.
04 · A Practical Example
Classifying Variables in a Student Survey
Hypothetical Example
A survey of university learning experiences
A researcher surveys students about online learning and collects several variables that initially appear together as ordinary spreadsheet columns.
Completed an online course: yes/no This is a binary categorical variable because only two categories are possible.
Academic program Engineering, business, computing, and education have no inherent quantitative order, so this is a nominal categorical variable.
Self-rated proficiency Beginner, intermediate, advanced, and expert have an intrinsic order but no established equal spacing, making this an ordinal categorical variable.
Time spent studying Recorded as hours and minutes, study duration is naturally represented as a continuous quantitative variable.
Number of online courses completed This is a discrete quantitative variable because it represents a count.
Now imagine the researcher codes academic program as 1, 2, 3, and 4 and proficiency as 1 through 4. Both columns contain integers, but neither has become a continuous measurement. Academic program remains nominal; proficiency remains ordinal.
Meanwhile, number of courses also contains integers, yet those integers are genuine counts. The crucial difference is what the numbers represent.