Categorical vs. Quantitative Data
Categorical data place observations into groups or labels, such as blood type or favorite subject.
More key points
- Quantitative data represent counts or measurements that support meaningful arithmetic, such as number of books or time in minutes.
- Quantitative data may be discrete counts or continuous measurements; a number printed in a field is not automatically quantitative.
On this page8 sections
Before calculating a mean or choosing a graph, identify what kind of information the data record. Categorical data describe groups or labels. Quantitative data are numerical counts or measurements. The distinction affects which summaries make sense: averaging test scores is meaningful, while averaging favorite colors is not.
Categorical data describe a group or label
A categorical variable assigns each person or item to a category. Examples include blood type, school subject preference, type of transportation, or whether a student submitted an assignment. The data may be recorded as words, letters, or even numbers, but the value functions as a label rather than a measurable amount.
A ZIP code, student ID, or jersey number is numeric in appearance but categorical. Adding two ZIP codes or finding their average has no useful interpretation. Ask what arithmetic on the values would mean in the context. If the number identifies a category or object, it is a label.
Some categories have a meaningful order. A survey response such as strongly disagree, disagree, neutral, agree, or strongly agree is ordinal categorical data. The ordering matters, but the gaps between adjacent responses are not guaranteed to be equal. A rating of 4 is above a rating of 3, but subtracting the ratings does not necessarily quantify an equal-sized difference in attitude.
Quantitative data are counts or measurements
Quantitative data represent a number of items or an amount measured on a scale. Examples include number of absences, height, travel time, temperature, and quiz score. Arithmetic can answer a meaningful question: the total number of absences, the average height, or the difference in travel time.
Quantitative variables are often divided into discrete and continuous types. Discrete data arise from counting separate items and usually take whole-number values: number of siblings, books checked out, or correct answers. Continuous data arise from measurement and can take values within an interval: elapsed time, mass, or distance. A measurement may be rounded for recording, but the underlying quantity can still vary continuously.
Counts are not automatically continuous just because they can be written with decimals. A household cannot ordinarily contain 2.4 children, so the number of children is discrete. A person’s height may be recorded as 170 centimeters, but height is measured and can vary between nearby values, so it is continuous in the model.
A quick classification test
- Read the variable’s definition, not only its stored format.
- Ask whether the value is a group name or category; if so, it is categorical.
- If the value is a count or measured quantity, it is quantitative.
- For quantitative data, ask whether it counts separate items (discrete) or measures along a scale (continuous).
- Check whether arithmetic would retain a useful meaning in the problem context.
Worked examples
A school survey
A survey records each student’s grade level, favorite class, minutes spent reading, and number of books read last month. Grade level and favorite class are categorical; grade labels have an order, while favorite classes do not. Minutes spent reading is quantitative and continuous in principle. Number of books is quantitative and discrete because books are counted.
A number that is only a label
A set of students has ID numbers 1042, 1176, and 1380. The values are digits, but they identify students rather than measure an amount. The mean ID number does not describe a typical student. The variable is categorical or an identifier, not quantitative for ordinary statistical calculations.
A ranked response
A customer rates service from one to five stars. The response is ordered: five stars indicates a higher rating than one star. It is usually treated as ordinal categorical data because the spacing between one and two stars need not equal the perceived spacing between four and five. If a problem explicitly asks to compute an average rating, follow its model, but be aware of the measurement assumption.
Data type guides the summary
For categorical data, useful summaries include counts, proportions, the most common category, or comparisons across groups. A bar graph is commonly used because separate bars represent distinct categories. A pie chart may show shares of a whole when categories are mutually exclusive and the display stays readable.
For quantitative data, useful summaries include mean, median, range, interquartile range, and standard deviation, depending on the question. Histograms and dot plots display numerical distributions. A histogram groups values into touching intervals; a bar graph separates categories. The gap or no-gap distinction reflects what the horizontal axis represents.
A two-way table can summarize two categorical variables, such as grade level by transportation choice. A scatterplot is used for paired quantitative values, such as study time and test score. Choosing an inappropriate graph can hide the structure or encourage a misleading interpretation.
Common classification traps
- Treating every number as quantitative. Identifiers, codes, and labels may be digits without measuring an amount.
- Calling ordered categories quantitative because they have a rank. Rank does not guarantee equal intervals.
- Calling a count continuous because a spreadsheet allows decimal entries. Classify what is counted or measured.
- Averaging nominal categories such as favorite subject. Use counts or proportions instead.
- Confusing a histogram with a bar chart. One represents grouped quantitative intervals; the other represents categories.
- Ignoring the context. The same numeral can represent a quantity in one variable and a label in another.
Exam takeaway
Ask what each value means. Labels and group memberships are categorical; meaningful counts and measurements are quantitative. Then distinguish discrete counts from continuous measurements and choose a summary or graph that fits the variable. The data type comes from the information being represented, not from whether the spreadsheet cell contains digits.
Apply it to the evidence or sentence
Categorical data place observations into groups, such as transportation method or grade level. Quantitative data represent measured or counted amounts, such as travel time or number of absences. A numeric label is not automatically quantitative: student ID numbers identify people but arithmetic on them has no meaningful interpretation. Likewise, ordinal categories such as low, medium, and high have an order but the gaps between categories are not necessarily equal. Choose a display that fits the variable: bar charts compare categories, while histograms show the distribution of quantitative measurements. Identify what the values mean before selecting a calculation or graph.
Common questions
Is a ZIP code quantitative because it contains numbers?
No. A ZIP code identifies a location, so arithmetic on ZIP codes has no meaningful measurement interpretation. It is a categorical label.
Are star ratings categorical or quantitative?
They are ordered categorical data in the basic classification because the ranks have order but equal spacing is not assured. A problem may make a modeling assumption to average them.
What is the difference between discrete and continuous data?
Discrete data count separate items and usually take distinct values. Continuous data measure amounts that can vary along a scale, even if recorded values are rounded.