Start with what the values represent
A variable is something recorded for each case in a dataset. If each row represents a survey respondent, variables might include their preferred study location, satisfaction rating, and hours spent studying last week. To identify a variable’s type, ask what its values mean—not just whether they contain words or digits.
Three questions help. Do the values name groups? Can those groups be placed in a meaningful order? Do the values measure or count an amount, so that differences between them have a useful interpretation? The answers point toward categorical, ordinal, and numerical variables. This distinction matters because it guides how you summarize results and what comparisons you can reasonably make.
Categorical variables name groups
A categorical variable assigns cases to groups without a meaningful ranking. Preferred study location might have values such as home, library, or café. You can count how many respondents chose each location and report the most common choice. But it would not make sense to calculate an average location or say that library is greater than home.
Categories can be stored as numbers. Suppose a form records home as 1, library as 2, and café as 3. Those digits are codes, not quantities: changing the codes would not change the underlying answers. The same caution applies to identifiers such as student numbers and postal codes. They may consist of digits, but arithmetic on them does not answer a useful question about the people or places they identify.
Some categorical variables have only two possible values, such as yes and no. They still name groups. A code of 0 or 1 can make them convenient to store or analyze, but the coding choice alone does not make the underlying response a measured amount.
Ordinal variables have an order, but uncertain gaps
An ordinal variable contains categories that can be ranked. Consider a satisfaction response of very dissatisfied, dissatisfied, neutral, satisfied, or very satisfied. A higher response indicates greater satisfaction, but the step from neutral to satisfied need not be the same size as the step from satisfied to very satisfied. The ordering is meaningful; the distance between adjacent labels is not clearly established.
That distinction affects how you describe the data. Counts and percentages for each response show the distribution. You can also identify a middle response or combine adjacent categories when there is a clear reason to do so. An average of scores coded 1 through 5 is sometimes used as a compact summary, but its interpretation depends on treating those steps as roughly comparable. Showing the response distribution alongside such an average gives readers more context.
Other common ordinal examples include rankings, low-medium-high priority labels, and age bands such as under 20, 20–39, and 40 or older. Age itself can be numerical; once recorded only in bands, the dataset no longer contains each person’s exact age.
Numerical variables express amounts
A numerical variable records a count or measurement for which arithmetic differences are meaningful. Hours studied last week is numerical: the difference between 4 and 6 hours is two hours, as is the difference between 8 and 10. The number of sources a student consulted is also numerical, even though it takes whole-number values rather than fractions.
Measurements may allow many values within a range, while counts usually take nonnegative whole numbers. Both can often be summarized with a median or mean, though the best summary depends on the distribution. For example, if most people studied a few hours and a small number studied far longer, reporting the median alongside the range may be more informative than relying on the mean alone.
Not every number invites every calculation. Calendar years, for instance, have meaningful differences in years, but treating one year as “twice” another is not meaningful. Before using ratios, percentages of change, or averages, check what the variable measures and what the proposed calculation would say in ordinary language.
Use the research question as a final check
The same topic can produce different variable types depending on how it is recorded. Ask for exact hours studied and you have a numerical variable. Offer choices of 0–2, 3–5, and 6 or more hours and you have ordered groups. Ask whether someone studied at all and you have two categories. Each version supports a different level of detail, so decide what you need to learn before designing the question.
When checking an existing dataset, read the variable description and a few possible values. Then ask whether reordering the values changes their meaning, and whether subtracting two values produces a meaningful difference. Groups with no inherent order are categorical; ordered groups with unclear spacing are ordinal; measured or counted amounts are numerical. This quick check can help you avoid misleading averages and choose a display that fits: category counts, an ordered bar chart, or a distribution of numerical values.



