3 Data types
Connection to the curriculum: In this chapter, we discuss types of data, referred to in:
- Essential Mathematics (Unit 2, Topic 1: Representing and comparing data); and
- General Mathematics (Unit 2 Topic 1: Univariate data analysis and the statistical investigation process)
Warm-up question: Daily rainfall is numerical data. Is it discrete or continuous numerical data?
3.1 Introduction
Data refers to information collected from the individuals (people, plants, or otherwise) in a study. Understanding the type of data collected in a study is important as it determines the path of analysis: the graphs that can be used, the numerical summaries that can be used, the inferential procedures (tests, confidence intervals (CIs)) that are appropriate. The curriculum identifies two data types: categorical and numerical.
3.2 Categorical data
Categorical data is defined in the Glossary of The Australian Curriculum: Mathematics as
… a variable whose values are categories.
Categorical data are also known as qualitative or classification data.
Categorical data refers to data that can be placed into categories. Examples include ‘Country of birth’, ‘Blood type’, or ‘Brand of smartphone’. The values that the variable can take (such as A, B, AB or O for blood type) are called the values or the levels of the variable. Blood type, then, has four levels.
Categorical data can be further classified as nominal or ordinal. For most purposes, this distinction makes little difference to how an analysis might proceed. With ordinal data, the levels have a natural order. Examples of ordinal data include the seasons (Summer, Autumn, Winter, Spring) and T-shirt size (S, M, L, XL, XXL). Ordinal data also emerges from survey questions such as “How satisfied are you with the speed of the school internet?”, with answer options such as “Very unsatisfied”, “Unsatisfied”, “Neutral”, “Satisfied”, and “Very satisfied”. The levels in nominal data (such as “Blood type”) do not have a natural order; they can be listed in alphabetical order, order of occurrence, or any other order.
3.3 Numerical data
Numerical data is also known as quantitative or scale data, defined in the curriculum as:
… data associated with a numerical variable. Numerical variables are variables whose values are numbers, and for which arithmetic processes such as adding and subtracting, or calculating an average, make sense.
In other words, numerical data refers to mathematically numerical data. Mathematically numerical means that performing mathematical operations such as adding and subtracting makes sense; not all numbers are mathematically numerical. For example, Australian postcodes are numerical, but are really just labels; the postcode for Buderim is 4556 (which is not one “fewer” or one “worse” than Mooloolaba (postcode 4557)), and the postcode could easily have been non-numerical (such as BDRM).
Numerical data can be further divided into discrete or continuous. The curriculum does not define discrete numerical data, but states that continuous numerical data
…includes any value that lies within an interval
That is, more values exist between any two given values. Consider heights, for example. Between any two values of height (say, \(182.0\) cm and \(182.1\) cm) an infinite number of heights exist. As the curriculum states, “In practice, the values taken are subject to the accuracy of the measurement instrument used to obtain these values”, and all continuous data must be rounded at some point for convenience; heights are usually rounded to the nearest centimetre (or \(0.1\) cm) for example. Height, time to run \(100\) m, and reaction time are continuous numerical data.
Discrete data has a countable number of possible values between any two given values of the variable (such as the number of brothers one has, or the number of students at school on a given day). For many purposes, the distinction between discrete and continuous numerical data makes little difference to how analyses proceed. Sometimes, discrete numerical data with a small number of values can be thought of as categorical. For example, the number of cylinders in internal combustion engine cars (usually \(4\), \(6\) or \(8\)), or water temperature (room temperature; refrigerated water). Sometimes numerical data is later converted into ordinal data; for example, income may be described as ‘low’, ‘medium’ or ‘high’.
Consider the variable Age. The ages of students in one class might be: \(14\), \(15\), \(15\), \(14\), \(16\), \(14\), \(15\), \(15\). What type of variable is Age? Age is clearly numerical. Is it discrete or continuous?
While the data values appear to be discrete, the type of data is about describing what is being recorded rather than the actual values being recorded. Age is continuous. We age continuously; for convenience, we usually round ages to the number of completed years. In addition, babies and children may be described as being ‘three weeks’, ‘five months’ or ‘one-and-a-half years’ old. Continuous data must be rounded somewhere for convenience, and for ages the convention is to round down to the previous whole number of years, but the underlying construct is continuous.
Numerical data can also be classified as ratio or interval, independently of being discrete or continuous. Ratio data refers to data with a natural zero, so that forming ratios makes sense. Examples of ratio data include heights (\(0\) cm means no height) and age (an age of \(0\) means life has just begun).
However sometimes the zero point is arbitrary, which is interval data. For example, temperature is interval data: \(0^\circ\)C is arbitrarily assigned to the freezing point of water. Forming ratios does not make sense for temperature: \(160^\circ\)C is six times as large as \(26.67^\circ\)C; if we convert to Fahrenheit instead, \(320^\circ\)F (equivalent to \(160^\circ\)C) is just four times as large as \(80^\circ\)F (equivalent to \(26.67^\circ\)C). Neither of those ratios make sense anyway.
Apart from temperature, other examples of interval data include the year (year \(0\) is arbitrary; the year \(2000\) AD is not twice as late as the year \(1000\) AD, just twice the time since the arbitrary year \(0\)) and the time of day (\(2\) pm is not twice as late as \(1\) pm, just twice as far from the arbitrary zero of midday).
3.4 Deciding on variables (???)
Sometimes clarifying the variables, and hence the type of data being gathered, is important. Consider a research question to determine whether people can, in general, kick further with their dominant or non-dominant leg.
One approach is to have people kick a ball with both feet, and measure the two distances. The variables would be ‘Which leg is used’ (nominal data), and the ‘distances kicked’ (continuous numerical data); the average kicking distance for each leg could then be compared.
An alternative is to have each person kick a ball with both legs, and record how much further students can kick the ball with their dominant leg. In this case, only one variable is present: the amount by which the dominant leg kicks the ball further (continuous). In this scenario, a negative value means the student kicks the ball further with their non-dominant leg.
A third alternative is to have each student kick a ball with each leg, and just record which leg could kick the ball furthest (nominal categorical data, with two levels: ‘Dominant leg’ and ‘Non-dominant leg’) without measuring any distances at all.
The variable is what is measured on each individual in the study. When we aggregate our data in each category the result is a summary. For example, the percentage in each category is not a variable, but a summary.
3.5 Choosing data to use
Teachers need to consider carefully what data to use, as unrealistic data can give students the impression that statistics (and mathematics) is irrelevant and with no real-world applications (Dunn & Marshman, 2020; Smith & Morgan, 2016).
One place to potentially find data is Census At School. Whilst the Australian website is no longer available, Census At School New Zealand (https://tabulator.docker.stat.auckland.ac.nz/) is a useful source of secondary data that could be compared with data collected from your class or from other countries in the world. The questionnaire in the survey can be found at https://new.censusatschool.org.nz/wp-content/uploads/2019/01/CensusAtSchool-New-Zealand-2019.pdf and contains all the types of data we have described.
Warm-up question answer: Daily rainfall is partly discrete and partly continuous!
If no rain falls, then we know that exactly zero rainfalls (discrete). If rain does fall, however, we record a numerical (continuous) amount.