Discover Variables and Field Types
Learning Objectives
After completing this unit, you’ll be able to:
- Identify different types of variables.
- Differentiate between nominal qualitative, ordinal qualitative, and quantitative variables.
- Differentiate between continuous and discrete variables.
Types of Variables
In the Well-Structured Data module you learned that data is organized into columns, or fields. In well-structured data, each field represents a single variable.
Variables are the building blocks of data. When you organize data into a table, these variables become fields (the vertical columns). Depending on what you’re measuring, these fields fall into two main categories:
Qualitative fields (categorical): Qualitative variables describe characteristics or qualities that cannot be measured by numbers. In a data set, these appear as qualitative fields (columns).
Quantitative fields (numerical): Quantitative variables represent amounts that can be measured or counted. In a data set, these appear as quantitative fields (columns).
Because quantitative data deals with numbers, we further divide it into two specific types based on how those numbers are collected:
- Discrete variables: Numbers that are counted and have clear stops between them. You cannot have a fraction of a count. For example, “Number of Items” can be 1 or 2 items, but not 1.5.
- Continuous variables: Numbers that are measured and can take any value within a range, including decimals. For example, “Height” can be 5.75 feet.
In the following table, the Name and Favorite Food columns capture descriptive characteristics, so they’re qualitative fields. The Age and Height columns capture numerical measurements, so they’re quantitative fields.
Each column header represents a unique variable, while each row contains the data for one specific individual.
Name | Age | Height | Favorite food |
|---|---|---|---|
Aliya | 8 | 4'2" | Ice Cream |
Miles | 12 | 5'3" | Olive Pizza |
Penny | 42 | 5'7" | Corn on the Cob |
Vince | 39 | 5'10" | Pancakes |
In the above table:
- Age is a discrete quantitative field (you usually count age in whole years).
- Height is a continuous quantitative field (it can be measured precisely with decimals).
Types of Qualitative Variables
Qualitative variables—variables that can’t be measured numerically—can be further classified into two types: nominal and ordinal.
- Nominal: Nominal qualitative variables are categories that cannot be ranked. For example, let's consider a few types of fruit: bananas, grapes, apricots, and apples. These are nominal variables because there is no implied ranked order among them. A banana, for instance, is not ranked more highly than an apricot.
One way to remember the definition of a nominal variable is: Nominal = Named.
- Ordinal: In contrast to nominal qualitative variables, ordinal qualitative variables can be ranked. They are qualitative because they are not numerically measurable, but there is a logical rank-order among them. For example, think of surveys you may have taken. Examples of ordinal qualitative values on surveys are: Never, Sometimes, Mostly, Always, Extremely dissatisfied, Dissatisfied, Neither satisfied nor dissatisfied, Satisfied, Extremely satisfied.
One way to remember the definition of an ordinal variable is: Ordinal = Ordered.
Now let's check your understanding. In the following activity, you determine whether each characteristic is a nominal qualitative variable, an ordinal qualitative variable, or a quantitative variable. Drag each set of characteristics to the appropriate category.
Discrete and Continuous Variables
Another classification we can apply to variables includes discrete and continuous variable types.
- Discrete Variables: Discrete variables are individually separate and distinct. Simply stated, if you can count it individually, it is a discrete variable. For example, you can count the number of children in a household individually. A household can have 0 children, 3 children, 6 children, and so on, but it can not have 3.45 children.
The number of toes on a foot and the total number of socks in a drawer are also examples of discrete variables. The total number of toes on all the feet of all the people in your city is even a discrete variable. It would take a long time to individually count all those toes, but it's still possible to do so.
- Continuous Variables: Continuous means forming an unbroken whole, without interruption. These are variables that cannot be counted in a finite amount of time because there is an infinite number of values between any two values. For example, if you want to measure time, every unit of time can be broken into even smaller units: The response time to a stimulus could be expressed as 1.64 seconds, or it could be further broken down and expressed as 1.642378765 seconds, and so on, infinitely. Other examples of continuous values include temperature, distance, and mass.
Use these interactive flashcards to test your understanding of discrete and continuous variables.
Read the example on each card, think about whether it is discrete or continuous, and then click on the card to reveal the correct answer. Click the right-facing arrow to move to the next card, and the left facing arrow to return to the previous card.
In the next unit, you look at how the different variable types are used in data visualizations.
Resources
- Book: Lane, David M. Introduction to Statistics. Online Statistics Education: An Interactive Multimedia Course of Study, 2020.
- Tableau Help: Dimensions and Measures, Blue and Green
