Types of Data and Variables
Why Classifying Data Matters
Before you can choose a graph, a formula, or a statistical test, you need to know what type of data you have. A bar chart suits some data but is completely wrong for others. The mean makes sense for some measurements but is meaningless for others. Every decision in the rest of a statistical enquiry flows from the type of data collected, so getting this classification right at the start saves wasted effort later.
Quantitative and Qualitative Data
Quantitative data is data that takes numerical values. Height in centimetres, temperature in degrees, and number of goals scored are all quantitative because you can do arithmetic with them. Calculating the mean height or the total goals scored is meaningful.
Qualitative data describes qualities or categories. Eye colour, favourite genre of music, and a person’s opinion in their own words are qualitative. You cannot calculate a meaningful mean eye colour. Qualitative data can be coded into numbers (1 = strongly agree, 5 = strongly disagree), but even then the codes are labels, not measurements.
The key test: can you do meaningful arithmetic with the values? If yes, the data is quantitative. If no (e.g. averaging “nationalities” makes no sense), it is qualitative.
Categorical and Ordinal Data
Within qualitative data, two further types matter. Categorical data falls into groups with no natural ordering. Blood group (A, B, AB, O), country of birth, and make of car are categorical — there is no sensible way to say blood group B comes ‘after’ blood group A.
Ordinal data can be ordered or ranked, but the gaps between positions are not equal. Finishing first, second, or third in a race is ordinal — you know the order, but ‘first is better than second’ does not tell you by how much. Survey responses such as “poor / fair / good / excellent” are ordinal: the order is clear, but the step from ‘poor’ to ‘fair’ is not necessarily the same size as the step from ‘good’ to ‘excellent’.
Discrete and Continuous Data
Within quantitative data, two further types are essential. Discrete data can only take specific, separate values. The number of students in a class is discrete: you can have 28 or 29, but not 28.4. The number of goals in a match is discrete too.
Continuous data can take any value within a range. Height, weight, temperature, and time are all continuous — a student’s height could theoretically be 163.47 cm. Measurement tools limit the precision recorded, but the underlying quantity is continuous.
Why does this distinction matter? Discrete data is usually shown with bar charts and pictograms, drawn with gaps between the bars. Continuous data is shown with histograms, which have no gaps, or grouped into class intervals. Choose the representation that matches the data type, not the one that looks nicest.
Students often argue about shoe size. In the UK, shoe sizes come in specific values (6, 6.5, 7, 7.5, …) — there is no UK size 7.3. That makes shoe size discrete, even though it looks numerical.
Contrast this with foot length in centimetres, which is continuous — a foot could measure 26.2 cm or 26.25 cm. Ask whether the measuring system has genuine gaps between values, or whether it is really rounding a continuous quantity. Shoe sizes are a labelling convention, so they are discrete; foot lengths are continuous.
Ungrouped and Grouped Data
Data can also be described as ungrouped (individual values listed separately) or grouped (values collected into class intervals). Grouping is useful when a data set is large and spread over a wide range, because it makes patterns easier to see. However, grouping loses precision: once data is grouped, you can only estimate the mean, not calculate it exactly.
When creating class intervals, check they do not overlap and that together they cover the full range of the data. The choice of class width affects how clearly the distribution is visible: too many narrow classes and the pattern is obscured by noise; too few wide classes and important detail is lost.
Explanatory and Response Variables
When an investigation explores whether one thing influences another, statisticians distinguish between two types of variable. The explanatory variable (also called the independent variable) is the one the researcher believes causes or predicts changes. The response variable (also called the dependent variable) is the outcome being measured.
Example: if you investigate whether daily revision time influences exam score, revision time is the explanatory variable and exam score is the response variable. On a scatter graph, convention places the explanatory variable on the horizontal axis and the response variable on the vertical axis.
The explanatory variable goes on the horizontal (x) axis. The response variable goes on the vertical (y) axis. Memory cue: you explain how x causes changes in y.
Bivariate Data
Bivariate data is data where two measurements are taken on each individual. Recording both a student’s revision hours and their exam score gives bivariate data — one pair of values per student. Bivariate data is used to investigate relationships: is there a correlation? Does the explanatory variable predict the response variable?
Multivariate Data (Higher)
Multivariate data is data where three or more variables are recorded for each individual. A researcher studying student performance might record revision hours, sleep duration, and exam score for each student — that is multivariate. Multivariate data sets are more realistic than bivariate ones, because real-world outcomes rarely have just a single influence.
The challenge with multivariate data is separating the effect of one variable from the effects of others. If students who revise more also sleep more, it becomes hard to say whether an exam improvement is due to revision, sleep, or both. This is why large data sets and careful controls matter in real research.
Sometimes a questionnaire produces too many small categories. If ten students say their commute is “less than 5 minutes”, thirty say “5–10 minutes”, and two say “50–60 minutes”, the very small categories make charts hard to read and comparisons unreliable.
Merging categories — combining “less than 5 minutes” and “5–10 minutes” into “up to 10 minutes” — can make the data more useful. The trade-off is losing detail. A good class interval choice balances readability against preserving the shape of the distribution.