AI Glossary / Data science and analytics / Beginner

Ordinal variable

Definition

An ordinal variable is a categorical variable whose categories have a meaningful order. It tells us which category is higher, lower, earlier or more severe, but the ordering alone does not establish equal distances between categories.

What it means

Examples include low, medium and high priority, or strongly disagree through strongly agree on a survey item. The categories carry more information than unrelated labels because their order matters.

However, “high” is not automatically twice “medium,” and the difference between two neighboring categories need not be constant. Numbers assigned to categories may be convenient codes rather than measurements of quantity. Coding low as 1, medium as 2 and high as 3 does not create equal intervals.

This distinction matters when designing reports and AI models. A system that treats every numeric-looking column as a continuous measurement may impose relationships that the data never established. The meaning of the variable comes from its definition and measurement process, not its storage format.

How it works

Start by defining the categories and their intended order. Make the direction explicit: a larger code might mean better quality in one dataset and greater severity in another. “Unknown” and “not applicable” usually need separate treatment rather than positions on the substantive scale.

Describe the distribution with counts and proportions in each category. Cumulative proportions can answer questions such as how many responses were at least “satisfied.” A median category can summarize the middle of an ordered distribution, with the convention stated when the middle falls between categories.

For modeling, choose an approach that suits the variable's role. An ordinal outcome can be handled by ordinal regression, while ordinal predictors need a considered encoding. Treating category codes as a single linear predictor imposes an extra relationship between steps. Different models have different assumptions; the label “ordinal” does not select one method automatically.

Three practical examples

  • A service team records ticket priority as routine, important or urgent, while keeping actual waiting time as a separate numerical measurement.
  • A survey records satisfaction in five ordered categories and reports the percentage choosing each response.
  • An AI evaluation rubric grades answers as unacceptable, partly acceptable or acceptable, with written criteria and separate records of reviewer disagreement.

Think of it this way

Think of a podium showing first, second and third place. It gives an order, but it does not tell you whether the winner finished a fraction of a second or several minutes ahead.

The analogy is limited because ranks and rating categories are not identical: many respondents may choose the same category. The shared point is that ordering does not, by itself, measure the size of a difference.

Worked example

Suppose five fictional customers rate a service as poor, fair, good, good and excellent. The middle observation is good. Two of the five customers chose good, and three chose good or excellent, giving a cumulative favorable proportion of 3/5 = 60% under that stated definition.

Now assign codes 1, 2, 3 and 4 to poor, fair, good and excellent. The coded mean is (1 + 2 + 3 + 3 + 4)/5 = 2.6. If the same ordered categories receive codes 1, 2, 4 and 10, the mean becomes 4.2.

Both coding schemes preserve the category order. The change shows that the numerical mean depends on the chosen spacing. It is not an intrinsic measurement supplied by the ordinal labels alone. The category counts and the stated 60% proportion remain unchanged.

Illustrative case study

Illustrative fictional case: ClearPath Support gives an AI model a priority field coded 1, 2 and 3. Its first report says that urgent tickets have “three times the priority” of routine tickets.

The report owner removes that interpretation because the codes are ordered labels, not a ratio scale. The team keeps the priority distribution visible and reports waiting times separately. It also checks that an “unknown” code of 9 is not interpreted as an even more urgent category.

When evaluating a predictive model, the analysts review how the encoding affects its behavior instead of assuming that any numeric representation is appropriate. This fictional case illustrates measurement and interpretation; it does not report a measured improvement in model performance.

Common misconceptions and mistakes

Do not assume that assigning integers turns categories into equally spaced measurements. Do not multiply or divide category codes and interpret the result as a meaningful ratio.

Avoid placing missing or inapplicable responses at one end of the scale. Do not reverse the category order accidentally when combining datasets. Also avoid the opposite overstatement that every use of a mean with rating data is automatically invalid: such an analysis needs additional justification and transparent assumptions, especially when a constructed multi-item scale is involved.

Business use

Document category definitions in a data dictionary, including the direction of the scale and rules for uncertain cases. For dashboards, show distributions rather than relying entirely on one average score.

When AI reads a table, provide the category labels and explain which arithmetic interpretations are unsupported. For an evaluation rubric, train reviewers on boundary cases and examine disagreements. A well-ordered set of labels is useful, but it does not guarantee consistent measurement, valid comparisons across groups or a meaningful equal-step scale.

People also ask

Is a star rating ordinal?

A single rating is commonly treated as ordered categories. Assuming equal psychological distance between adjacent stars requires further justification.

Can an ordinal variable be stored as text?

Yes. “Low,” “medium” and “high” can be text values with an explicitly defined order.

Does ordinal regression assume equal distances between categories?

It need not assume equal spacing of the observed categories. Particular models, such as proportional-odds models, have other assumptions that must be assessed.

Check your understanding

A company changes priority codes from 1, 2, 3 to 10, 20, 100 without changing the category definitions. Has the urgency of the underlying cases changed?

Answer: No. The labels still represent the same ordered categories. Arithmetic summaries of the codes may change, which is why their spacing should not be mistaken for measured urgency.

Related terms

  • Categorical variable
  • Ordinal regression
  • Median
  • Frequency distribution
  • nominal variable
  • measurement scale
  • Likert item
  • feature encoding

Learn next

Read nominal variable and ordinal regression. Choose one rating field and write its category order, direction and missing-value rules. Compare its category distribution with a coded average, then state which conclusions survive an order-preserving change of codes.

  • Ordinal regression

More in Data science and analytics

  • Operational analytical processing - Operational analytical processing uses data analysis to support decisions within ongoing operations.
  • Operational reporting - Operational reporting presents information about day-to-day activities so that people can monitor work, identify exceptions and decide what needs attention.
  • Optimal matching - Optimal matching, in sequence analysis, measures how different two ordered sequences are by finding the least costly set of insertions, deletions and...
  • Outlier - An outlier is an observation that is unusually different from the other observations or from the pattern expected under a specified model.
  • p-hacking - P-hacking is the practice of selecting or changing data analyses in response to their results so that a desired finding appears statistically significant...
  • Percentile Bootstrap Confidence Interval - A percentile bootstrap confidence interval estimates uncertainty by repeatedly resampling the observed data, recalculating a statistic and taking specified...

Sources

Australian Bureau of Statistics, ordinal-variable definition: https://www.abs.gov.au/statistics/understanding-statistics/statistical-terms-and-concepts/statistical-terms-and-concepts-glossary

Australian Bureau of Statistics, rating-scale design and interpretation: https://www.abs.gov.au/book/export/31170/print

UCLA OARC, ordinal logistic regression: https://stats.oarc.ucla.edu/spss/dae/ordinal-logistic-regression/

Statsmodels, ordinal regression examples: https://www.statsmodels.org/stable/examples/notebooks/generated/ordinal_regression.html

The customer ratings and support case are fictional illustrations.

Previous: Ordinal utility function Next: Ordinary Least Squares

  • Home
  • Daily AI Updates
  • Blog
  • AIFBL Academy
  • AI Glossary
  • Products and Tools
  • Store
  • Free CFO AI Prompt Pack
  • About Shihan Sheriff
  • Privacy Policy
  • Terms of Use
  • Refund Policy
  • Cookie Policy
  • Earnings Disclaimer