Types of Data
Maths: Statistics for machine learning
4 min read
Published Oct 22 2025, updated Oct 23 2025
Guide Sections
Guide Comments

Data Types in Statistics
Data in statistics can be broadly classified into two main types:
- Quantitative Data – Numerical data (measurable quantities)
- Qualitative Data – Categorical data (descriptive attributes)
1. Quantitative Data (Numerical Data)
Quantitative data represents numbers or measurable amounts — values that can be counted or measured.
It can be further divided into two subtypes:
a) Discrete Data
- Consists of countable values, often integers (whole numbers).
- Cannot take fractional or decimal values.
Examples:
- Number of children in a family → 0, 1, 2, 3, …
- Number of legs on an animal → 0, 2, 4, 6, 8, …
- Number of wheels on a vehicle → 2, 3, 4, 6, 8, …
b) Continuous Data
- Can take any value within a range, including decimals or fractions.
- Typically measured, not counted.
Examples:
- Height (cm) → 172.4, 180.0, 186.5
- Speed (mph) → 30.0, 38.4, 60.5, 70.2
- Volume (ml) → 100.0, 200.5, 500.0
- Temperature (°C) → –4.5, 0.0, 21.35, 35.0
2. Qualitative Data (Categorical Data)
Qualitative data represents categories or labels that describe qualities or characteristics rather than numerical values.
It can be divided into two main subtypes:
a) Nominal Data
- Represents categories with no natural order or ranking.
- Used for labelling variables without quantitative value.
Examples:
- Colours → red, blue, yellow, green
- Gender → male, female, other
- Blood group → A+, A–, B+, O–, etc.
b) Ordinal Data
- Represents ordered categories, where ranking or order matters, but differences between ranks are not numerically meaningful.
Examples:
- Exam results → fail, pass, merit, distinction
- Education level → GCSE, A-level, Degree, Masters, PhD
- Feedback rating → very bad, bad, average, good, very good
Machine Learning Context
In machine learning and data preprocessing, understanding data types helps to:
- Choose appropriate encoding methods (e.g. one-hot encoding for nominal data, label encoding for ordinal data).
- Select suitable statistical summaries (mean for quantitative, mode for qualitative).
- Pick the right visualisation (histogram for continuous, bar chart for categorical).
- Decide which ML algorithms can handle which data types (e.g. tree models handle categorical data directly, linear regression needs numeric inputs).
Scales of Measurement
The scales of measurement describe the type and nature of information contained in a variable’s values.
They determine what kind of statistical analysis can be performed and how data should be interpreted or visualised.
There are four main scales of measurement:
1. Nominal Scale
- Definition: Classifies data into distinct categories that have no inherent order or ranking.
- Data is grouped based on labels, names, or qualities.
- Categories are mutually exclusive (each observation belongs to only one category).
- Mathematical operations: Only counts and proportions can be calculated.
- Typical analyses: Mode, frequency counts, percentages.
Examples:
- Gender → male, female, other
- Blood group → A+, B+, O–, etc.
- Hair colour → black, brown, blonde, red
- 40% of respondents are male.
2. Ordinal Scale
- Definition: Classifies data into categories that can be ranked or ordered, but the differences between ranks are not equal.
- You can tell which value is higher or lower, but not by how much.
- Mathematical operations: Median and mode are meaningful; differences between ranks are not.
- Typical analyses: Rank correlation, non-parametric tests.
Examples:
- Education level → GCSE, A-Level, Degree, Masters, PhD
- Satisfaction rating → very bad, bad, neutral, good, very good
- Competition ranking → 1st, 2nd, 3rd
3. Interval Scale
- Definition: Classifies data into ordered categories with equal intervals between values, but no true zero point.
- Zero does not indicate an absence of the quantity; it’s arbitrary.
- Mathematical operations: Addition and subtraction are meaningful; ratios are not.
- Typical analyses: Mean, standard deviation, correlation.
Examples:
- Temperature (°C or °F) → 0°C does not mean “no temperature”
- Dates → Year 2000, 2005, 2010 (difference is meaningful, but no absolute zero)
- IQ scores
4. Ratio Scale
- Definition: Similar to the interval scale, but includes a true zero point (indicating absence of the quantity).
- Allows for all mathematical operations — you can compare differences and ratios.
- Mathematical operations: All (addition, subtraction, multiplication, division).
- Typical analyses: Mean, standard deviation, coefficient of variation, regression.
Examples:
- Height → 0 cm means no height
- Weight → 0 kg means no weight
- Age, income, distance, time
- A car travelling at 60 km/h is twice as fast as one at 30 km/h.














