Professor Turing

Study guides

Nominal and ordinal data

Last updated: 2026-11-26

Nominal data name categories that have no order, such as major or hair color. Ordinal data name categories that do have an order, such as a satisfaction rating, but the gaps between neighboring categories are not known to be equal. To classify a variable, ask whether the categories can be ranked, and then ask whether the distances between ranks mean anything.

Start learning No account needed

1. Two questions to ask

  1. Could you shuffle the categories without losing information? If yes, treat the variable as nominal.
  2. If the order matters, is a step from the first to the second category known to be the same size as the next step? If you cannot say so, treat it as ordinal.

Writing numbers on the categories does not answer either question. Online Statistics Education, in a chapter by Dan Osherson and David Lane, uses a satisfaction scale from very dissatisfied to very satisfied, and says that switching the answers to numbers does not change the meaning of the scale.

2. A worked example: a ten-student survey

Ten students give their major, a nominal variable. Separately, five students in each of two courses rate their course from 1 (very poor) to 5 (very good), an ordinal variable. The answers are made up. Course A gets 3, 3, 3, 3, 3. Course B gets 1, 1, 4, 4, 4. Which course rated higher? Decide before you read on. The numbers are computed by scripts/nominal-vs-ordinal-data-worked-example.py in the Professor Turing repository.

majors: art 2, biology 5, history 3, mode = biology
mean of major codes, coding 1 = 2.1, coding 2 = 2.2
codes 1,2,3,4,5:   course A mean = 3.0, median = 3; course B mean = 2.8, median = 4
codes 1,2,3,10,11: course A mean = 3.0, median = 3; course B mean = 6.4, median = 10

For majors, the count in each category and the most common one, biology, describe the data. A mean of major codes is 2.1 under one numbering and 2.2 under another, and neither describes a major, because the numbers are arbitrary labels.

For ratings, the usual numbering gives course A a mean of 3.0 and course B a mean of 2.8, so A looks higher. Now keep the same order but number the five answers 1, 2, 3, 10, 11. Course B's mean becomes 6.4 and A's stays at 3.0, so B looks higher. The data did not change, and neither did the order of the answers. The comparison of means depended on the spacing we chose. The comparison of medians pointed the same way under both numberings.

The medians do not tell the whole story: two of course B's five students gave the lowest rating. Showing the count in each category, for example 3 of 5 in B rating 4 or higher and none in A, keeps that visible.

3. Which summaries and tests fit

NominalOrdinal
Counts and proportionsYesYes
ModeYesYes
Median and percentilesNo order to useYes
MeanNoDebated, see below

For tests, Pearson's chi-squared test of independence can check whether two categorical variables in a table of counts are related. For comparing two independent groups, the Mann-Whitney U test needs responses that are at least ordinal. The chi-square statistic adds up one term for each count, so reordering the categories leaves it unchanged, and on ratings it does not use their order. Choose the test from your design and question as well as the level of measurement.

The rows on mode, median and percentiles follow the measurement levels as Wikipedia summarizes S. S. Stevens's scheme. Stevens did not allow a mean for ordinal data, and the same article says statisticians have not generally endorsed those restrictions.

4. A common misconception: numbered answers can be averaged without a second thought

Sources differ here, so know what your course expects. Wikipedia's article on ordinal data says computing the mean of ordinal data is discouraged and that the median or mode is generally more appropriate. Osherson and Lane report that the prevailing, though not unanimous, opinion among statisticians is that the mean of an ordinal variable is meaningful in almost all practical situations, and that in extreme cases it can be very misleading. Our two courses are a small constructed case of that risk.

If you report a mean for ratings, say that you assumed equal spacing, and show the counts beside it.

5. Test yourself

Classify each as nominal or ordinal and give one sentence of reason.

Case 1. Blood group.

Answer to case 1

Nominal. The groups are names with no ranking.

Case 2. Finishing place in a race: first, second, third.

Answer to case 2

Ordinal. The places are ranked, and they do not say how far apart the runners finished.

Case 3. The brand of each student's smartphone.

Answer to case 3

Nominal. The brands are names with no agreed order.

Case 4. Temperature in degrees Celsius.

Answer to case 4

Neither. It is an interval scale: differences are meaningful, and zero does not mean no temperature.

For a related question, see how to study for a statistics exam and how to test yourself.

What the sources found, and their limits

Wikipedia, "Ordinal data" and "Categorical variable." Ordered categories with unknown distances, the advice against means, and the name for two-valued variables. Limits: reference articles under CC BY-SA 4.0. Sources: Ordinal data and Categorical variable, read on 2026-11-25.

Online Statistics Education, "Levels of Measurement," Dan Osherson and David M. Lane. The satisfaction example and the debate over means. Source: onlinestatbook.com, read on 2026-11-25.

Wikipedia, "Mann-Whitney U test." The conditions for the test, including independent observations and at least ordinal responses. Limits: an encyclopedia article under CC BY-SA 4.0, and the test has further conditions we do not list. Source: Mann-Whitney U test, read on 2026-11-25.

Wikipedia, "Pearson's chi-squared test." Describes the test for categorical data, including the test of independence, and gives the statistic as a sum over the cells. Limits: a reference article under CC BY-SA 4.0; the point about reordering is our reading of the formula. Source: Pearson's chi-squared test, read on 2026-11-25.

Wikipedia, "Level of measurement." Stevens's permitted summaries, the dispute over them, and finishing places as ordinal. Limits: an encyclopedia article. Source: en.wikipedia.org, read on 2026-11-25.

Wikipedia, "Statistical data type." Blood type as a categorical example. Source: en.wikipedia.org, read on 2026-11-25.

The survey, the renumbering and the self-test cases are ours.

How Professor Turing helps

Professor Turing is a tutor for adults learning any subject, in college or on their own. It asks you questions instead of giving the final answer, does not grade a bare guess, and remembers what you got wrong. No account is needed to start. It's an AI tutor, free to try.

Bring a survey question you are trying to classify. Its first reply asks about your attempt, such as which level you picked and why, before it teaches anything. You must be 18 or older, and guest conversations are deleted 7 days after the last activity.

FAQ

Is a Likert item nominal or ordinal? A single rating such as very dissatisfied through very satisfied has an order, so it is ordinal. The distances between neighboring answers cannot be assumed equal because you number them 1 to 4.

Is binary data nominal or ordinal? It depends on whether the two categories have an order that matters to your question. Wikipedia's article on categorical variables calls a variable with exactly two values binary or dichotomous. Its article on levels of measurement lists two-value data such as sick and healthy as ordinal. State your reading and check your course's convention.

Start with what you're working on

Tell the tutor which variable you are classifying and let it ask you the questions.

Start learning No account needed

See also: how to study for a statistics exam · all study guides