Ordered data: stem-and-leaf diagrams and box plots
Fifteen strips are measured in millimetres. As a list the numbers say little; put them in order and the smallest, the largest and the middle appear at once. Call this ordered record A: every display in this unit starts from it: 3, 5, 5, 6, 7, 8, 8, 9, 10, 10, 11, 12, 13, 15, 16 mm.
1Choose a display for the question
- 1Continuous data are measured, such as length. These lengths are recorded as whole numbers, but length is still continuous.
- 2Discrete data are counted, such as the number of strips.
- 3Categorical data are labels, such as the material of a strip.
| Need to see | Display | Keeps or hides |
|---|---|---|
| Every recorded value | Stem-and-leaf | Keeps each value, repeats and order. |
| How counts spread across length classes | Histogram | Shows the shape by bar area; values inside a class are lost. |
| A percentile, or a count below a length | Cumulative-frequency curve | Running counts; read-offs are estimates. |
| Centre and spread of two records | Box plots on one scale | Five numbers each; hides modes and single values. |
2Build a back-to-back stem-and-leaf diagram
Read the diagram: what do 6 | 1 on the A side and 1 | 2 on the B side mean, and how many leaves does each side have?
- Read A leftwards: stem then leaf6 | 1 means 16 mm
- Read B rightwards the same way1 | 2 means 12 mm
- Count the leaves on each sideleft side: 8 + 7=15right side: 5 + 4=9
- Answerevery value is kept: 15 in A, 9 in B
3Find five numbers, then draw the box plot
Find the five-number summary of A.
- Smallest and largest3 mm and 16 mm
- Median: position (15 + 1)/2 = 88th value=9 mm
- Q₁: middle of positions 1–74th value=6 mm
- Q₃: middle of positions 9–1512th value=12 mm
- Answer3, 6, 9, 12, 16 mm
4Try it
1 In a back-to-back diagram the key is 4 | 1 | 2: 14 on the left, 12 on the right. What does 7 | 2 | 3 mean?
2 Find the median and quartiles of 4, 7, 7, 9, 12, 13, 15, 18, 21, 22, 25.
3 Which display lets you read off the 90th percentile of 200 grouped journey times?
- 127 on the left, 23 on the right
- 2median = 6th value = 13; Q₁ = 3rd value = 7; Q₃ = 9th value = 21
- 3a cumulative-frequency curve
Histograms: the area of a bar is its count
A histogram groups the values into classes and draws one bar for each. When the classes have different widths, a tall thin bar and a short wide bar can hold the same number of values, so the count is the area of a bar, not its height.
1Find each bar’s height from frequency density
| Length / mm | Count | Width | Density |
|---|---|---|---|
| 0 ≤ x < 6 | 3 | 6 | |
| 6 ≤ x < 10 | 5 | 4 | |
| 10 ≤ x < 18 | 7 | 8 |
Find the bar heights for A grouped into [0, 6), [6, 10) and [10, 18) mm.
- Count each class from the record3, 5 and 7 strips
- Divide each count by its width3 ÷ 6=0.55 ÷ 4=1.257 ÷ 8=0.875
- Answerheights 0.5, 1.25 and 0.875 strips per mm
2Use true boundaries and find the modal class
3Recover counts when the axis has no numbers
The first bar (width 6, height 4) stands for 3 strips. Find the count in the last bar (width 8, height 7) and the width of the middle bar (height 10, count 5).
- Area of the first bar6 × 4=24 units
- Strips per unit of area=
- Last bar: k × width × height1/8 × 8 × 7=7 strips
- Middle bar: solve for the width5=1/8 × 10 × ww=4, so it runs from 6 to 10 mm
- Answer7 strips; width 4 mm
4Estimate the count in part of a bar
5Try it
1 Classes 0 ≤ t < 5, 5 ≤ t < 15 and 15 ≤ t < 20 have frequencies 10, 30 and 5. Find the frequency densities and the modal class.
2 A bar of width 4 and height 6 stands for 12 values. How many does a bar of width 10 and height 3 stand for?
3 Estimate how many of the 30 values in 5 ≤ t < 15 lie in 5 ≤ t < 9.
- 110 ÷ 5 = 2, 30 ÷ 10 = 3, 5 ÷ 5 = 1; modal class 5 ≤ t < 15
- 2k = 12 ÷ 24 = 1/2, so 1/2 × 10 × 3 = 15
- 34/10 of the class: 30 × 0.4 = 12
Cumulative frequency: build the curve, then read it
How many strips are shorter than 8 mm? A cumulative frequency answers questions like that: it counts every value up to a point. Plot it against length and one smooth curve gives counts, the median and the quartiles straight off the graph.
1Build the curve from running totals
Find the points to plot for A’s classes [0, 6), [6, 10) and [10, 18) mm, with counts 3, 5 and 7.
- Start at the lowest boundary(0, 0)
- Add each class; plot at its upper boundary(6, 3)(10, 3 + 5)=(10, 8)(18, 8 + 7)=(18, 15)
- Join with a smooth rising curveit ends at 15, the size of the record
- Answer(0, 0), (6, 3), (10, 8), (18, 15)
2Read the median, quartiles and percentiles
| Read | Count | Length / mm |
|---|---|---|
| Q₁ | 3.75 | 6.8 |
| Median | 7.5 | 9.6 |
| Q₃ | 11.25 | 13.5 |
| 60th percentile | 9 | 11.0 |
Which class holds the 60th percentile of A, and what does the curve give?
- Find its position0.60 × 15=9
- Find the running totals either side8 at 10 mm and 15 at 18 mm: 8 < 9 ≤ 15
- Answerclass 10 ≤ x < 18 mm; the curve gives about 11.0 mm
3Count values above, below or between two lengths
What proportion of A is at least 8 mm?
- Up from 8 mm to the curve, across to the countcount below 8 ≈ 5.3
- Answer(15 − 5.3)/15 ≈ 0.65Take it from 15, then divide by 15.
What proportion lies from 8 mm up to 14 mm?
- Read both linescounts below 14 and 8: 11.7, 5.3
- Answer(11.7 − 5.3)/15 ≈ 0.43A difference of counts.
4Try it
1 Classes with upper boundaries 10, 20, 30 and 40 s have frequencies 6, 14, 12 and 8. Write the points to plot.
2 At which count do you read the median and Q₃ of these 40 values, and which class holds Q₃?
3 How many of the 40 values are at least 30 s, and what proportion is that?
- 1(0, 0), (10, 6), (20, 20), (30, 32), (40, 40)
- 2median at 20, Q₃ at 30; 20 < 30 ≤ 32, so Q₃ is in 20 ≤ t < 30
- 340 − 32 = 8, proportion 8/40 = 0.2
Averages: exact from the record, estimated from groups
One number to stand for a whole record is an average. The mean shares the total out equally, the median is the middle value in order, and the mode is the value that occurs most often. They answer different questions, so they need not agree.
1Find all three averages from the record
Find the mean, median and modes of A.
- Add all 15 values, repeats included= 9.2 mm
- Median: position (15 + 1)/2 = 88th value=9 mm
- Mode: the values that occur most5, 8 and 10 mm, twice each
- Answermean 9.2 mm, median 9 mm, modes 5, 8 and 10 mm
2In a frequency table, frequencies weight the total
3See what one extreme value does
Find the mean and median of A*.
- Take out the old value, put in the new one138 − 16 + 46=168 mm
- Divide by the same n168 ÷ 15=11.2 mm
- The 8th value in order is unchangedmedian=9 mm
- Answermean 9.2 → 11.2 mm; median stays 9 mm
4Grouped data: estimate the mean from midpoints
| Class / mm | m | f | fm |
|---|---|---|---|
| 0 ≤ x < 6 | 3 | 3 | 9 |
| 6 ≤ x < 10 | 8 | 5 | 40 |
| 10 ≤ x < 18 | 14 | 7 | 98 |
| Total | 15 | 147 |
Estimate the mean of A from its three classes.
- Midpoints3, 8 and 14 mm
- Multiply by the counts and add3 × 3 + 5 × 8 + 7 × 14=147
- Divide by Σf147 ÷ 15=9.8
- Answerestimated mean 9.8 mm
5Try it
1 Find the mean, median and mode of 2, 4, 4, 5, 10.
2 Values 1, 2 and 3 occur 4, 5 and 1 times. Find the mean.
3 Classes 0 ≤ x < 10 and 10 ≤ x < 30 have frequencies 4 and 6. Estimate the mean.
- 1mean 25 ÷ 5 = 5, median 4, mode 4
- 2Σfx = 4 + 10 + 3 = 17, Σf = 10: mean 1.7
- 3midpoints 5 and 20: (4 × 5 + 6 × 20) ÷ 10 = 14
Measuring spread and comparing two records
Two records can share a centre and still look very different: one bunched, one spread out. A measure of spread puts a number on that. Pair each one with a centre: the median with the IQR, the mean with the standard deviation.
1Find the range and the interquartile range
Find the range and IQR of A.
- Range: largest minus smallest16 − 3=13 mm
- Answer12 − 6 = 6 mmIQR: Q₃ minus Q₁.
| Record | Median | Range | IQR |
|---|---|---|---|
| A | 9 | 13 | 6 |
| A*: 16 → 46 | 9 | 43 | 6 |
2Find variance and standard deviation from the totals
A has n = 15, Σx = 138 and Σx² = 1468. Find its variance and standard deviation.
- Mean of the squares minus the square of the mean
- Simplify≈ 13.2 mm²
- Take the square rootσ ≈ 3.64 mm
- Answervariance 992/75 mm², standard deviation ≈ 3.64 mm
3Grouped data: square each midpoint, then weight it
| Midpoint m | f | fm² |
|---|---|---|
| 3 | 3 | 27 |
| 8 | 5 | 320 |
| 14 | 7 | 1372 |
| Total | 15 | 1719 |
4Compare A with B: one centre, one spread
| Measure / mm | A: 15 strips | B: 9 strips |
|---|---|---|
| Median | 9 | 9 |
| Q₁ and Q₃ | 6, 12 | 7, 10.5 |
| IQR | 6 | 3.5 |
| Range | 13 | 7 |
| Standard deviation | 3.64 | 2.10 |
Compare the lengths of the strips in A and B.
- Centreboth medians are 9 mm
- SpreadIQR 3.5 mm for B, 6 mm for ASD 2.10 mm for B, 3.64 mm for A
- Answertypical lengths are the same; B’s lengths are more consistent
5Try it
1 Find the range of 2, 4, 4, 5, 10.
2 For the same values Σx = 25 and Σx² = 161. Find the variance and standard deviation.
3 Two machines’ times have medians 12 s and 15 s, and IQRs 6 s and 3 s. Write one comparison of centre and one of spread.
- 110 − 2 = 8
- 2161/5 − 5² = 7.2, SD ≈ 2.68
- 3the second machine’s times are typically longer (15 s against 12 s) and more consistent (IQR 3 s against 6 s)
Coding and combining records
Awkward numbers are easier after a code, such as y = (x − 8)/2: shift every value, then rescale. Work with the small numbers, then undo the code. Totals help again when two records are joined: counts, Σx and Σx² simply add.
1Code every value
With y = (x − 8)/2, record A gives Σy = 9 and Σy² = 55. Find the mean and variance of y.
- Mean of y= 0.6
- Variance of y: same formula=
- Answerȳ = 0.6, variance of y = 248/75
2Undo the code
Use ȳ = 0.6 and the variance 248/75 to find the mean, variance and SD of x.
- Mean: apply the rule to ȳx̄=2 × 0.6 + 8 = 9.2 mm
- Variance: multiply by 2²4 × 248/75=992/75 mm²
- SD: multiply by 22 × √(248/75) ≈ 3.64 mm
- Answerx̄ = 9.2 mm, variance 992/75 mm², SD ≈ 3.64 mm
3Combine two records from their totals
| Record | n | Σx | Σx² |
|---|---|---|---|
| A | 15 | 138 | 1468 |
| B | 9 | 79 | 733 |
| A and B | 24 | 217 | 2201 |
Find the mean and SD of A and B together.
- Mean≈ 9.04 mm
- Variance=
- Square rootσ ≈ 3.16 mm
- Answermean ≈ 9.04 mm, SD ≈ 3.16 mm
4Work back to a missing group or a replaced value
A’s 3 mm strip is replaced by a strip of length r mm. The mean becomes 10.2 mm. Find r and the new Σx².
- New total from the new mean15 × 10.2=153 mm
- Swap the values138 − 3 + r=153, so r = 18
- Swap the squares too1468 − 3² + 18²=1783
- Answerr = 18 mm; new Σx² = 1783 mm²
5Try it
1 Ten values are coded y = x − 50, giving Σy = 30 and Σy² = 290. Find the mean and variance of x.
2 With y = (x − 100)/5, ȳ = 2 and the variance of y is 3. Find the mean and variance of x.
3 Group P has 10 values with mean 6; group Q has 30 values with mean 10. Find the combined mean.
- 1ȳ = 3, so x̄ = 53; variance of y = 29 − 9 = 20, and a shift leaves it at 20
- 2x = 5y + 100: x̄ = 110, variance 25 × 3 = 75
- 3(60 + 300) ÷ 40 = 9