beginnerintro

Types of Data

Not all data is the same. The type tells you what you can and can't do.

Key Points

What it is

Data comes in different flavors. The big split: numbers versus categories. Numbers you can do math on. Categories are labels, like 'red', 'blue', or 'apple'. Within numbers, there's continuous (height, temperature) and discrete (number of kids). Within categories, there's nominal (no order: colors, countries) and ordinal (has order: movie ratings, education level). Pick the wrong analysis for the wrong type, and you'll get nonsense.

Why it exists

If you treat a category like a number, say encode 'red' as 1 and 'blue' as 2, then take the average, you get total nonsense. 'Average color' doesn't mean anything. Data types exist to stop you from doing stuff that makes no logical sense.

Intuition

Picture a fruit bowl. Numerical data is like counting apples (discrete) or weighing them (continuous). Categorical data is labeling them 'apple', 'orange', 'banana'. You can't average 'apple' and 'orange' to get 'aporange'. Ordinal is like ranking fruit from 'not ripe' to 'very ripe'. You know the order, but the gap between 'not ripe' and 'ripe' might not be the same as between 'ripe' and 'very ripe'.

Example

Customer survey: Age (numerical continuous), Number of purchases (numerical discrete), Country (categorical nominal), Satisfaction (1=Very unhappy, 2=Neutral, 3=Happy, which is categorical ordinal).

You can average age and purchases. You can't average country. For satisfaction, you can say 'the median is 2', but don't say 'the average is 2.3'. The gap between 1 and 2 might not mean the same as between 2 and 3.

When to use

Common mistakes

Notes

Was this concept helpful?

Spot an error or gap? Suggest an edit →

Related concepts

data-vs-information-vs-insightwhat-is-edaprobability-basics
Chirp at me!