Menu

Types of Data and Scales of Measurement

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

NominalLabels with no orderBlood group, cityCount, mode
OrdinalOrder, but unequal gapsRating of low, medium, highMedian, ranking
IntervalEqual gaps, no true zeroTemperature in CelsiusMean, differences
RatioEqual gaps and a true zeroIncome, height, time spentAll 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

AP

Abhishek Pati



Learn via Video Course

Probability and Statistics for Data Science Logo

Probability and Statistics for Data Science

4 hrs



Get in Touch For Details