Difficulty: Beginner | Prerequisites: Foundations of Statistics and Sampling Methods notes
Once you know how to collect data (sampling), the next question is: what kind of data have you collected, and what are you allowed to do with it? The type of variable and its level of measurement dictate which summary statistics, charts, and tests are valid. Misidentifying a variable's type is one of the fastest ways to produce nonsensical results. This section also introduces the basic tools for organising raw numbers into something readable: frequency tables, histograms, and stem-and-leaf plots.
Variables are either qualitative (categories) or quantitative (numbers). Data lives on one of four measurement scales (nominal, ordinal, interval, ratio), and each scale unlocks progressively more statistical operations. Once you know your data type, you can summarise it using grouped frequency tables, histograms, or stem-and-leaf plots.
Qualitative variable (categorical variable)
A variable consisting of attributes, labels, or non-numerical entries.
In simple terms, it names or classifies rather than counts or measures. Examples: car model, type of phone, zip code.
Quantitative variable (numerical variable)
A variable consisting of numerical measurements or counts.
Think of it as anything you can meaningfully add, subtract, or average. Examples: GPA, height, number of text messages.
Nominal scale
Data that is qualitative and has no natural order.
In simple terms, the categories are just labels. "Red, blue, green" or "male, female" have no ranking. You can count how many fall in each category, but you cannot sort the categories from lowest to highest in any meaningful way.
Ordinal scale
Data that can be ordered or ranked, but the distances between ranks are not necessarily equal.
Think of it as "first, second, third" without knowing how far apart they are. Example: customer satisfaction rated as poor, fair, good, excellent.
Interval scale
Data with a definite order and equal spacing between values, but no true zero point.
In simple terms, differences are meaningful but ratios are not. The classic example is temperature in Celsius or Fahrenheit: 20°C is not "twice as hot" as 10°C because 0°C does not mean "no temperature."
Ratio scale
Data with a definite order, equal spacing, and a true zero point. Ratios between values are meaningful.
This is the most informative scale. Examples: weight, height, income, age. Zero means "none of that quantity," and you can say "40 kg is twice as heavy as 20 kg."
Grouped data
A dataset organised into intervals (classes) rather than listing every individual value. Useful when there are many distinct values and no repeats.
Frequency table
A table showing how many data points fall into each class interval.
Histogram
A bar chart of grouped data where bars touch (no gaps), each bar representing one class interval, and the height of each bar shows the frequency.
Stem-and-leaf plot
A graphical method that uses the actual data values to form the display. The "stem" is typically the leading digit(s) and the "leaf" is the trailing digit.
Qualitative: attributes or labels. You can count occurrences but arithmetic on the values themselves is meaningless (averaging zip codes tells you nothing).
Quantitative: numerical measurements or counts. Arithmetic is meaningful.
A common exam trick: birth year and zip code look like numbers but are qualitative. You would never average zip codes or compute "mean birth year" as a useful demographic measure in the way you would average test scores.
Nominal: categories with no order. Operations: counting, mode.
Ordinal: categories with a ranking. Operations: counting, mode, median.
Interval: ordered with equal spacing, no true zero. Operations: addition, subtraction, mean, standard deviation.
Ratio: interval properties plus a true zero. Operations: all of the above, plus meaningful ratios and proportions.
A helpful mnemonic: N-O-I-R (nominal, ordinal, interval, ratio), from least to most informative.
When a dataset has many distinct values, listing each one is unwieldy. Instead, group values into class intervals and count how many observations fall into each.
Steps for building a grouped frequency table:
Decide the number of intervals (classes). A common guideline is 5 to 20.
Calculate the class width: (largest value – smallest value) / number of classes, rounded up.
Set the lower class limit of the first interval (often the minimum value).
Add the class width to get subsequent lower class limits.
Determine the upper class limit for each interval.
Tally the frequency (count) for each interval.
Once you have the frequency table, draw the histogram:
The horizontal axis shows the class intervals.
The vertical axis shows the frequency.
Bars are adjacent (no gaps), reflecting that the data is continuous.
The height of each bar equals the frequency of that interval.
Split each data value into a stem (leading digits) and a leaf (last digit).
Write stems in a column, then list each value's leaf next to its stem.
The result preserves every original data point while also showing the shape of the distribution.
Stem-and-leaf plots are especially useful for small to moderate datasets because they combine the detail of a raw list with the shape information of a histogram.
Class width formula:
Class width = (Maximum value – Minimum value) / Number of classes
Round up to the next whole number (or convenient value) to ensure all data points are covered.
Measurement scales matter in survey design. A market researcher who asks customers to rate satisfaction on a scale of 1 to 5 is collecting ordinal data; treating those numbers as ratio-level (e.g. "a 4 is twice as good as a 2") leads to misleading conclusions. In healthcare, choosing the right scale determines whether you can compute a meaningful average (e.g. average blood pressure, a ratio-scale measure) versus merely a most-common category (e.g. modal blood type, a nominal-scale variable).
Students frequently classify birth year or zip code as quantitative because they are made of digits. They are qualitative (nominal) because arithmetic on them is meaningless.
Students often treat ordinal data as though it were interval. The gap between "poor" and "fair" is not necessarily the same as the gap between "good" and "excellent."
A histogram is not a bar chart with gaps. Histograms have adjacent bars because the horizontal axis represents a continuous scale.
Students sometimes confuse interval and ratio scales. The deciding question is: does zero mean "none"? If yes, ratio. If no (or if zero is arbitrary), interval.
⚠️ Expect questions that present a variable and ask you to classify it as qualitative or quantitative, and/or name its measurement scale.
⚠️ Know the class-width formula and the steps for constructing a frequency table and histogram.
⚠️ Be able to read a stem-and-leaf plot and recover the original data values.
⚠️ The nominal-ordinal-interval-ratio hierarchy is a favourite topic for multiple-choice items.
True or False: Zip code is a quantitative variable.
Fill in the blank: The measurement scale that has order, equal spacing, and a true zero is the ______ scale.
True or False: In a histogram, the bars should have gaps between them.
Fill in the blank: In a stem-and-leaf plot, the ______ is typically the last digit of each data value.
True or False: Ordinal data can be ranked but the distances between ranks are not guaranteed to be equal.
Answers: 1. False (qualitative/nominal). 2. Ratio. 3. False (bars are adjacent). 4. Leaf. 5. True.
Q: A survey asks respondents to select their favourite cuisine from a list (Italian, Mexican, Thai, Other). What type of variable is this, and what measurement scale does it use?
A: Qualitative variable, nominal scale. The categories have no natural order.
Q: A dataset contains the ages of 200 employees. You want to build a histogram with 8 classes. The youngest employee is 22 and the oldest is 64. What is the class width?
A: (64 – 22) / 8 = 5.25, rounded up to 6.
Q: Why is temperature in Fahrenheit considered interval rather than ratio?
A: Because 0°F does not represent the complete absence of temperature. The zero point is arbitrary, so ratios (e.g. "80°F is twice as hot as 40°F") are not meaningful.
Q: What advantage does a stem-and-leaf plot have over a histogram?
A: It preserves every individual data value while still showing the overall shape of the distribution. A histogram only shows frequencies per interval.
Understanding variable types feeds directly into choosing the right descriptive statistics (mean and standard deviation for quantitative data; mode and frequency counts for qualitative data) and, later, the right inferential tests. The histogram and frequency-table skills introduced here are foundational for understanding probability distributions and the normal curve covered in later chapters.
qualitative variable, categorical variable, quantitative variable, numerical variable, nominal scale, ordinal scale, interval scale, ratio scale, NOIR mnemonic, levels of measurement, frequency table, grouped data, class width, histogram, stem-and-leaf plot, stem and leaf, types of data, STA 2023, Principles of Statistics, UCF