Skip to content
MathClicksIGCSE← All notes Cambridge IGCSE® Mathematics 0580 Extended Chapter 4 — Collecting, Organising and Displaying Data

4.2  Organising Data

Tally charts, frequency tables, grouped frequency tables with correct class intervals, two-way tables and stem-and-leaf diagrams — turning raw lists into tables you can actually read.

From raw list to frequency table

Raw data is honest but unreadable: thirty numbers in the order they happened tell you almost nothing at a glance. A frequency table fixes that. You list each possible value once, tally how often it occurs, and write the total as its frequency. The table holds exactly the same information as the raw list — just organised.

Key idea Frequency means “how many times it occurs”. Whatever table or chart you build later, the sum of the frequencies must equal the number of data values you started with. Checking this takes five seconds and catches almost every tallying slip.
Example 1The shoe sizes of 20 students are: 36, 37, 37, 38, 36, 39, 38, 37, 36, 38, 40, 37, 38, 39, 37, 36, 38, 37, 39, 38. Construct a frequency table.
1
Shoe size is discrete and only the values 36–40 occur, so one row per size. Go through the raw list once, in order, making a tally mark in the right row as you meet each value — and cross values off the list as you go.
2
Convert the tallies to frequencies:
Shoe sizeTallyFrequency
36||||4
37|||| |6
38|||| |6
39|||3
40|1
3
Check the total against the number of raw values. 4 + 6 + 6 + 3 + 1 = 20 ✓
Frequencies 4, 6, 6, 3, 1 — total 20 ✓
Exam tip When a table is given with a Frequency column already headed, you do not need to show tally marks — but the mark scheme always allows them, and they stop you double-counting.

Grouping continuous data: class intervals

A frequency table with one row per value only works when there are few different values. Continuous data is the opposite: measure 30 sprint times to 0.01 s and you will probably get 30 different values. The fix is to group the data into class intervals and count how many values land in each interval.

Key idea — writing class intervals correctly For continuous data, class intervals are written with inequalities: 10 ≤ t < 20, 20 ≤ t < 30, … Each interval includes its lower boundary (≤) and excludes its upper boundary (<). The intervals must cover every possible value with no gaps and no overlaps — every data value has exactly one home.

Where does a boundary value go?

0 10 20 30 40 50 60 time t (seconds) 10 ≤ t < 20 20 ≤ t < 30 t = 20 goes UP, into 20 ≤ t < 30

A filled circle means the boundary is included; an open circle means it is excluded. The value t = 20 fails t < 20 but satisfies 20 ≤ t, so it belongs to the second interval. No value can ever belong to two intervals.

Watch out — the classic wrong table Classes written 10–20, 20–30, 30–40 overlap: a time of exactly 20 seconds fits in two rows, so two students could tally it differently. Classes written 10–19, 20–29 have gaps for continuous data: 19.4 has no home. Inequality notation, 10 ≤ t < 20, fixes both problems at once — and examiners expect it.
What grouping costs you A grouped table is easier to read but loses detail: from the table alone you know how many values fall in 20 ≤ t < 30, but not what they were. That is why, later in the course, grouped data only gives an estimate of the mean and why a stem-and-leaf diagram (below) is sometimes preferred — it groups the data without throwing the values away.

Class interval builder

Set a lower bound, a class width and a number of classes — then edit the data list and watch each value drop into its correct class. Try putting a value exactly on a boundary, e.g. 20.

Number of classes5
Example 2The times, in seconds, taken by 30 students to solve a puzzle are: 34, 18, 42, 27, 51, 33, 22, 45, 38, 29, 16, 40, 31, 24, 47, 35, 20, 43, 28, 55, 37, 26, 49, 32, 19, 41, 30, 23, 52, 36. Construct a grouped frequency table using classes 10 ≤ t < 20, 20 ≤ t < 30, …
1
The data runs from 16 to 55, so five classes of width 10 starting at 10 cover everything: 10 ≤ t < 20 up to 50 ≤ t < 60.
2
Tally through the list once. Boundary check as you go: 20 goes in 20 ≤ t < 30 (not the class below), 30 goes in 30 ≤ t < 40, 40 in 40 ≤ t < 50.
Time t (seconds)TallyFrequency
10 ≤ t < 20|||3
20 ≤ t < 30|||| |||8
30 ≤ t < 40|||| ||||9
40 ≤ t < 50|||| ||7
50 ≤ t < 60|||3
3
Check the total. 3 + 8 + 9 + 7 + 3 = 30 ✓
Frequencies 3, 8, 9, 7, 3 — total 30 ✓
Reading the table The modal class — the interval with the highest frequency — is 30 ≤ t < 40. We can no longer say what the individual times were: that detail was the price of grouping.

Two-way tables

A two-way table organises data by two variables at once — one along the rows, one along the columns. Each inner cell is a joint count (“boys who chose cereal”), and the Total row and Total column summarise each variable on its own.

Exam questions usually give you a table with several cells missing, plus a couple of facts in words. The technique never changes: find a row or column with exactly one gap — that gap is forced — fill it, and repeat until the table is complete. Then re-add every row and column.

Example 3120 students were asked what they eat for breakfast. 64 are boys. 50 students in total eat cereal. 21 boys eat toast and 18 boys eat nothing. 13 girls eat nothing. Complete the two-way table.
1
Enter what is given. The Boys row has one gap (cereal): boys cereal = 64 − 21 − 18 = 25
2
The Cereal column now has one gap: girls cereal = 50 − 25 = 25
3
Girls total from the grand total: girls total = 120 − 64 = 56
4
The Girls row has one gap (toast): girls toast = 56 − 25 − 13 = 18
5
Finish the Total row and check everything:
CerealToastNothingTotal
Boys25211864
Girls25181356
Total503931120
toast: 21 + 18 = 39;  nothing: 18 + 13 = 31;  50 + 39 + 31 = 120 ✓
Table completed — all rows and columns total correctly
Exam tip Two-way tables feed straight into probability. “A student is picked at random” means every one of the 120 students is equally likely — so the probability of any description is simply (cell or total that matches) / 120. Example 4 practises exactly this.

Stem-and-leaf diagrams

A stem-and-leaf diagram is a clever halfway house: it groups the data like a frequency table, but keeps every actual value visible. Each number is split into a stem (the first digit or digits) and a leaf (the final digit). The leaves in each row are written in order, and a key tells the reader how to rebuild a value.

Nine quiz scores: 12, 15, 17, 21, 24, 24, 28, 31, 33

StemLeaf
12  5  7
21  4  4  8
31  3

Key: 2 | 4 means 24. The diagram is really a bar chart lying on its side — the longest row of leaves is the modal group — but unlike a bar chart you can still read every value: the median of these 9 values is the 5th, counting through the leaves in order: 12, 15, 17, 21, 24. The mode is 24 (the repeated leaf).

Key idea An ordered stem-and-leaf diagram with a key is a full data set in disguise. From it you can read off the mode (most repeated leaf), the median (middle value — count n + 12 values through the leaves) and the range (largest − smallest). Cambridge insists on the key and on ordered leaves — both carry marks.
Watch out Write the leaves as single digits with even spacing. A leaf of 2 | 14 is meaningless — 21 and then 4? 214? If the data has decimals like 3.7, the stem is 3 and the leaf is 7, with the key 3 | 7 = 3.7. And always tally through the raw list in one pass, writing an unordered diagram first, then rewrite it ordered — that is the reliable two-stage method.

Back-to-back stem-and-leaf

To compare two data sets, put a second set of leaves on the left of the same stems, read right-to-left. The result is two histograms sharing a spine — ideal for “compare the two classes” questions, which Example 6 tackles in full.

Drawing conclusions — and knowing their limits

Organising data is not the end of the cycle: the syllabus expects you to read, interpret and draw inferences from tables, to compare two data sets, and to recognise when a conclusion is not justified.

Comparing two data sets

Always compare two things, in context:

  • an average (usually the median): “Class B’s median of 34 is higher than Class A’s 31, so Class B scored better on average.”
  • a measure of spread (usually the range): “Class B’s range of 30 is smaller than Class A’s 33, so Class B’s scores are more consistent.”

A number on its own scores nothing — the comparison word (higher, smaller, more consistent) and the context earn the marks.

When a conclusion is not safe

  • Small sample — 10 students cannot represent a whole school.
  • Unrepresentative sample — asking only the football team about sport.
  • One occasion — one quiz does not prove one class is “better at maths”.
  • Grouped data — the raw values are gone, so statements about individuals are guesses.
Exam tip “Give a reason why this conclusion may not be valid” wants one specific sentence about the data, not a vague “it might be wrong”. Name the flaw: the sample is small, or unrepresentative, or the data covers only one occasion.

More worked examples

Example 4Using the completed breakfast table from Example 3, one of the 120 students is picked at random. Find the probability that the student (a) is a girl who eats toast, (b) eats nothing, given that the student is a boy.
1
(a) “Girl who eats toast” is a single joint cell: 18 students out of all 120. P(girl and toast) = 18/120 = 3/20
2
(b) “Given that the student is a boy” shrinks the pool: only the 64 boys can be picked now. Of them, 18 eat nothing. P(nothing | boy) = 18/64 = 9/32
(a) 320     (b) 932
Exam trap In part (b) the denominator is 64, not 120. The words “given that” always change the denominator to the total of the group named after them. Using 120 is the single most common error on this question type.
Example 5The marks of 15 students in a test are: 23, 35, 41, 28, 36, 44, 31, 27, 39, 42, 25, 38, 38, 30, 47. Draw an ordered stem-and-leaf diagram, and find the mode, the median and the range.
1
Stems are the tens digits: 2, 3, 4. First pass — write the leaves in raw order: 2 | 3 8 7 5
3 | 5 6 1 9 8 8 0
4 | 1 4 2 7
2
Second pass — rewrite with the leaves in order, and add the key: 2 | 3 5 7 8
3 | 0 1 5 6 8 8 9
4 | 1 2 4 7
Key: 3 | 5 means 35 marks
3
Count check: 4 + 7 + 4 = 15 leaves ✓. The mode is the repeated leaf: 38 appears twice. mode = 38
4
The median is the (15 + 1) ÷ 2 = 8th value. Count 8 leaves from the top: 23, 25, 27, 28, 30, 31, 35, 36. median = 36
5
The range uses the first and last leaves: range = 47 − 23 = 24
mode = 38,   median = 36,   range = 24
Example 6The back-to-back stem-and-leaf diagram shows quiz scores for two classes of 13 students. Compare the two classes, and explain why it would not be safe to conclude that Class B is better at mathematics.
Class A   |   Class B
1
The diagram (Class A leaves read right-to-left):     5 2 | 1 | 8
  8 6 4 1 | 2 | 2 5 7 9
8 6 5 3 1 | 3 | 2 4 5 7
    5 2 | 4 | 1 3 4 8
Key: 2 | 3 | 2 means 32 for Class A and 32 for Class B
2
Each side has 13 values, so the median is the (13 + 1) ÷ 2 = 7th. Class A in order: 12, 15, 21, 24, 26, 28, 31, … median(A) = 31
3
Class B in order: 18, 22, 25, 27, 29, 32, 34, … median(B) = 34
4
Spread, using the range: range(A) = 45 − 12 = 33
range(B) = 48 − 18 = 30
5
Write the comparison in context, one sentence per measure: Class B’s median (34) is higher than Class A’s (31), so Class B scored better on average. Class B’s range (30) is smaller than Class A’s (33), so Class B’s scores are slightly more consistent.
6
Why the big conclusion is unsafe: this is one quiz taken by 13 students per class — a single small sample. Performance on one occasion, on one topic, does not justify a general claim about being “better at mathematics”.
B: higher median (34 > 31), smaller range (30 < 33) — but one small sample cannot prove B is “better”
Exam trap “Compare the distributions” needs an average and a spread, both interpreted in context. Quoting “34 and 31” with no sentence, or comparing two ranges while ignoring the medians, drops half the marks every time.

Your turn

Practice set

  1. Write down the four class intervals of width 5 that organise heights from 150 cm up to (but not including) 170 cm, using correct inequality notation for a height h.
  2. A table uses the classes 0–10, 10–20, 20–30 for the mass m kg of parcels. Explain the error, and rewrite the classes correctly.
  3. Using the grouped table from Example 2, write down (a) the modal class, (b) the number of students who took less than 30 seconds, (c) the fraction of students with times of 40 seconds or more.
  4. 90 students chose one activity. 48 are in Year 10; 25 students in total chose swimming; 19 Year 10 students chose swimming; 30 Year 11 students chose football; the rest chose athletics. Complete the two-way table (rows Year 10 / Year 11; columns Swimming / Football / Athletics) and find how many Year 10 students chose athletics, given that 26 Year 10 students chose football.
  5. Draw an ordered stem-and-leaf diagram for the data 5.2, 6.1, 4.8, 5.9, 6.4, 5.2, 4.5, 6.8, 5.7, 6.1, 5.2 (use stems 4, 5, 6 and a key), and find the mode and median.

  1. 150 ≤ h < 155, 155 ≤ h < 160, 160 ≤ h < 165, 165 ≤ h < 170 — each lower bound included, each upper bound excluded.
  2. The classes overlap: a parcel of exactly 10 kg fits in both 0–10 and 10–20. Correct version: 0 ≤ m < 10,  10 ≤ m < 20,  20 ≤ m < 30
  3. (a) 30 ≤ t < 40 (frequency 9)  (b) 3 + 8 = 11  (c) (7 + 3)/30 = 10/30 = 1/3
  4. Year 10 athletics = 48 − 19 − 26 = 3. Full table: Year 11 swimming = 25 − 19 = 6; Year 11 total = 90 − 48 = 42; Year 11 athletics = 42 − 6 − 30 = 6; athletics total 3 + 6 = 9; check: 25 + 56 + 9 = 90 ✓ (football total 26 + 30 = 56). Answer: 3 students
  5. Stems 4, 5, 6 with leaves in order: 4 | 5 8;  5 | 2 2 2 7 9;  6 | 1 1 4 8; key 5 | 2 = 5.2. Count: 2 + 5 + 4 = 11 ✓. Mode = 5.2; median = 6th of 11 values = 5.7

Key points to remember

  • Tally in groups of five, in one pass through the raw list, and always check that the frequencies total the number of data values.
  • Continuous data is grouped with inequality class intervals: 10 ≤ t < 20 — lower bound in, upper bound out, no gaps, no overlaps.
  • A boundary value like t = 20 always goes up into the class that starts at it.
  • Grouping loses the raw values — you keep the shape of the data but lose the detail.
  • In a two-way table, repeatedly fill the row or column with exactly one gap, then re-add everything; “given that” probability questions use the group total, not the grand total, as denominator.
  • A stem-and-leaf diagram must be ordered and must have a key; read off mode, median (the (n+1)/2th leaf) and range directly.
  • To compare two data sets: one average + one measure of spread, both in context — and remember a small, one-occasion sample cannot support a sweeping conclusion.

Where next?

✅ Mark scheme All notes

Progress is saved on this device only and appears on the notes home page.