Types of Data
Nisha's manager once reported that "the average order ID this week was 1003". Nobody laughed, because nobody noticed. The error was not in the arithmetic; it was in treating a label as a number. Knowing each column's type tells you which summaries are meaningful before you calculate anything.
The rule
Numbers you can do maths on; categories you can only count.
Every variable falls into one of two families, each with two members:
Quantitative (numbers that measure an amount):
- Discrete: counted in whole steps.
qtyis 1, 2 or 3 cups, never 2.4. - Continuous: measured on a smooth scale. Temperature, weight, time spent in the café.
Qualitative, also called categorical (labels that sort things into groups):
- Nominal: categories with no order.
item_code(C01, C02, B01, B02), city, payment method. - Ordinal: categories with a natural order but uneven or unknown gaps. A satisfaction rating from 1 (poor) to 5 (excellent), or cup size small, medium, large.
What each type allows:
| Type | Example | Sensible summaries |
|---|---|---|
| Discrete | qty | sum, mean, median, count |
| Continuous | temperature | mean, median, spread |
| Nominal | item_code | count per group, mode |
| Ordinal | rating 1–5 | count per level, median, mode |
Two more distinctions you will hear:
- Structured data fits rows and columns, like the orders sheet. Unstructured data does not: review text, photos, voice notes. Semi-structured data, like JSON, has labels but no fixed table shape.
- Data you collect yourself is primary; data someone else collected, such as city weather records, is secondary.
The shortcut
Ask two questions about a column: "Would adding two values mean anything?" If yes, it is quantitative. If no, ask "Is there a natural order?" Yes means ordinal; no means nominal.
order_id
Adding order 1001 to order 1002 means nothing. It is a label that happens to be written with digits, so it is nominal.
The trap: a column made of digits is not automatically quantitative. Phone numbers, PIN codes and IDs are labels.
Drills
Answer fast — trust the rule.
What type is qty, the number of items in an order?
What type is cup size (small, medium, large)?
Which summary makes sense for item_code?
Customers' written reviews on a website are best described as what?
A column holds customers' 6-digit PIN codes. Which statement is right?
Remember
- Numbers you can do maths on; categories you can only count.
- Shortcut: "Would adding two values mean anything?" then "Is there a natural order?"
- Trap: IDs, phone numbers and PIN codes are labels, not quantities.
