Types of data
Classify variables as categorical or numerical, and numerical data as discrete or continuous, and select appropriate displays and summary measures.
Worked examples
Classifying variables as categorical or numerical
Straightforward
Problem
A researcher records the following information for each student in a class: (a) the student's hair colour, (b) the number of hours of sleep they got last night, (c) their score on a maths test out of . Classify each variable as categorical or numerical.
1
Ask: does the variable name or label something, or does it measure a quantity?
If the variable places subjects into named groups (e.g. colours, brands, types), it is categorical. If it records a numerical quantity that can be measured or counted, it is numerical.
2
Classify variable (a): hair colour.
Hair colour (e.g. brown, blonde, black) is a label that places each student in a named group. It does not measure a quantity, so it is categorical data.
3
Classify variables (b) and (c): hours of sleep and test score.
Hours of sleep is a measured quantity recorded as a number, so it is numerical data. Test score out of is also a numerical quantity, so it is numerical data.
Answer
(a) categorical, (b) numerical, (c) numerical
Classifying numerical data as discrete or continuous
Moderate
Problem
Classify each of the following as discrete or continuous numerical data: (a) the number of customers who visit a shop each day, (b) the weight (in kg) of a customer's shopping bag.
1
Recall the definitions. Discrete data can only take specific, separate values (usually whole numbers obtained by counting). Continuous data can take any value within a range.
Key question: can the variable take fractional values in a meaningful way, or is it restricted to whole numbers?
2
Classify variable (a): number of customers per day.
You cannot have customers — customers are counted in whole numbers. The data can only take specific integer values, so it is discrete numerical data.
3
Classify variable (b): weight of a shopping bag.
Weight can take any value in a range, such as kg, kg, or kg. It is measured (not counted), so it is continuous numerical data.
Answer
(a) discrete numerical data, (b) continuous numerical data
Identifying data type and choosing an appropriate display
Challenging
Problem
A school records two variables for each student: (a) their house group (Red, Blue, Green, Yellow), and (b) the number of books they read during the year. For each variable, identify the data type and suggest the most appropriate display.
1
Classify the data type for each variable.
House group names a category — it is categorical data. Number of books read is counted in whole numbers — it is discrete numerical data.
2
Choose a display for categorical data: house group.
Categorical data is best displayed using a column graph (bar chart) or a pie chart. These show the frequency or proportion of each category clearly.
3
Choose a display for discrete numerical data: number of books read.
Discrete numerical data with many possible values is best displayed using a stem-and-leaf plot (for smaller datasets) or a histogram (for larger datasets). A stem-and-leaf plot also preserves individual values and shows the shape of the distribution.
Answer
(a) categorical — column graph or pie chart; (b) discrete numerical — stem-and-leaf plot or histogram
Practise
Q1·Straightforward
A survey asks students to name their favourite sport. This variable is best described as:
Explanation
Favourite sport is a label or name, not a number. Data that falls into named groups or categories is called categorical data.
Q2·Straightforward
A researcher records the height (in centimetres) of each student in a class. This variable is best described as:
Explanation
Height is measured as a number and represents a quantity. Data that takes numerical values is called numerical data (also known as quantitative data).
Q3·Straightforward
Which of the following is an example of categorical data?
Explanation
The brand of shoes (e.g. Nike, Adidas, New Balance) is a label, not a number, so it is categorical data. The other options all record numerical quantities.
Q4·Straightforward
A school records the suburb where each student lives. This variable is best described as:
Explanation
The suburb where a student lives is a label that places each student in a named category. It does not measure a quantity, so it is categorical data.
Q5·Moderate
The number of goals scored in a soccer match is an example of:
Explanation
Goals are counted in whole numbers only — you cannot score goals. Numerical data that can only take separate, countable values (usually whole numbers) is called discrete data.
Q6·Moderate
The time (in seconds) taken by a student to complete a sprint is an example of:
Explanation
Time can take any value within a range (e.g. seconds, seconds). Numerical data that can take any value in an interval is called continuous data.
Q7·Moderate
Which of the following is an example of continuous data?
Explanation
Volume can take any value in a range (e.g. L, L), so it is continuous data. Absences, shoe sizes, and text messages are all counted in whole numbers, making them discrete.
Q8·Moderate
A geologist records the mass (in kilograms) of each rock in a sample. This data is best described as:
Explanation
Mass is measured and can take any value within a range (e.g. kg). This makes it continuous numerical data.
Q9·Challenging
A class survey records the eye colour of each student. The most appropriate display for this data is:
Explanation
Eye colour is categorical data. A column graph (or bar chart) is used to display the frequency of each category. Histograms, stem-and-leaf plots, and box plots are used for numerical data.
Q10·Challenging
A researcher measures the heights (in cm) of students. The most appropriate display for this data is:
Explanation
Height is continuous numerical data. A histogram groups values into intervals (class widths) and is the most appropriate display for large datasets of continuous data. A stem-and-leaf plot would work for smaller datasets, but a histogram is preferred for values.
Q11·Challenging
A class is asked to name their favourite subject. The most appropriate measure of centre to summarise this data is:
Explanation
Favourite subject is categorical data. You cannot calculate a mean or median for categories, since they cannot be added or meaningfully ordered. The mode (the most frequently chosen subject) is the only appropriate measure of centre for categorical data.
Q12·Challenging
A teacher wants to compare the exam scores of two classes side by side to see how their distributions differ. The most appropriate display is:
Explanation
A back-to-back stem-and-leaf plot places both datasets on the same stem so their distributions can be directly compared side by side. It shows the shape, spread, and individual values for both groups simultaneously.