Maths4UBETA

Data types, stem-and-leaf diagrams and quartiles

Choose a suitable representation, preserve every observation and read values and quartiles from an explicit key.

Try the quick check →
Lesson 1 of 5

Section 1 of 4 · Core · about 6 min

What kind of data have I collected?

A variable is the property recorded for each individual or item. The individual records are the raw data. Classify what the values mean, rather than how they happen to be written.

TypeMeaningExample
Qualitative, or categoricalA label or categoryFlower colour or an identification code
Quantitative and discreteA numerical quantity with separate possible valuesThe number of flowers on a plant
Quantitative and continuousAn underlying measurement that can take any value in an intervalThe height of a plant

Your turn

Classify each variable: a player’s shirt number used only to identify them; the number of books borrowed; and the actual length of a leaf, recorded to the nearest millimetre.

Shirt identifier
Number of books
Underlying leaf length

Section 2 of 4 · Core · about 10 min

How do I construct and read a stem-and-leaf diagram?

A stem-and-leaf diagram displays individual numerical observations in order. The stem contains the leading digits, and each leaf is one final digit at a fixed place value. A key gives that place value and the units; the same pair of digits can represent different measurements under different keys.

StemLeaves
21 4 4 8
30 2 7 9
4—
51

The ordered heights are 2.1, 2.4, 2.4, 2.8, 3.0, 3.2, 3.7, 3.9, 5.12.1,\ 2.4,\ 2.4,\ 2.8,\ 3.0,\ 3.2,\ 3.7,\ 3.9,\ 5.1 centimetres. Exclude the fifth height when finding the two half-medians.

Q1=2.4+2.42=2.4,Q2=3.0,Q3=3.7+3.92=3.8.Q_1=\frac{2.4+2.4}{2}=2.4,\quad Q_2=3.0,\quad Q_3=\frac{3.7+3.9}{2}=3.8.IQR=3.8−2.4=1.4 cm.\mathrm{IQR}=3.8-2.4=1.4\,\mathrm{cm}.

The key 2∣4=2.4 cm2\mid4=2.4\,\mathrm{cm} fixes the scale. Repeated leaves preserve repeated heights; stem 44 remains empty. The ordered positions also support the quartile method below.

Worked example

Build an ordered diagram without losing an observation

Nine seedling heights, recorded to the nearest 0.1 cm0.1\,\mathrm{cm}, are

3.7, 2.4, 5.1, 3.0, 2.1, 3.9, 2.8, 3.2, 2.4.3.7,\ 2.4,\ 5.1,\ 3.0,\ 2.1,\ 3.9,\ 2.8,\ 3.2,\ 2.4.

Construct an ordered stem-and-leaf diagram with a key.

  1. Use the whole-number part as the stem and the tenths digit as the leaf. Thus 2∣42\mid4 means 2.4 cm2.4\,\mathrm{cm}.

  2. Place every observation on its stem. The two records of 2.42.4 need two leaves 44. The record 3.03.0 needs a leaf 00.

  3. StemLeaves
    2214481\quad4\quad4\quad8
    3302790\quad2\quad7\quad9
    44
    5511

    Key: 2∣42\mid4 represents 2.4 cm2.4\,\mathrm{cm}.

  4. Check the count: 4+4+0+1=94+4+0+1=9 leaves. The empty stem 44 shows that no recorded height lies from 4.04.0 to 4.9 cm4.9\,\mathrm{cm}; it is not an extra observation.

If a row is crowded, split every stem into two rows: first leaves 00 to 44, then leaves 55 to 99. Label the groups clearly and use the same split throughout. Splitting changes the layout, not the recorded values or the number of observations.

Worked example

Split a crowded stem into two labelled rows

The test scores, in marks, are 42, 44, 46, 49, 50, 52, 54, 55, 58, 6342,\ 44,\ 46,\ 49,\ 50,\ 52,\ 54,\ 55,\ 58,\ 63. Construct a split stem-and-leaf diagram, using a first row for leaves 00 to 44 and a second row for leaves 55 to 99.

  1. Use tens as stems and units as leaves. Repeat each stem twice, keeping the lower leaf group before the upper group.

  2. StemAllowed leavesLeaves
    440 to 40\text{ to }4242\quad4
    445 to 95\text{ to }9696\quad9
    550 to 40\text{ to }40240\quad2\quad4
    555 to 95\text{ to }9585\quad8
    660 to 40\text{ to }433
    665 to 95\text{ to }9

    Key: 4∣24\mid2 represents 4242 marks. Each stem has a lower and an upper leaf row.

  3. The leaf 44 in the first row of stem 55 represents 5454 marks. The leaf 55 belongs in its second row and represents 5555 marks.

  4. There are 2+2+3+2+1+0=102+2+3+2+1+0=10 leaves. The final empty row completes the stated split-stem pattern; it adds no score.

Your turn

The diagram shows recorded task times.

StemLeaves
1135583\quad5\quad5\quad8
22464\quad6
33
4411

Key: 1∣31\mid3 means 13 s13\,\mathrm{s}. Find the number of observations, the largest time and the repeated time. Interpret the empty stem.

Enter the value on its own or write n = … . Fractions and exact square roots are accepted.

Enter an exact number, for example 3/2 or 2-sqrt(3).

Enter an exact number, for example 3/2 or 2-sqrt(3).

Meaning of the empty stem

Section 3 of 4 · Core · about 11 min

How do I find the median, quartiles and IQR?

Put the observations in increasing order and count all of them, including repeats. For odd nn, the median is the observation at position n+12\frac{n+1}{2}. For even nn, average the observations at positions n2\frac{n}{2} and n2+1\frac{n}{2}+1. A position is not a data value.

Worked example

Exclude the overall median when the count is odd

The ordered seedling heights, in centimetres, are 2.1, 2.4, 2.4, 2.8, 3.0, 3.2, 3.7, 3.9, 5.12.1,\ 2.4,\ 2.4,\ 2.8,\ 3.0,\ 3.2,\ 3.7,\ 3.9,\ 5.1. Find the median, quartiles, interquartile range and range.

Quartile rule: use the median of each half of the ordered data. Exclude the overall median from both halves when the number of observations is odd.

  1. There are n=9n=9 observations. The median is the fifth value:

    Q2=3.0 cm.Q_2=3.0\,\mathrm{cm}.
  2. Exclude that one middle observation when forming the halves:

    lower half: 2.1, 2.4, 2.4, 2.8;\text{lower half: }2.1,\ 2.4,\ 2.4,\ 2.8;upper half: 3.2, 3.7, 3.9, 5.1.\text{upper half: }3.2,\ 3.7,\ 3.9,\ 5.1.
  3. Q1=2.4+2.42=2.4 cm,Q3=3.7+3.92=3.8 cm.Q_1=\frac{2.4+2.4}{2}=2.4\,\mathrm{cm},\qquad Q_3=\frac{3.7+3.9}{2}=3.8\,\mathrm{cm}.
  4. IQR=3.8−2.4=1.4 cm.\mathrm{IQR}=3.8-2.4=1.4\,\mathrm{cm}.
  5. range=5.1−2.1=3.0 cm.\text{range}=5.1-2.1=3.0\,\mathrm{cm}.

    The range uses the extremes; the IQR describes the spread of the central part of the data.

StemBandLeaves
40–42 4
45–96 9
50–40 2 4
55–95 8
60–43
65–9—

Key: 4∣2=424\mid2=42 marks. Read the ten values in row order. The third observation in each half gives the corresponding quartile.

Q2=50+522=51,IQR=55−46=9 marks.Q_2=\frac{50+52}{2}=51,\qquad \mathrm{IQR}=55-46=9\text{ marks}.

The ten scores split into two groups of five. Under the stated rule, Q1=46Q_1=46, the median is 5151, and Q3=55Q_3=55. No observation is removed in the even case.

Worked example

Keep every observation when the count is even

The ordered test scores, in marks, are 42, 44, 46, 49, 50, 52, 54, 55, 58, 6342,\ 44,\ 46,\ 49,\ 50,\ 52,\ 54,\ 55,\ 58,\ 63. Find the median, quartiles and interquartile range.

Quartile rule: use the median of each half of the ordered data. Exclude the overall median from both halves when the number of observations is odd.

  1. There are 1010 scores, so average the fifth and sixth:

    Q2=50+522=51 marks.Q_2=\frac{50+52}{2}=51\text{ marks}.
  2. Split the actual observations into equal halves:

    lower half: 42, 44, 46, 49, 50;\text{lower half: }42,\ 44,\ 46,\ 49,\ 50;upper half: 52, 54, 55, 58, 63.\text{upper half: }52,\ 54,\ 55,\ 58,\ 63.
  3. Each half contains five observations. Its median is its third value:

    Q1=46,Q3=55.Q_1=46,\qquad Q_3=55.
  4. IQR=55−46=9 marks.\mathrm{IQR}=55-46=9\text{ marks}.

    The calculated median 5151 is not an extra score to insert into either half.

Your turn

Find the median, lower quartile, upper quartile and interquartile range of these six values:

12, 6, 25, 16, 10, 19.12,\ 6,\ 25,\ 16,\ 10,\ 19.

Quartile rule: use the median of each half of the ordered data. Exclude the overall median from both halves when the number of observations is odd.

Enter an exact number, for example 3/2 or 2-sqrt(3).

Enter an exact number, for example 3/2 or 2-sqrt(3).

Enter an exact number, for example 3/2 or 2-sqrt(3).

Enter an exact number, for example 3/2 or 2-sqrt(3).

The median describes the centre; the IQR describes central spread. A smaller IQR means that the central observations are more tightly grouped. Changing an extreme value can change the range while leaving the median and quartiles unchanged, but adding observations or changing values around the middle can alter the statistics: check again.

Section 4 of 4 · Core · about 6 min

Which display preserves the information I need?

Choose a representation for the question being asked. A small numerical data set can often be shown in full; a large one may need a summary. Categorical counts can be compared in a bar chart, whereas stem-and-leaf diagrams need numerical values with a meaningful order.

DisplayUseful forInformation retained or lost
Ordered stem-and-leafA small or moderate numerical data setPreserves every recorded value and repetition; normally loses collection order and individual labels.
Box plotCompact comparisons of centre and spreadShows selected summary values; does not normally recover all individual observations.
HistogramThe distribution of grouped numerical dataShows class frequencies through areas; individual values within classes are lost.
Cumulative frequency graphRunning totals and estimated quantiles for grouped dataShows how many records fall below class boundaries; within-class values are not recovered.

Your turn

A teacher wants a compact comparison of the median and interquartile range of scores in two classes. Choose a suitable display. Then decide whether that display alone recovers every score, and what an ordered stem-and-leaf diagram normally loses.

Suitable compact comparison
Can the chosen display recover every individual score?
Information normally lost by an ordered stem-and-leaf diagram

Worked examples

Practise the method

Core practice

Question 1 of 4

0 / 4 checked in this collection

Question list

Core practice

Fresh variants

Exam-style

Decode the key and classify the variable

2 marks

A key says 2∣32\mid3 represents 2323 orders. Interpret 12∣712\mid7. Classify the underlying variable.

Enter an exact number, for example 3/2 or 2-sqrt(3).

Underlying variable

Choose one option. Explain your reasoning on paper.

Full answer-format guide

Exact numbers: 3/2, sqrt(5), 2-sqrt(3), pi/6, 3*pi/2. Sets: {1,4}. Intervals: (3,5]; a round bracket excludes the endpoint. Infinity: inf; union: U; no solutions: empty. Separate coordinate pairs or triples with semicolons. Expressions: 2x^2+3x-1; equations: x^2=3x+1 or the polynomial equal to zero. Factors: x-1 ; x+2. Parameter fraction: numerator ; denominator. List integer answers individually.

Review the method

Progress stays in this browser. Create an account to save it or sign in.

Extra practice from this lesson

Classify what is measured, not how it is written

A survey records a bus route number, the number of passengers and journey duration rounded to the nearest minute. Classify the three underlying variables. A separate mass diagram has key 2∣6=2.62\mid6=2.6 g; decode 12∣312\mid3.

Bus route identifier
Number of passengers
Underlying journey duration

Enter an exact value or round to 3 significant figures.

Keep every copy while arranging the leaves

The following recorded times are in seconds:

34,27,19,34,42,21,48,30,27,51,23.34,27,19,34,42,21,48,30,27,51,23.

Draw an ordered stem-and-leaf diagram with a key on paper. Then enter the observation count, the smallest value and the greatest value.

Enter the value on its own or write n = … . Fractions and exact square roots are accepted.

Enter an exact number, for example 3/2 or 2-sqrt(3).

Enter an exact number, for example 3/2 or 2-sqrt(3).

An even data set can have odd-sized halves

Find the median, both quartiles and IQR of these ten observations:

4,7,9,11,13,15,18,20,24,30.4,7,9,11,13,15,18,20,24,30.

Use medians of the lower and upper halves for quartiles; exclude the overall median when the number of observations is odd.

Enter an exact number, for example 3/2 or 2-sqrt(3).

Enter an exact number, for example 3/2 or 2-sqrt(3).

Enter an exact number, for example 3/2 or 2-sqrt(3).

Enter an exact number, for example 3/2 or 2-sqrt(3).

Read a split stem as two parts of one decade

The following ordered diagram records counts. Each stem is split into a low row for leaves 00–44 and a high row for leaves 55–99.

StemLeaves
2 low01340\quad1\quad3\quad4
2 high5585\quad5\quad8
3 low020\quad2
3 high77

Key: a stem 22 with leaf 55 represents 2525 items. Find the number of observations at most 2525, the median and the range.

Enter an exact number, for example 3/2 or 2-sqrt(3).

Enter an exact number, for example 3/2 or 2-sqrt(3).

Enter an exact number, for example 3/2 or 2-sqrt(3).

Match a display to the information needed

Choose a suitable display for each purpose. In each case explain your choice on paper.

A: Keep all 1818 individual recorded heights visible in a compact ordered display.

B: Show the shape of a distribution of 50005000 masses when only grouped class frequencies are available.

Display for A
Display for B

Apply it · original exam-style problems

Show your working on paper and compare it with the worked solution and marking guidance.

Start after this lesson

A decimal key and twelve recorded measurements 8 marks

Twelve component masses, recorded to the nearest 0.10.1 g, are:

2.1,2.3,2.3,2.8,3.0,3.4,3.6,3.9,4.0,4.5,4.8,5.2.2.1,2.3,2.3,2.8,3.0,3.4,3.6,3.9,4.0,4.5,4.8,5.2.

Draw an ordered stem-and-leaf diagram with a decimal key. Find the median, both quartiles, IQR and range.

Use medians of the lower and upper halves for quartiles; exclude the overall median when the number of observations is odd.

Hint

There are six values in each half. Average the middle pair of each half and use the key to restore the mass scale.

Worked solution
  1. StemLeaves
    213381\quad3\quad3\quad8
    304690\quad4\quad6\quad9
    40580\quad5\quad8
    522
  2. Key: 3∣43\mid4 represents 3.43.4 g. The diagram preserves all twelve recorded values, including the two masses recorded as 2.32.3 g.

  3. median=3.4+3.62=3.5 g.\mathrm{median}=\frac{3.4+3.6}{2}=3.5\ \text{g}.
  4. Q1=2.3+2.82=2.55 g,Q3=4.0+4.52=4.25 g.Q_1=\frac{2.3+2.8}{2}=2.55\ \text{g},\qquad Q_3=\frac{4.0+4.5}{2}=4.25\ \text{g}.
  5. IQR=4.25−2.55=1.7 g,range=5.2−2.1=3.1 g.\mathrm{IQR}=4.25-2.55=1.7\ \text{g},\qquad\mathrm{range}=5.2-2.1=3.1\ \text{g}.
  6. A quartile may lie between recorded values. These summaries are exact calculations for the recorded data; recording to the nearest tenth does not reveal the unrounded original masses.

Marking guidance
  • 2 marks: preserve every observation in the correct ordered stem and leaf rows.
  • 1 mark: supply a correct decimal key with grams.
  • 1 mark: obtain the overall median from the middle two values.
  • 1 mark: obtain the lower-half median.
  • 1 mark: obtain the upper-half median.
  • 1 mark: calculate and label the IQR.
  • 1 mark: calculate and label the range.
One extreme record changes while its rank stays last 6 marks

The ordered counts from fifteen days are:

8,10,10,12,14,15,18,20,23,24,25,28,31,33,35.8,10,10,12,14,15,18,20,23,24,25,28,31,33,35.

The final record is corrected from 3535 to 8080. Find the median, IQR and range of the corrected data. Explain on paper why these summaries do not all change.

Use medians of the lower and upper halves for quartiles; exclude the overall median when the number of observations is odd.

Hint

The corrected record remains the greatest value. Identify the positions used for the median and both half medians before recomputing.

Worked solution
  1. There are still fifteen observations. The median is position eight, so it stays 2020. Exclude that observation before splitting.

  2. The lower seven observations have middle value 1212, and the upper seven have middle value 2828. Neither selected observation was changed.

  3. Q1=12,Q3=28,IQR=16.Q_1=12,\qquad Q_3=28,\qquad\mathrm{IQR}=16.
  4. range=80−8=72.\mathrm{range}=80-8=72.
  5. The old range was 35−8=2735-8=27. The range changes because it uses the maximum. The median and quartiles remain unchanged in this particular correction because their selected positions and values are unchanged. Adding or removing records could change those positions, so this is not a rule that every change to extreme data leaves the IQR fixed.

Marking guidance
  • 1 mark: identify the unchanged count and median position.
  • 1 mark: obtain the median.
  • 1 mark: identify both half medians using the stated convention.
  • 1 mark: obtain the IQR.
  • 1 mark: obtain the new range.
  • 1 mark: explain the different effects using the unchanged selected ranks and changed maximum.

Come back to what needs practice

Quick revision sheet (A4)

Your review plan starts after your first check.

Question bank and saved work