8C

Types of data and frequency tables

Categorical (nominal and ordinal) and numerical (discrete and continuous) data, ungrouped and grouped frequency tables, cumulative and relative frequency, and class centres.

Before you can choose a graph or a summary statistic, you need to know what kind of data you have. Averaging postcodes or drawing a histogram of favourite colours makes no sense, and it's the type of data that tells you so.

Four types of data

TypeWhat it isExamples
Categorical, nominalLabels with no orderfavourite sport, transport mode, postcode
Categorical, ordinalLabels with a natural orderT-shirt size, star rating, "strongly disagree … strongly agree"
Numerical, discreteCounted: separate values, usually whole numbersnumber of siblings, goals scored, Opal taps
Numerical, continuousMeasured: any value in a rangeheight, time, mass, temperature

A quick test: if you count it, it's discrete. If you measure it, it's continuous, even if you round the measurement. If adding or averaging the values makes no sense, it's categorical, even when the values are written as numbers.

InteractiveWhat type of data is it?
Try this

Classify all twelve items. Aim for $12$ out of $12$.

Which items could be argued two ways? For each one, explain how the way the data is recorded changes its type.

Ungrouped frequency tables

A frequency table lists each value (the score, $x$) and how many times it occurs (the frequency, $f$). Three extra columns make it much more useful:

  • Cumulative frequency (cf): a running total of the frequencies. It tells you how many values are less than or equal to each score.
  • Relative frequency: $\dfrac{f}{\text{total}}$, the fraction (or percentage) of the data at each score.
  • $f \times x$: adding this column and dividing by the total gives the mean.
Example 1●

Thirty students recorded how many people live in their home: $2$ (4 students), $3$ (7), $4$ (10), $5$ (6), $6$ (3). Complete a frequency table and find the mean, median and mode.

$x$$f$cf$f \times x$
2448
371121
4102140
562730
633018
Total30117
Running totals for cf, and f × x for each row.
Mean $= \dfrac{117}{30} = 3.9$ people
The mean is the total of all the values divided by how many there are.
Median $= 4$
With 30 values, the median is halfway between the 15th and 16th. The cf column passes 11 at x = 3 and reaches 21 at x = 4, so both are 4.
Mode $= 4$
The score with the highest frequency.

Grouped frequency tables

When data is continuous, or has many different values, a table of every value would be huge and mostly ones. Instead, group the values into classes of equal width, such as $0$ to under $2$, $2$ to under $4$, and so on. Five to ten classes usually works well.

Grouping loses the exact values. To estimate the mean, use the class centre (the midpoint of each class) as if every value in the class were at its centre.

Class centre
$$\text{class centre} = \frac{\text{lower limit} + \text{upper limit}}{2}$$
Example 2●●

Forty Year 11 students recorded their daily screen time in hours: $0$–$2$: $3$, $2$–$4$: $9$, $4$–$6$: $14$, $6$–$8$: $10$, $8$–$10$: $4$ (each class includes its lower limit but not its upper). Estimate the mean, and find the modal class.

$f \times$ centre: $3 \times 1 = 3$, $9 \times 3 = 27$, $14 \times 5 = 70$, $10 \times 7 = 70$, $4 \times 9 = 36$
Class centres are the midpoints: 1, 3, 5, 7 and 9.
Total $= 3 + 27 + 70 + 70 + 36 = 206$
Add the column.
Mean $\approx \dfrac{206}{40} = 5.15$ hours
It's an estimate, because we only know which class each value is in.
Modal class: $4$ to under $6$ hours
The class with the highest frequency.

Your turn

From Example 1, what percentage of students live in a home with at least $5$ people?

Show the working

At least $5$ means $5$ or $6$: $6 + 3 = 9$ students. $\dfrac{9}{30} \times 100\% = 30\%$. Or from the cf column: $30 - 21 = 9$.

Flashcards
Discrete vs continuous
Discrete is counted. Continuous is measured.
Nominal vs ordinal
Nominal: no order. Ordinal: natural order.
Mean from a frequency table
$\dfrac{\sum fx}{\sum f}$
Practice
  1. The time taken to complete a crossword is:

  2. Coffee sizes small, medium and large are:

  3. The number of pets in a household is:

  4. In Example 1, what is the relative frequency of a $5$-person home, as a decimal?

  5. In Example 1, how many students live in a home with $3$ or fewer people?

  6. What is the class centre of the class $15$ to under $20$?

  7. Why is the mean from a grouped table only an estimate?

  8. Exam style: In Example 2, how many students spend less than $6$ hours a day on screens?

  9. Exam style: Scores $1$, $2$, $3$, $4$ have frequencies $5$, $8$, $x$, $2$, and the total frequency is $40$. Find $x$.

Formula sheet