Categorical (Qualitative) vs Numerical (Quantitative) Data..

Rina Mondal
2 min readDec 13, 2023

--

During dinner, my mom asked me whether I preferred rotis or rice for the meal, and I happily opted for roti (as I am a roti lover.. 😊). It was a an example of a categorical variable where I had to choose one option. Hence, we can say, categorical variables offer distinct and separate choices, and in this instance, the options were limited to the two dinner choices provided. However, in other scenarios, there might be more than two options, but the number of categories remains limited.

In contrast, when my mom asked how many rotis I needed, my response became a numerical variable since I had to answer with a specific number (such as two, three, four, etc.).

Numerical (Quantitative) variables can be classified into two types:

1. Continuous — For example, when my mom asks how much rice I want and I answer with 2.25 cups or 2.5 cups. In this case, the answer could be any value within a range, making it a continuous variable with infinite possibilities.

2. Discrete — When the number of rotis I desire can only be a whole number, it falls under the category of discrete variables.

Categorical (Qualitative) Variables can be classified to two types:

  1. Nominal: When there is no inherent order or ranking among the categories ex: roti and rice comes under nominal category. Each category is distinct and represents a different attribute without any implied hierarchy.
  2. Ordinal: When there is a clear order or ranking among the categories, but the intervals between the categories are not uniform or measurable known as ordinal variables. Ex: Educational Level is an ordinal variable as High School Diploma, Bachelor’s Degree, Master’s Degree are distinct ordered categories.

So, during dinner, we encounter both categorical and numerical variables.

Summarizing the whole concept, categorical variables are qualitative in nature and represent various categories or groups, while numerical variables are quantitative in nature and represent measurements or quantities.

As an example in the context of Data science, when dealing with determining housing prices for any city, the output is always a numerical variable, as it involves a regression task aimed at predicting a continuous value. On the other hand, when dealing with spam email classification, the output is always a categorical variable, where the model must choose between ‘yes’ or ‘no’ (spam or not spam), as it falls under the domain of binary classification.

You will never again confuse these two types of variables. 😊 😊 😊

Explore Data Science Roadmap.

Explore my YouTube channel where I explain Data Science Related topics for free.

If you found this guide helpful , why not show some love?

Give it a Clap 👏, and if you have questions or topics you’d like to explore further, drop a comment 💬 below 👇

--

--

Rina Mondal

I have an 8 years of experience and I always enjoyed writing articles. If you appreciate my hard work, please follow me, then only I can continue my passion.