Math101learn.math101.caTypes of Data
A precise guide to categorical and quantitative data, measurement levels, discrete and continuous variables, and method choice.
Precise definition
Categorical data record group membership; nominal categories have no intrinsic order, while ordinal categories do. Quantitative data record numerical magnitude; discrete variables take countable values and continuous variables can vary over intervals within measurement precision.
Notation and mathematical language
Interval scales have meaningful differences but no meaningful absolute zero, while ratio scales support meaningful ratios because zero represents absence of the quantity. These labels guide permissible summaries, but subject-matter meaning matters more than storage type.
Conceptual picture
Numbers can be labels, ranks, counts, or measurements. The operation must preserve meaning: a median can summarize ordered categories, while a mean of arbitrary nominal codes cannot. Continuous measurements are stored discretely after rounding but remain conceptually continuous.
Conditions and key results
A variable's type may depend on the question and coding. Age in exact time is continuous; age in completed years is discrete; age group is ordinal categorical. Treating an ordinal scale as interval requires an explicit modelling judgment, not automatic arithmetic.
A reliable strategy
- Define the variable in words, including unit and possible values.
- Ask whether values are labels, ordered categories, counts, or measured magnitudes.
- Choose displays and summaries compatible with that type and note any modelling assumptions.
- Check missing codes, identifiers, and rounded measurements so software storage does not dictate analysis.
Fully worked example
Interpretation and application
Correct type classification prevents meaningless averages, inappropriate charts, and invalid models in surveys, experiments, and databases. It does not by itself address bias, dependence, or causation.
Common mistakes
Verification and reasonableness
- Ask whether addition, differences, and ratios have interpretable units.
- Compare codebook definitions with raw values and software metadata.
- Try a recoding and check whether the intended summary should remain invariant.
Practice
- What type is eye colour?
- What type is number of calls?
- What type is temperature in Celsius?
Answers and brief solutions
- Nominal categorical.
- Discrete quantitative.
- Quantitative interval; differences are meaningful but zero is not absolute.
Further deduction
Transformations can change scale interpretation. Converting Celsius to Fahrenheit preserves interval differences up to a positive factor but changes zero, confirming neither has a ratio-scale zero. Kelvin has an absolute zero in thermodynamic models, so ratios become meaningful under the relevant physical conditions.
Time-to-event data illustrate why type alone is not enough: time is quantitative continuous, but some subjects may not experience the event before study end, creating censoring. Replacing censored times with the study-end value biases ordinary summaries. The measurement process and missingness structure determine the method as much as the variable's numerical scale.
Ordinal categories have order but not guaranteed equal spacing. Coding 'low, medium, high' as $1,2,3$ preserves order, yet the numerical difference from low to medium need not equal that from medium to high. A median or rank-based comparison can respect the scale with fewer assumptions than a mean. Whether a rating may reasonably be modelled as interval data is a substantive measurement choice, not something the spreadsheet's numeric storage decides.
Units are part of a quantitative variable's definition. Combining heights recorded in centimetres and metres without conversion creates artificial groups and invalid summaries. Metadata should therefore store unit, precision, permissible range, and any sentinel codes alongside the column name.
Related topics
Try it yourself
Hints are part of learning. Open one whenever it makes the next step feel possible.
Enter 1 if number of pets is discrete quantitative and 0 otherwise.
- Number of pets measures magnitude and can be added or averaged in context.
- Its possible values are countable integers, so the statement is true: enter 1.
End of lesson
Nice work making it this far.
Understanding grows through return visits. Save this lesson, try the practice, or continue when you are ready.
