The characteristic of a variable is a common trait shared by the elements of a set.
A qualitative variable takes the form of a word, expression or code (colour, password, spoken language, etc.). It is not a quantitative trait.
A quantitative variable takes the form of a number or quantity. Depending on the nature of this number, this variable can be either discrete or continuous.
A discrete quantitative variable can only have certain values within a given range. In general, these are quantities that can be counted, meaning they are natural numbers.
A continuous quantitative variable can have any value in a given range. These are quantities that are real numbers.
Here are some examples of statistical variables that are related to survey questions:
What is your favourite colour?
Possible answers: red, blue, green, purple, etc.
The possible answers are colours.
What emotion are you feeling right now?
Possible answers: joy, sadness, anger, etc.
The possible answers are emotions.
How many siblings do you have?
Possible answers: 0, 1, 2, 3, etc.
The possible answers are numbers of people, which means a positive integer (whole number).
How many books do you own?
Possible answers: 0, 1, 5, 20, 50, etc.
The possible answers are numbers of books, so a positive integer (whole number).
What is your height?
Possible answers: etc.
A person's height is a quantity that can be any positive real value (including decimal numbers).
How many litres of gas did you put in your car the last time you refueled?
Possible answers: etc.
The number of litres of gas is a quantity that can take any positive real value.
The difference between discrete and continuous is not always easy to understand. For example, is a person's age a discrete or continuous variable? A person ages continuously, that is, at every moment. Age is therefore a continuous variable. However, when compiling data, it is possible to consider a person's age as a discrete quantitative variable. This is because, when people are asked their age, they answer with a natural number such as years, years or years and not years.
Just because the data collected is represented by numbers does not mean that the variable's characteristic is necessarily quantitative. For example, if we are looking at the area code of a telephone number, the answers could be and so on. These number combinations do not represent a quantity, but instead represent codes. It is therefore a qualitative variable, not quantitative.