
variables
Variables are…
Different types of variables.
[Photos.]
Qualitative Variables
Nominal
Nominal variables are categorical and their values cannot be structured in any particular ranking or ordering. Examples of nominal variables are:
Colours (red, blue, green)
Fruits (apples, oranges, bananas)
Gender (male, female, other)
Often, nominal variables are non-numerical. For the variable “fruits”, this means that “apples” and “oranges” do not have a corresponding number. Because statistical programs can only read numbers, we cannot run calculations with nominal variables unless we have assigned a number with each value (the fruit options) in the variable.
For the nominal variable “fruits”, we can assign 1 = “apples” and 2 = “oranges”. However, the numbers do not have any particular significance. An increase from 1 to 2, (meaning a change from apples to oranges) does not mean anything unless we order the fruits in some way.
One way of ordering could be based on favourability. For example, you might favour some fruits over others and so you might want to rank the fruit options where the lowest number has the lowest favourability. If there are only three fruit options, and oranges is your favourite, then oranges would be assigned the number “3”.
If you decide to rank the fruits on favourability, you would effectively have created a new variable because the ordering of the fruits now have a signifince. You might call this variable “personal_fruit_favourites”. However, because the ordering of fruits is now meaningful, this variable is no longer nominal but instead ordinal.
Ordinal
Ordinal variables are similar to nominal variables because only non-numerical data is considered. However, the values in ordinal variables are arranged in a meaningful order.
Let us understand ordinal data with some examples.
Quality (excellent, good, neutral, poor, aweful)
Grades ( A, B, C, D, E, F)
Class (poor, middle-class, rich)
Quantitative Variables
Quantitative variables contain data that represents numerical information and can therefore be quantified, counted, measured, and used in calculaltions. This data can be represented in graphs and charts (bar graphs, histograms, scatterplots, etc). Let us understand quantitative data with some examples.
Marks in a test
Temperature
Weight
Sales figure
These are some common examples of numerical data. It will always represent information in numerical form. There are two major types of quantitative data: Discrete and continuous. Let us know about them in detail.
Discrete
Discrete data is used to represent distinct or separate numerical values. They are discrete because they can be presented in the form of whole numbers or integers, which cannot be divided into smaller parts.
However, the discrete data can be counted and is not infinite. They can be easily represented by various graphs and charts, such as bar graphs, number lines, etc. Let us understand with a few examples given below.
Total number of students in college
Number of cars in parking area
Number of members in a family
Number of wheels in a car
Continuous
Continuous data is a data type that deals with an infinite range of numerical data. They are generally defined within a specific range, with any value within that range. It can be easily divided into smaller fractional or decimal values. They are generally used in fractional form, unlike discrete, which uses only whole numbers or integers.
The main difference between continuous data and discrete data is that discrete data cannot be presented in decimal or fractional form, while continuous data can be presented in fractional form. Let us understand it with some common examples.
Height of a person
Temperature in celsius or fahrenheit
Weight in pounds or kilograms
Distance in meter or kilometers
Share price of market
The examples given above can easily be presented in decimal or fraction form, hence known as discrete data.