Contents
Types of Data and Scales of Measurement
Not every column in a dataset is the same kind of thing, and the kind decides which calculations make sense. Averaging customer ages is useful. Averaging customer ID numbers is nonsense.
Data splits first into two broad families. Categorical data describes qualities, such as city or payment method. Numerical data describes quantities, such as price or weight.
Numerical data is further split into discrete values you count (number of orders) and continuous values you measure (delivery time in minutes).
Statisticians go one level deeper with four scales of measurement:
Scale | What it tells you | Example | Operations that make sense |
| Nominal | Labels with no order | Blood group, city | Count, mode |
| Ordinal | Order, but unequal gaps | Rating of low, medium, high | Median, ranking |
| Interval | Equal gaps, no true zero | Temperature in Celsius | Mean, differences |
| Ratio | Equal gaps and a true zero | Income, height, time spent | All of the above, plus ratios |
The true zero is what separates the last two. Twenty degrees Celsius is not “twice as hot” as ten, because zero there is just a convention. But a person earning 40,000 does earn twice as much as someone earning 20,000, because zero income really means no income.
Why this matters in data science
- Nominal columns usually need one-hot encoding before a model can use them.
- Ordinal columns can be mapped to ranked numbers, since their order carries information.
- Treating a nominal code (like a postal code) as a number can quietly mislead a model into reading order or size where none exists.
Probability and Statistics for Data Science
Abhishek Pati








