Definition · Data and frequencies
Categorical and quantitative variables
Definition from the chapter Data, frequencies and charts of Statistics and probability, with the exercises in which it is used.
Categorical and quantitative variables
Several pieces of information can be recorded for each student in the commuting survey, for example the means of transportation, the rating given to the transportation service, the number of absences in the semester, and the travel time. Each of these characteristics is a variable. The value that the variable takes on a particular unit, for example “bus” or “35 minutes”, is called a value of the variable; for a categorical variable the values are also called categories.
Variables fall into four types.
- A variable is nominal categorical when its values are categories with no order. The means of transportation is of this type, because bicycle, bus, car, and walking are different categories and none comes before the others.
- A variable is ordinal categorical when its values are ordered categories. The rating poor, adequate, or excellent is of this type. The order of the levels is clear, while the distance between two levels is undefined, so one cannot say whether the distance between poor and adequate is the same as the distance between adequate and excellent.
- A variable is discrete quantitative when its values are numbers that can be listed one after another. The number of absences is of this type, because it takes the integer values . The set of possible values is finite, or infinite but listable like the natural numbers; an infinite set that can be listed in this way is called countable.
- A variable is continuous quantitative when its values are numbers and, in principle, every value in an interval is possible. Travel time is of this type, because a trip can last , , or minutes. The variable remains continuous even if, for convenience, the durations are recorded rounded to the nearest minute.
The type of variable determines which calculations are meaningful. For the means of transportation, one counts the students who use each means. For the rating, one can also count how many students gave at least “adequate”, because the values are ordered. For travel time, one can compute the difference in minutes between two trips, because the values are numbers.
Read it in the chapter Data, frequencies and charts →
All the definitions and theorems of Statistics and probability → · All the theorems on the site →