Intro to statistics with R - Types of variables

S.S. Stevens' 1946 typology divides variables into four types: nominal (categories like country), ordinal (rankings), interval (equal spacing, like longitude), and ratio (true zero, like population or Kelvin temperature). Knowing which type you have determines which statistical methods work.
Chapters
In statistics, it's common to classify variables into four distinct kinds. And I'm going to follow suit with that tradition. And the four kinds are nominal, ordinal, interval, and ratio. You might think, where did these four kinds come from? They come from classic cognitive psychologist S.S. stevens, and this is a classic paper published in Science in 1946, where he outlined these four types of variables or four types of measurements. So let's start with the simplest type of variable, a nominal variable. A nominal variable, and it literally means to name types of instances of variables is to just assign individual cases to categories. So your country of origin is a nominal variable. It's just assigning individuals to categories. So country of origin is a nominal variable. It just allows me to distinguish some students from others. So there are some students from Brazil, some students from Argentina, some from Australia, India, the US and so on. The next type of variable is an ordinal variable. Ordinal variables are used to rank order cases in a data structure. So again, I might rank the countries according to population. So some countries like China, India, have much larger populations than smaller countries, say like France or really small country like Luxembourg have smaller populations. And if I just wanted to rank order them in terms of who has the highest population, that they get a number one, who has the second highest population, they get a number two, then ranking would be an ordinal variable. Interval variables are also used to rank order cases. So we can, we can order cases from top to bottom, but in this case, the distance or interval between each value is equal. That's why it's called an interval variable. So again, sticking with this theme of countries of origin, each country, if we look at the globe, has a longitude and a latitude. And I can compare the longitude and latitude of each country. And the distance from, say, 0 longitude to 100 longitude is the same as the distance from 100 longitude to 200 longitude. They're equal intervals, they're equal spaces. So longitude and latitude, those are equal interval variables. And in case you're not familiar with longitude, latitude, here's an image of the globe. So longitude just refers to east, west, where are you on the globe. And latitude just refers to north, south, where are you on the globe. And again, the point of this interval variable is the distance between, say, 0 degrees latitude, which is the equator, which is right here. The distance between 0 degrees latitude and, say, 30 degrees latitude is the same as the distance between 30 degrees latitude and 60 degrees latitude. So this distance is equal to this distance. That's the point of an interval variable is the intervals between each unit are equal. So we call them equal interval variables. Okay. The final type of variable is a ratio variable. This is the same as interval, but they also have a true zero point. So what I mean by a true zero point. So let's take population. When I talked about ranking the different countries, all I was doing is ranking them. I wasn't talking about the actual populations. If I wanted to look at the actual population, Population is a ratio variable, and it's a ratio variable because it has a zero point. So if the population of a country is zero, that's meaningful. That means humans are extinct in that country. Right? So it's a true. What we call a true zero. Another example is age. If your age is zero, you literally have no age. Another good example is temperature. So temperature on the Kelvin scale, which not used to temperature on the Kelvin scale. Unless you've taken a lot of chemistry courses, you might be used to that. But temperature on the Kelvin scale is a ratio variable because zero Kelvin is absolute zero. No temperature, it's absolute zero. So temperature on the Kelvin scale is a good example of ratio variable.
More from Richie

#359 My Best Friend is AI with Valerie Tiberius, Professor of Philosophy at University of Minnesota

How AI Agents Will Work While You Sleep | Ruslan Salakhutdinov, Professor at Carnegie Mellon

#358 How AI Agents Will Work While You Sleep | Ruslan Salakhutdinov, Professor at Carnegie Mellon







