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.