Learning outcomes
- classify data as categorical or numerical
- identify nominal and ordinal data
- identify discrete and continuous numerical data
- avoid common classification mistakes
Main data classes
- Categorical data: labels or groups
- Numerical data: numbers that represent quantity or measurement
Categorical data
- Used to place cases into groups or classes.
- Arithmetic operations are not meaningful on the labels themselves.
- blood group
- department
- gender
- type of vehicle
Nominal data
- Categories with no natural order.
- blood group
- branch
- city name
Ordinal data
- Categories with a meaningful order or ranking.
- But the gaps between categories are not necessarily equal.
- poor, average, good
- rank in class
- satisfaction level: low, medium, high
- Ordered categories are still categorical, not numerical.
Numerical data
- Represents numerical magnitude.
- Arithmetic operations are meaningful.
- age
- height
- income
- number of books
Discrete data
- Countable values, usually whole numbers.
- number of siblings
- number of calls received
- number of students present
Continuous data
- Measured values that can take many possible values within an interval.
- height
- time
- weight
- temperature
Code numbers and hidden traps
- Sometimes categories are coded as numbers:
1 = male,2 = female1 = rural,2 = urban
- The numbers act as labels, not quantities.
Mixed examples
| Variable | Type |
|---|---|
| Blood group | categorical nominal |
| Rank in competition | categorical ordinal |
| Number of children | numerical discrete |
| Body temperature | numerical continuous |
Exam hints and traps
- If the value counts items, it is often discrete.
- If the value measures on a scale, it is often continuous.
- Ordered labels remain categorical.
- Not every number should be added or averaged.
Quick practice
Classify each:- favourite subject
- number of absences
- monthly income
- t-shirt size (
S,M,L,XL) - rating: poor / fair / good / excellent
Answer key
- categorical nominal
- numerical discrete
- numerical continuous
- categorical ordinal
- categorical ordinal
