Skip to content
Cambridge AS & A Level9709

Representation of data

Mathematics 9709 Chapter Notes

Last updated November 2026

ShareWhatsAppPost

Representation of data notes as a printable PDF.

Read online free. Download a watermarked copy with a free account.

Read the notes

The full Representation of data notes as text: skim, search, and jump between subtopics.

~21 min read

1. Choosing a representation, and stem-and-leaf diagrams

Choose a representation for what the question needs. A stem-and-leaf diagram includes all data, so the original values can still be read from it. A box-and-whisker plot shows the spread or shape of a distribution, but gives only limited data information: the individual values are lost.

For a back-to-back diagram, one data set goes on each side of a single stem. Order each data set first. Order the leaves outward from the stem, align them vertically with equal spacing, and put no commas or dashes between them.

One key serves both sides, in the form leaf | stem | leaf. Give the units and name both sets. Use different digits on each side, so that the key says which side is which.

Examiner insight

“Weaker solutions often focused on ease or speed of construction and ease of reading data from the diagram. Candidates should be aware that ‘mathematical’ links are expected in responses to gain credit.” “Candidates should be encouraged not to use values for keys which are symmetrical, e.g. 0 | 18 | 0, as these do not identify clearly the teams.”

Worked example 15 marks

The heights, in cm, of the 11 basketball players in each of two clubs, the Amazons and the Giants, are given below.

(a) State an advantage of using a stem-and-leaf diagram compared to a box-and-whisker plot to illustrate this information.

(b) Represent the data by drawing a back-to-back stem-and-leaf diagram with Amazons on the left-hand side of the diagram.

ClubHeights (cm)
Amazons205 198 181 182 190 215 201 178 202 196 184
Giants175 182 184 187 189 192 193 195 195 195 204
  1. 1

    (a) it includes all data [1]

  2. 2

    (b) stems 17 to 21, in order, with no stem missed [1]

  3. 3

    Amazons leaves correct, ordered outward from the stem [1]

  4. 4

    Giants leaves correct, ordered outward from the stem [1]

  5. 5

    ``` Amazons Giants 8 17 5 4 2 1 18 2 4 7 9 8 6 0 19 2 3 5 5 5 5 2 1 20 4 5 21

    Key: 1 | 18 | 2 means 181 cm for Amazons and 182 cm for Giants ``` [1]

2. Quartiles and box-and-whisker plots

Order the data. The median is the middle value. The lower quartile is the middle value of the data below the median, and the upper quartile is the middle value of the data above it. These are mid-values of each half, not a formula for positions. The interquartile range is the upper quartile minus the lower quartile.

A box-and-whisker plot is drawn from five values: the smallest, the lower quartile, the median, the upper quartile and the largest. Use a ruler and a linear scale labelled with the variable and its units. Draw the whisker from the middle of the box, never through it. For two data sets, draw two plots on one scale and label each one.

IQR = Q₃ - Q₁

Examiner insight

“A significant number of solutions did not identify the quartiles accurately by not finding the mid-values of the data above or below the median.” “A small number did have the whiskers incorrectly passing through the box.”

Worked example 13 marks

The back-to-back stem-and-leaf diagram gives the diameters, in cm, of 19 cylindrical pipes produced by each of two companies, A and B.

``` Company A Company B 4 33 1 2 8 9 8 3 2 0 34 1 6 8 9 9 8 7 5 4 1 1 35 1 2 2 3 9 6 5 2 36 5 6 4 3 1 37 0 3 4 38 2 8

Key: 1 | 35 | 3 means the pipe diameter from company A is 0.351 cm and from company B is 0.353 cm ```

Find the median and interquartile range of the pipes produced by company A.

  1. 1

    there are 19 values, so the median is the 10th value: 0.355 cm [1]

  2. 2

    lower quartile: the middle of the lowest nine values, the 5th, is 0.348. Upper quartile: the middle of the highest nine, the 15th, is 0.366 [1]

  3. 3

    IQR = 0.366 - 0.348 = 0.018 cm [1]

3. Choosing a measure and comparing data sets

The mean, median and mode measure central tendency. The range, interquartile range and standard deviation measure variation. Choose with the data in mind. When the data is skewed by one large value, the mean is not suitable and the median is. A mode is no use when the frequencies are all the same.

To compare two data sets, make one comparison of central tendency and one of variation, each in context. Say that one set is generally larger, or more spread than the other.

Quoting the two values is not a comparison. A reader must be able to tell which set is higher or more varied.

Examiner insight

“General comparisons in context for spread and central tendency are required rather than comparing specific values.” “Any comparisons of particular values, e.g., medians, averages, ranges or interquartile ranges, were not awarded marks.”

Worked example 13 marks

The times in minutes taken to run a marathon were recorded for a group of 13 marathon runners and were found to be as follows.

180 275 235 242 311 194 246 229 238 768 332 227 228

State which of the mean, mode or median is most suitable as a measure of central tendency for these times. Explain why the other measures are less suitable.

  1. 1

    the median is most suitable [1]

  2. 2

    not the mean: the data is skewed by one large value, 768 [1]

  3. 3

    not the mode: the frequencies are all the same, since no time repeats [1]

4. Histograms

A histogram shows grouped continuous data. The area of each bar represents the frequency, so the height of a bar is the frequency density. The bars touch, with no gaps.

Calculate the class width from the class boundaries, not from the numbers in the table. Data recorded to the nearest minute in the class 1 − 30 has a width of 30.

State the class widths and the frequency densities before drawing. Use a ruler and a linear scale, and label the vertical axis frequency density and the horizontal axis with the variable and its unit.

frequency density = frequency/(class width)

Examiner insight

“A common error was to assume the upper boundary of the class was stated in the data table, which led to incorrect frequency densities and placement of the class boundaries on the histogram.” “Many candidates drew a bar chart instead of a histogram while others attempted a cumulative frequency diagram.”

Worked example 14 marks

At a summer camp an arithmetic test is taken by 250 children. The times taken, to the nearest minute, to complete the test were recorded. The results are summarised in the table.

Draw a histogram to represent this information.

Time taken, in minutes1 − 3031 − 4546 − 6566 − 7576 − 100
Frequency2130688645
  1. 1

    class widths from the boundaries 0.5, 30.5, 45.5, 65.5, 75.5, 100.5: 30, 15, 20, 10, 25 [1]

  2. 2

    frequency density = frequency ÷ class width: 0.7, 2, 3.4, 8.6, 1.8 [1]

  3. 3

    touching bars between the boundaries, with these heights, on a linear scale [1]

  4. 4

    axes labelled frequency density and time in minutes [1]

5. Cumulative frequency graphs

List the cumulative frequencies first. Plot each one at the upper boundary of its class: the class 5 − 9 ends at 9.5. Draw a smooth curve, not line segments, starting on the horizontal axis at the lowest boundary. If a value below zero is impossible, start at zero.

To estimate a percentile, take that percentage of the total and read across to the curve, then down. A question that says d or more has the other percentage below it. For 30% at d or more, read at 70% of the total.

Show the lines on the graph. The same method finds medians, quartiles and the number of values above or between given values.

percentile p: read at cumulative frequency p/100× n

IQR = Q₃ - Q₁ read from the curve

Examiner insight

“The most common error was to plot the points at the higher value stated for each class, which ignored the continuous nature of the data.” “Candidates should be aware that a curve is required for a cumulative frequency graph, as the use of line segments creates a cumulative frequency polygon which is not acceptable.”

Worked example 16 marks

A driver records the distance travelled in each of 150 journeys. These distances, correct to the nearest km, are summarised in the following table.

(a) Draw a cumulative frequency graph to illustrate the data.

(b) For 30% of these journeys the distance travelled is d km or more. Use your graph to estimate the value of d.

Distance (km)0 − 45 − 1011 − 2021 − 3031 − 4041 − 60
Frequency12163266204
  1. 1

    (a) cumulative frequencies 12, 28, 60, 126, 146, 150 [1]

  2. 2

    upper boundaries 4.5, 10.5, 20.5, 30.5, 40.5, 60.5 [1]

  3. 3

    points plotted at (upper boundary, cumulative frequency), joined by a smooth curve from (0, 0) [1]

  4. 4

    linear scales, both axes labelled, with units [1]

  5. 5

    (b) 70% of 150 = 105 [1]

  6. 6

    line drawn from 105 across to the curve and down: d ≈ 27 [1]

6. Mean and standard deviation, from data and from groups

From the data, the mean is Σ x ÷ n. The variance is the mean of the squares minus the square of the mean. The standard deviation is the square root of the variance.

For grouped data, use the midpoint of each class in place of its values. Find the midpoint from the class boundaries: the class 30 − 39 has midpoint 34.5. If a value cannot be negative, the first class starts at zero, so the class 0 − 9 has midpoint 4.75.

Write the unsimplified calculation, then evaluate it. A fully worked variance is not the answer when a question asks for the standard deviation.

bar x = (sum x)/n, σ² = (sum x²)/n - bar x²

bar x = (sum fm)/(sum f), σ² = (sum fm²)/(sum f) - bar x²

σ = √σ²

Examiner insight

“The most common error was using 4.5 as the mid-value for the first class.” “As in previous questions there was some confusion between variance and standard deviation with a number of candidates giving 151.24, the variance, as their final answer.”

Worked example 13 marks

Helen measures the lengths of 150 fish of a certain species in a large pond. These lengths, correct to the nearest centimetre, are summarised in the following table.

The mean length of these 150 fish is 15.295 cm. Calculate an estimate for the variance of the lengths of the fish.

Length (cm)0 − 910 − 1415 − 1920 − 30
Frequency15486621
  1. 1

    midpoints 4.75, 12, 17, 25: a fish has no negative length, so the first class starts at 0 [1]

  2. 2

    σ² = (4.75² × 15 + 12² × 48 + 17² × 66 + 25² × 21)/150 - 15.295² [1]

  3. 3

    = 262.996 - 233.937 = 29.1 [1]

7. Coded totals

A summary may give Σ(x -a) and Σ(x - a)² in place of Σ x and Σ x². Treat the coded values as a data set of their own. Note that Σ(x -a) = Σ x - na.

The mean of the coded values is the mean of x minus a. The variance of x is the same as the variance of x - a, found from the coded totals.

Square the coded mean in the variance formula. Do not put the original mean into it, and do not mix the coded mean with Σ x².

bar x = (sum (x - a))/n + a

σ² = (sum (x - a)²)/n - ((sum (x - a))/n)²

Examiner insight

“A number of solutions either did not square the coded mean or simply used the original mean in their calculation.” “Good solutions recognised that the variance would be the same for the coded and uncoded data.”

Worked example 14 marks

A summary of 40 values of x gives the following information:

Σ(x -k) = 520, Σ(x - k)² = 9640,

where k is a constant.

(a) Given that the mean of these 40 values of x is 34, find the value of k.

(b) Find the variance of these 40 values of x.

  1. 1

    (a) the mean of the coded values is 520/40 = 13 [1]

  2. 2

    k = 34 - 13 = 21 [1]

  3. 3

    (b) σ² = 9640/40 - (520/40)² [1]

  4. 4

    = 241 - 13² = 72 [1]

8. Two data sets combined

To combine two data sets, add their totals. Never average the two means, and never average the two standard deviations.

For n₁ values with totals Σ x and Σ x² and n₂ values with Σ y and Σ y², the combined mean and variance come from the combined totals. Substitute the numbers before evaluating.

A mean bar x and standard deviation σ give the totals Σ x = nbar x and Σ x² = n(σ² + bar x²). Keep exact values, or at least four significant figures, until the end.

bar x = (sum x + sum y)/(n₁ + n₂)

σ² = (sum x² + sum y²)/(n₁ + n₂) - bar x²

Examiner insight

“Most knew to use either the exact value of the mean or a value to at least 4 significant figures. However, premature approximation was seen in some responses.” “Weaker candidates calculated the standard deviation for each group of members and averaged their values.”

Worked example 15 marks

A sports club has a volleyball team and a hockey team. The heights of the 6 members of the volleyball team are summarised by Σ x = 1050 and Σ x² = 193 700, where x is the height of a member in cm. The heights of the 11 members of the hockey team are summarised by Σ y = 1991 and Σ y² = 366 400, where y is the height of a member in cm.

(a) Find the mean height of all 17 members of the club.

(b) Find the standard deviation of the heights of all 17 members of the club.

  1. 1

    (a) (Σ x + Σ y)/(6 + 11) = (1050 + 1991)/17 = 3041/17 [1]

  2. 2

    = 178.9 cm [1]

  3. 3

    (b) σ² = (193 700 + 366 400)/17 - (3041/17)² [1]

  4. 4

    = (560 100)/17 - 178.88² ≈ 948 [1]

  5. 5

    σ = √(948) = 30.8 cm [1]

Recap

  • A stem-and-leaf diagram includes all the data. A box-and-whisker plot shows spread and shape, with limited data information. A back-to-back diagram has ordered leaves, aligned, and one key in the form leaf | stem | leaf.
  • Quartiles are the middle values of the halves either side of the median. The interquartile range is Q₃ - Q₁, the difference of the quartile values, not of their positions.
  • Compare in context, with words such as generally and more spread. The median suits data skewed by one large value.
  • A histogram has bars of area equal to frequency. Frequency density is frequency divided by class width, with the width taken from the boundaries.
  • Plot cumulative frequencies at upper boundaries and join with a smooth curve. For d or more, read at the other percentage of the total, and show the lines.
  • Grouped mean and variance use midpoints from the boundaries: bar x = sum fm ÷ sum f and σ² = sum fm² ÷ sum f - bar x². Take the square root for the standard deviation.
  • With coded totals, the mean of x is the coded mean plus a. The variance is unchanged, so square the coded mean.
  • Combine two sets by adding totals: Σ x + Σ y and Σ x² + Σ y² over n₁ + n₂. Never average the two means or the two standard deviations.

End-of-chapter exercise

Test yourself on the whole chapter. Work through these before moving on.

  1. Find the median and the mode of the values 9, 4, 12, 5, 7, 10, 5.2 marks
    Answer
    1. order the values: 4, 5, 5, 7, 9, 10, 12
    2. the median is the middle of seven values, the 4th: 7
    3. the mode is the most frequent value: 5

    Trap: Taking the middle of the unordered list, which gives 5, and that is the mode.

  2. Eleven pupils scored these marks in a test: 34, 41, 28, 35, 47, 52, 41, 39, 28, 33, 45. Draw an ordered stem-and-leaf diagram with a key, and state the median.3 marks
    Answer
    1. stems 2 to 5, with ordered leaves: 2 mid 8 8, 3 mid 3 4 5 9, 4 mid 1 1 5 7, 5 mid 2
    2. key: 3 mid 4 means 34 marks
    3. the ordered marks are 28, 28, 33, 34, 35, 39, 41, 41, 45, 47, 52
    4. the median is the 6th value: 39 marks

    Trap: Writing the leaves in the order of the question, not in order, and leaving out the key.

  3. Twelve values, in order, are 3, 5, 6, 9, 10, 11, 12, 14, 15, 19, 20, 24. Find the interquartile range.3 marks
    Answer
    1. lower half: 3, 5, 6, 9, 10, 11. The lower quartile is the middle, (6 + 9)/2 = 7.5
    2. upper half: 12, 14, 15, 19, 20, 24. The upper quartile is the middle, (15 + 19)/2 = 17
    3. IQR = 17 - 7.5 = 9.5

    Trap: Taking the 3rd and 9th values, 6 and 15, gives 9. With twelve values each quartile falls between two values.

  4. Class P and class Q sat the same test. The median mark in class P was 62 and the interquartile range was 14. The median mark in class Q was 55 and the interquartile range was 22. Make two comparisons between the marks of the two classes.2 marks
    Answer
    1. central tendency: class P scored generally higher marks than class Q
    2. spread: class P marks were less spread, more consistent, than class Q marks

    Trap: Stating the numbers 62 and 55, and 14 and 22, with no sentence about which class scored higher or varied more.

  5. The lengths of 100 telephone calls were recorded to the nearest minute. Find the class boundaries and class widths, and the frequency densities needed to draw a histogram. | Length (minutes) | 1 − 5 | 6 − 10 | 11 − 20 | 21 − 40 | | --- | --- | --- | --- | --- | | Frequency | 20 | 30 | 35 | 15 |4 marks
    Answer
    1. boundaries: 0.5, 5.5, 10.5, 20.5, 40.5
    2. class widths: 5, 5, 10, 20
    3. frequency density = frequency ÷ width: 20/5, 30/5, 35/10, 15/20
    4. = 4, 6, 3.5, 0.75

    Trap: Taking the width of 21 − 40 as 19, from the table values. The width comes from the boundaries 20.5 and 40.5, which is 20.

  6. The masses of 80 parcels are summarised by the table of cumulative frequencies. (a) Estimate the mass exceeded by 25% of the parcels, using a cumulative frequency graph. (b) Find the number of parcels with a mass between 2 kg and 5 kg. | Mass m (kg) | m ≤ 1 | m ≤ 2 | m ≤ 3 | m ≤ 5 | m ≤ 8 | | --- | --- | --- | --- | --- | --- | | Cumulative frequency | 8 | 26 | 50 | 72 | 80 |3 marks
    Answer
    1. (a)
    2. 25% of 80 = 20 parcels are heavier, so 60 are lighter. Read the graph at cumulative frequency 60
    3. 60 lies between 50 at 3 kg and 72 at 5 kg, giving about 3 + 2 × 10/22 ≈ 3.9 kg. Accept a reading from 3.8 to 4.0 kg
    4. (b)
    5. 72 - 26 = 46 parcels

    Trap: Reading the graph at 20, the cumulative frequency for 25%, which finds the mass that 75% of the parcels exceed.

  7. The heights of 50 plants are summarised in the table. Calculate estimates of the mean and the standard deviation of the heights. | Height h (cm) | 0 < h ≤ 10 | 10 < h ≤ 20 | 20 < h ≤ 40 | 40 < h ≤ 60 | | --- | --- | --- | --- | --- | | Frequency | 8 | 22 | 15 | 5 |5 marks
    Answer
    1. midpoints: 5, 15, 30, 50
    2. sum fm = 40 + 330 + 450 + 250 = 1070, so bar x = 1070/50 = 21.4
    3. sum fm² = 200 + 4950 + 13 500 + 12 500 = 31 150
    4. σ² = (31 150)/50 - 21.4² = 623 - 457.96 = 165.04
    5. σ = √(165.04) = 12.8 cm

    Trap: Giving 165.04, the variance, as the standard deviation, or using the class widths in place of the midpoints.

  8. A summary of 24 values of x gives Σ(x - 30) = -48 and Σ(x - 30)² = 1200. Find (a) the mean of the 24 values and (b) the variance of the 24 values.4 marks
    Answer
    1. (a)
    2. the mean of the coded values is (-48)/24 = -2
    3. bar x = 30 + (-2) = 28
    4. (b)
    5. σ² = 1200/24 - (-2)² = 50 - 4 = 46

    Trap: Taking the coded mean as +2, which gives a mean of 32. The coded mean is −2, so the mean is 28. Its square, 4, is taken away in the variance.

  9. A machine fills bottles with water. The volumes, x ml, of 20 bottles are summarised by Σ(x - 500) = -36 and Σ(x - 500)² = 258. Five more bottles are measured, with volumes 497, 503, 501, 499 and 495 ml. Find the mean and the standard deviation of the volumes of all 25 bottles.6 marks
    Answer
    1. code the five new volumes as x - 500: -3, 3, 1, -1, -5, so Σ(x - 500) = -5 and Σ(x - 500)² = 9 + 9 + 1 + 1 + 25 = 45
    2. add the coded totals: Σ(x - 500) = -36 - 5 = -41 and Σ(x - 500)² = 258 + 45 = 303
    3. the coded mean is (-41)/25 = -1.64, so bar x = 500 - 1.64 = 498.36 ml
    4. σ² = 303/25 - (-1.64)² = 12.12 - 2.6896 = 9.4304
    5. σ = √(9.4304) = 3.07 ml

    Trap: Putting the original mean, 498.36, into the variance formula with the coded totals, or not squaring the coded mean. Only the coded mean, −1.64, is squared.

  10. A company has 10 vans and 15 lorries. The fuel used in one day by each van has mean 50 litres and standard deviation 4 litres. For all 25 vehicles, the fuel used has mean 56 litres and variance 35.8. Find the mean and the standard deviation of the fuel used by the 15 lorries.6 marks
    Answer
    1. all 25: Σ x = 25 × 56 = 1400. Vans: Σ x = 10 × 50 = 500
    2. lorries: Σ x = 1400 - 500 = 900, so the mean is 900/15 = 60 litres
    3. vans: Σ x² = 10(4² + 50²) = 25 160. All 25: Σ x² = 25(35.8 + 56²) = 79 295
    4. lorries: Σ x² = 79 295 - 25 160 = 54 135
    5. σ² = (54 135)/15 - 60² = 3609 - 3600 = 9, so σ = 3 litres

    Trap: Working with the means or standard deviations directly, as weaker candidates did when they averaged them. Only the totals Σ x and Σ x² = n(σ² + bar x²) can be added or taken away.

Say this, not that

Wording that loses the mark, against the wording the mark scheme credits.

Loses the markGets the mark
The Tigers’ median is 190 and the Lions’ is 186.The Tigers are generally taller than the Lions.
plot the point at the class value in the table, such as (10, 28)plot at the upper boundary, (10.5, 28)
30% of 150 = 45, read at 45 on the cumulative frequency axis70% of 150 = 105, read at 105
the first class 0 − 9 has midpoint 4.5midpoints 4.75, 12, 17, 25

Frequently asked questions

How do I find the quartiles and the interquartile range of a data set?
Order the data first. The median is the middle value, the lower quartile is the middle value of the data below the median, and the upper quartile is the middle value of the data above it. The interquartile range is Q₃-Q₁. For 19 pipe diameters, the median is the 10th value, and the lower quartile is the middle of the lowest nine values, which is the 5th value.
How do I choose between the mean, median and mode, and how do I compare two data sets?
Choose the measure with the data in mind: when the data is skewed by one large value the median is suitable and the mean is not, and a mode is no use when all the frequencies are the same. To compare two sets, make one comparison of central tendency and one of variation, each in context, and say that one set is generally larger or more spread. Quoting the two values is not a comparison.
How do I draw a histogram when the class widths are different?
Calculate the class widths from the class boundaries, not from the numbers in the table. The frequency density is the frequency divided by the class width, and the area of each bar represents the frequency. For the times 1 to 30 and 31 to 45 minutes, the boundaries are 0.5, 30.5 and 45.5, so the widths are 30 and 15, and the densities are 0.7 and 2. The bars touch, with no gaps.
How do I estimate the mean and standard deviation of grouped data?
Use the midpoint of each class in place of its values, and find each midpoint from the class boundaries. Then bar x=(sum fm)/(sum f) and σ²=(sum fm²)/(sum f)-bar x², and take the square root of the variance for the standard deviation. If a value cannot be negative, the first class starts at zero, so the class 0 to 9 has midpoint 4.75, not 4.5.
How do I combine two data sets, or use coded totals, to find the mean and variance?
To combine two data sets, add their totals: sum x+sum y and sum x²+sum y², divided by n₁+n₂. Never average the two means or the two standard deviations. With coded totals sum(x-a) and sum(x-a)², the mean of x is the coded mean plus a, and the variance is the same as the variance of the coded values, so square the coded mean, not the original mean.
Why do students read the wrong value from a cumulative frequency graph?
The most common error is to take 30% of the journeys and read the graph at that value. For 30% of the journeys at d km or more, the other 70% are below d, so read at 70% of the total, which is 105 for 150 journeys. Plot each cumulative frequency at the upper boundary of its class and join the points with a smooth curve, not line segments, then read across to the curve and down.

Free notes are just the start.

Unlock every Workbook and Chapter at a Glance, and generate your own worksheets and predicted papers.

Explore plans

Related chapters