1. Attribute (data) types
An attribute is a column of the data. Its type decides which operations and statistics make sense.
- Nominal: names or labels with no order (colour, PIN code, roll number). Only equality tests; the central value is the mode.
- Binary: nominal with two states (0/1). Symmetric if both states matter equally (gender), asymmetric if one state is rare and important (test positive).
- Ordinal: values have a meaningful order but the gaps are not equal (grade A/B/C, small/medium/large). Mode and median are valid; the mean is not.
- Numeric, interval-scaled: equal-size units but no true zero (temperature in °C, calendar year). Differences are meaningful; ratios are not (20 °C is not twice as hot as 10 °C).
- Numeric, ratio-scaled: has a true zero (Kelvin temperature, salary, length, count). Both differences and ratios are meaningful.
Separately, an attribute is discrete (finite or countably infinite values, e.g. number of children) or continuous (real values, e.g. height).
| Type | Order | Difference | Ratio | Valid centre |
|---|---|---|---|---|
| Nominal | No | No | No | Mode |
| Ordinal | Yes | No | No | Mode, median |
| Interval | Yes | Yes | No | Mode, median, mean |
| Ratio | Yes | Yes | Yes | All, including geometric mean |