1
$\begingroup$

I just found this explanation for the different statistical data types, but I'm still not sure what the difference between ordinal categorical and numerical discrete variables is.

The example for ordinal data given in this link was the rating of a restaurant in stars. But they define numerical discrete data as follows:

Discrete data represent items that can be counted; they take on possible values that can be listed out. The list of possible values may be fixed (also called finite); or it may go from 0, 1, 2, on to infinity (making it countably infinite). For example, the number of heads in 100 coin flips takes on values from 0 through 100 (finite case), but the number of flips needed to get 100 heads takes on values from 100 (the fastest scenario) on up to infinity (if you never get to that 100th heads). Its possible values are listed as 100, 101, 102, 103, . . . (representing the countably infinite case).

In my opinion the star rating of a restaurant perfectly fits into this definition. Its a finite number of stars and i can count them. Why is this ordinal data? Is this example just wrong? If yes: could anybody provide me another example for ordinal data?

I want to understand this because i want to convert this data to numerical features. I can convert nominal categorical data to onehot vectors, but I'm not sure what's the right way to convert categorical ordinal features.

$\endgroup$
0
$\begingroup$

Indeed, nothing shows the deficiencies of a classification system better than applying it to the real world.

The difference between ordinal and discrete numerical data is not always as clear cut as we'd like, and this is exactly what you're running into here.

The difference between the star rating of the restaurants and the coin flips they use as an example for discrete data is the distance between the numbers. For example: while everyone would agree that a two-star restaurant is better than a one-star restaurant, giving a restaurant two stars does not imply that you like it twice as much as the one-star restaurant. Similarly people do not necessarily agree that the "quality difference" between a four and a five star restaurant is the same as that between say a one and a two star restaurant, if only because the five star restaurant absorbs all restaurants at the top.

In contrast two coin flips is exactly twice as many as one coin flip, and the difference between four and five coin flips is the exact same difference as between one and two coin flips.

A consequence of the difference between these data types is that calculating descriptive statistics like the mean are a doubtful practice for ordinal data (although it's often done) while it's perfectly reasonable for discrete numeric data.

$\endgroup$
1
$\begingroup$

The reason a (restaurant) star rating does not fit the definition 'numerical' data type has to do with the following assumptions/'demands' numerical data has to meet:

- 'assumption of order',
Both numerical and ordinal data comply with this.
example: '3' is bigger/more than '4', as is '3' compared to '2' etc (the counting example)
Yes, your star rating complies with this assumption.


- 'assumption of equal intervals',
Here numerical data complies but ordinal data (your star rating -arguably- ) does not.
example: 3cm is 1cm less than 4cm, as is 2cm compared to 1cm. (The distances between are equal) But is the difference in appreciation for a restaurant between a 3 stars and 4 stars, the same as the total appreciation for a 1 star restaurant is?

Since this second 'assumption' is not met, your data is ordinal, not numerical (interval/ratio). Treating it as interval (numerical) would make false assumptions and -possibly- invalidate your test results.


Extra info;

  • A following 'assumption' ('true zero') can further seperate numerical data into either interval level data (no true zero) or ratio level data (true zero, eg. cm's)
  • All these assumptions/classifications of data types are relevant (among other things) in order to use the right statistical tests and algorithms.
  • interestingly, extremely common Likert-scales (especially in social sciences) are often used as interval or even ratio level data type (in order to use certain hypothesis test), though technically of an ordinal nature..


$\endgroup$
0
$\begingroup$

Ordinal data is by its nature discrete, meaning that the possible values can be listed, as the definition you posted states. What's unique to ordinal data is the fact that the values of this type of data can be put into a logical order. A star rating of a restaurant, for example, is both discrete and ordinal. A four-star rating is better or higher than a three-star rating, which is better than a one-star rating. This can be useful for numerical encoding, since encoding your star ratings as 1, 2, 3, 4, 5 could still allow you to do some inference using the numerical values. That said, on an ordinal scale, a 4-star restaurant isn't necessarily twice as good as a 2-star restaurant. The values can be ordered, but we can't really make any assumptions about the interval between the values.

Eye color is an example of data which is discrete, but not ordinal. The different eye colors can be listed out, but there's no inherent ordering to this data type, so it's not ordinal. Mapping these to numerical values isn't very useful, since there's no meaningful order. There's no reason to prefer mapping {blue, green, brown} to {1, 2, 3} vs. {2, 1, 3}.

$\endgroup$
3
  • $\begingroup$ ok, so if i understand you correctly it should be fine to convert the star rating to a single numerical value (1 for one star, 2 for 2 stars ...)? The eye color is a nominal categorical variable which i would have converted as onehot vector. (0,0,1) => blue (0,1,0) => green, (1,0,0) => brown for example. $\endgroup$ – Yannic Klem Nov 7 '17 at 13:44
  • $\begingroup$ @YannicKlem Converting an ordinal variable to a numeric one is "more" correct than converting a generic discrete variable to numeric, but do be careful. With numeric values, 4 is twice as much as 2, which is twice as much as 1. Typical ordinal scales aren't calibrated in this way, so a 4-star restaurant isn't necessarily twice as good as a 2-star restaurant. We know that it's better, due to the implicit ordering of the ordinal variable, but we don't know how much better, so numerical analysis can be tricky. $\endgroup$ – Nuclear Hoagie Nov 7 '17 at 13:57
  • $\begingroup$ Ok, i think i got it. Tank you :) Unfortunately my reputation on this platform is too low, so my upvote doesn't count :/ $\endgroup$ – Yannic Klem Nov 7 '17 at 14:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.