Educerie

Educerie · IB Diploma · Mathematics: analysis and approaches

IB Mathematics AA 4.2 · SL and HL

Presenting data

A list of eighty numbers tells you almost nothing at a glance, so which pictures of it show the centre, the spread and the shape, and how do you read values back off them?

What you will learn

  • Know how to organise discrete and continuous data in frequency tables and equal-width histograms
  • Understand how a cumulative frequency graph is built and how medians, quartiles and percentiles are read from it
  • Know how to draw and read a box-and-whisker diagram, with outliers marked separately
  • Understand how box plots show centre, spread and symmetry, and when data may be normal

You must be able to

  1. Draw a box-and-whisker diagram from data, marking any outlier with a cross
  2. Estimate the median, quartiles and percentiles from a cumulative frequency graph
  3. Compare two distributions from box plots on centre and spread, with values and context
  4. Draw a cumulative frequency graph and use it to count values above or below a point
  5. Draw a frequency histogram with equal class widths and write down the modal class
  6. Explain from a box plot whether data could be normally distributed

In the exam. both papers. Paper 1 gives a table or graph: complete a cumulative frequency column, read a median or quartile off a printed graph, or draw a box plot from five values (2 to 6 marks). Paper 2 adds a GDC and comparisons (2 to 4 marks). Box plots also open questions that go on to the normal distribution (4.9).

1Frequency tables

Discrete data get one column per value.

Example (invented): thirty students said how many books they read last month.

Books read, xx012345
Frequency, ff379632
  • The frequencies add to 30. Check that first in any table.
  • Figure 1 draws it. The bars are separate, with gaps, because 2.5 books is not a possible answer.
Figure 1 · Books read last month by 30 students 0 1 2 3 4 5 Number of books read 0 2 4 6 8 10 Frequency 3 7 9 6 3 2 Discrete data: one bar per value, with gaps, because nothing lies between 2 books and 3.
Figure 1 · Books read last month by 30 students

Continuous data are grouped into class intervals. They are given as inequalities without gaps, so every value has exactly one class.

Example (invented): eighty park-run times.

Time tt (minutes)Frequency
15≤t<2015 \le t < 204
20≤t<2520 \le t < 2511
25≤t<3025 \le t < 3022
30≤t<3530 \le t < 3519
35≤t<4035 \le t < 4013
40≤t<4540 \le t < 457
45≤t<5045 \le t < 504
  • A time of exactly 25.00 minutes goes in 25≤t<3025 \le t < 30, because the class below stops at "<25< 25".
  • The class width is 5 minutes.
  • The third class has lower and upper boundaries 25 and 30.
  • If a paper writes 25<t≤3025 < t \le 30, exactly 25.00 drops to the class below. Check which end carries the "≤\le".
  • Once grouped, a time is known only by its class. Everything read from grouped data is an estimate.

Discrete data can have a cumulative column too.

For the book table the running totals are 3, 10, 19, 25, 28, 30. They count students who read that many books or fewer.

  • The median of 30 values lies between the 15th and 16th. Values 11 to 19 are all 2, so the median is 2.
  • The 8th value is the middle of the lower half (block 4 to 10), so Q1=1Q_{1} = 1.
  • The 23rd is the middle of the upper half (block 20 to 25), so Q3=3Q_{3} = 3.

Find the position, then see which running total it falls under. No graph needed.

Example (invented): exam tables often hide one entry and give the total. Forty patients' waits at a clinic, third frequency unknown:

Wait tt (minutes)0≤t<100 \le t < 1010≤t<2010 \le t < 2020≤t<3020 \le t < 3030≤t<4030 \le t < 4040≤t<5040 \le t < 50
Frequency512aa94
Cumulative frequency517273640
Cumulative percentage12.5%42.5%67.5%90%100%
  • The frequencies add to 40, so 5+12+a+9+4=405 + 12 + a + 9 + 4 = 40 and a=10a = 10.
  • A cumulative percentage is the running total as a percentage of nn. It gives percentiles at class boundaries straight off the table.
    • Example: 90% waited less than 40 minutes, so 40 minutes is the 90th percentile.
  • The median is about the 402=20\frac{40}{2} = 20th value. 17<20≤2717 < 20 \le 27 puts it in 20≤t<3020 \le t < 30.

2Histograms

  • In a frequency histogram each class is a bar spanning the class, as tall as its frequency. The data are continuous, so the bars touch. Nothing separates 24.99 minutes from 25.00.
  • Figure 2 is the histogram of the park-run times.
Figure 2 · Frequency histogram of 80 park-run times 15 20 25 30 35 40 45 50 Time t (minutes) 0 4 8 12 16 20 24 28 Frequency 4 11 22 19 13 7 4 modal class 25 ≤ t < 30 Continuous data, equal class widths of 5 minutes: bars touch, and height is frequency.
Figure 2 · Frequency histogram of 80 park-run times
  • Read it for shape. The times pile up in 25≤t<3025 \le t < 30, the modal class: the class with the highest frequency. Give the class, not its midpoint 27.5.

The times trail further right than left, because a few runners walked it.

  • A longer right tail is positive skew.
  • A longer left tail is negative skew.
  • A rough mirror image about the peak is symmetric.

A histogram with one clear peak is unimodal. Two separate peaks (bimodal) often mean two groups were mixed in one sample, such as the shoe sizes of a primary class and their parents.

A histogram you draw needs:

  • frequency up the vertical axis, with a scale
  • the variable and units along the horizontal
  • bars from boundary to boundary, equal widths, no gaps, ruled edges

3Cumulative frequency

  • Cumulative frequency = a running total of the frequencies. For each class it is the number of data items less than its upper boundary. For continuous data, that is the number up to that boundary.
    • That is why the rows below are headed t<20t < 20, t<25t < 25 and so on.
Time tt (minutes)FrequencyCumulative frequency
t<20t < 2044
t<25t < 251115
t<30t < 302237
t<35t < 351956
t<40t < 401369
t<45t < 45776
t<50t < 50480
  • The last entry must be the total, 80.
  • Each running total belongs to an upper boundary. By 20 minutes 4 runners had finished, by 25 minutes 15. So the cumulative frequency graph plots (20,4)(20, 4), (25,15)(25, 15), (30,37)(30, 37) and so on. It starts at (15,0)(15, 0), because no one finished in under 15 minutes.
  • IB papers usually draw a smooth curve. Figures 3 and 4 use straight segments, so expect small differences from the readings below.
  • A running total never goes down. A dip in the graph is an error.

Plot cumulative frequency at the upper class boundary, and start the graph at the lower boundary of the first class with frequency 0.

Figure 3 · Cumulative frequency: median and quartiles 15 20 25 30 35 40 45 50 Time t (minutes) 0 10 20 30 40 50 60 70 80 Cumulative frequency 20 Q₁ ≈ 26.1 40 median ≈ 30.8 60 Q₃ ≈ 36.5 Go across from n/4, n/2 and 3n/4, then down. Q₁ ≈ 26.1, median ≈ 30.8, Q₃ ≈ 36.5 minutes.
Figure 3 · Cumulative frequency: median and quartiles

4Reading median, quartiles and percentiles

Go across from the cumulative frequency you want, then down to the axis.

  • The median is the middle value: go across from n2\dfrac{n}{2}.
  • The lower quartile Q1Q_{1} has a quarter of the data below it: go across from n4\dfrac{n}{4}.
  • The upper quartile Q3Q_{3} has three quarters below it: go across from 3n4\dfrac{3n}{4}.
  • The kkth percentile has k%k\% of the data below it: go across from k100×n\dfrac{k}{100} \times n. The median is the 50th percentile, Q1Q_{1} the 25th and Q3Q_{3} the 75th.

For the 80 runners (Figure 3):

median: across from 802=40→t≈30.8 minutes\text{median: across from } \frac{80}{2} = 40 \to t \approx 30.8 \ \text{minutes}Q1: across from 804=20→t≈26.1 minutesQ_{1}\text{: across from } \frac{80}{4} = 20 \to t \approx 26.1 \ \text{minutes}Q3: across from 3×804=60→t≈36.5 minutesQ_{3}\text{: across from } \frac{3 \times 80}{4} = 60 \to t \approx 36.5 \ \text{minutes}IQR=Q3−Q1≈36.5−26.1=10.4 minutes\mathrm{IQR} = Q_{3} - Q_{1} \approx 36.5 - 26.1 = 10.4 \ \text{minutes}
  • On a graph use n2\frac{n}{2}, not n+12\frac{n+1}{2}. The graph is not accurate enough for the difference to matter. Give readings to the accuracy the scale allows.
  • Without a graph, given only the table and asked to estimate, do the straight-line reading by arithmetic. Find the class holding the target position. Then go into it by the fraction of its frequency still needed.
    • Example: for the clinic, 17 values come before 20≤t<3020 \le t < 30, which holds 10. The median is the 20th:
median≈20+20−1710×10=23 minutes\text{median} \approx 20 + \frac{20 - 17}{10} \times 10 = 23 \ \text{minutes}
  • For the park run, the 40th value lies in 30≤t<3530 \le t < 35: 30+40−3719×5≈30.830 + \frac{40 - 37}{19} \times 5 \approx 30.8, the graph's reading. It assumes the values are spread evenly through the class, so it is an estimate.
  • The range from a grouped table is only a bound. The graph runs from 15 to 50, so the range is at most 50−15=3550 - 15 = 35 minutes.
    • The true extremes might be 16.2 and 48.9. Say "at most".
  • The graph also answers counting questions (Figure 4).
Figure 4 · Reading a percentile and a count 15 20 25 30 35 40 45 50 Time t (minutes) 0 10 20 30 40 50 60 70 80 Cumulative frequency 72 = 90% of 80 ≈ 42.1 ≈ 64 38 16 slower 90th percentile: across from 72, about 42.1 min. Slower than 38 min: 80 − 64 = 16 runners.
Figure 4 · Reading a percentile and a count
90th percentile: across from 0.9×80=72→t≈42.1 minutes\text{90th percentile: across from } 0.9 \times 80 = 72 \to t \approx 42.1 \ \text{minutes}runners taking more than 38 minutes:\text{runners taking more than 38 minutes:}up from t=38→cumulative frequency≈6464 took 38 minutes or less\text{up from } t = 38 \to \text{cumulative frequency} \approx 64 \qquad \textcolor{#838c91}{\text{64 took 38 minutes or less}}80−64=16 runners80 - 64 = 16 \ \text{runners}

The trap is stopping at 64. The graph counts values below a point, so "more than" needs the subtraction from the total.

Other wordings, same 80 runners:

  • "At least 38 minutes". Same as "more than" for continuous data: 80−64=1680 - 64 = 16.
  • "Between 30 and 40 minutes". Read both values and subtract. The table gives them exactly, because 30 and 40 are class boundaries: 69−37=3269 - 37 = 32 runners.
  • "The slowest 10%". 90% finished before kk, so kk is the 90th percentile, about 42.1 minutes. Always turn the wording into "how many are below", then read.
  • Scaling up. 16 of 80 is 20%. If the 80 were a random sample of a club of 300, about 0.2×300=600.2 \times 300 = 60 members would be that slow.

5Quartiles of a list and the five-number summary

Order a plain list first. The median cuts it into two halves.

  • Q1Q_{1} is the median of the lower half.
  • Q3Q_{3} is the median of the upper half.
  • With nn odd, the median itself joins neither half.

The five-number summary is the minimum, Q1Q_{1}, the median, Q3Q_{3} and the maximum. The range is maximum minus minimum.

Example (invented): twelve courier deliveries took these minutes, in order:

23, 25, 26, 28, 28, 31, 33, 34, 37, 40, 41, 58.

n=12 (even): median=31+332=32n = 12 \ \text{(even)}: \ \text{median} = \frac{31 + 33}{2} = 32Q1=median of 23,25,26,28,28,31=26+282=27Q_{1} = \text{median of } 23, 25, 26, 28, 28, 31 = \frac{26 + 28}{2} = 27Q3=median of 33,34,37,40,41,58=37+402=38.5Q_{3} = \text{median of } 33, 34, 37, 40, 41, 58 = \frac{37 + 40}{2} = 38.5IQR=38.5−27=11.5\mathrm{IQR} = 38.5 - 27 = 11.5
  • The 58 is an outlier. The upper fence is 38.5+1.5×11.5=55.7538.5 + 1.5 \times 11.5 = 55.75 (section 6).
  • On Paper 2 a GDC finds the five numbers from a list or a frequency table. It can also draw the box plot. Pick the plot that marks outliers separately, or the whisker reaches them.
  • Other quartile methods exist, so a GDC and a hand method can differ slightly (4.3). On Paper 1 you halve by hand.

6Box-and-whisker diagrams

A box-and-whisker diagram (box plot) puts the summary on a scale.

  • The box runs from Q1Q_{1} to Q3Q_{3}, split by a line at the median.
  • A whisker leaves each end and stops at the most extreme value that is not an outlier.
  • Each outlier gets its own cross.

An outlier = a value less than Q1−1.5×IQRQ_{1} - 1.5 \times \mathrm{IQR} or greater than Q3+1.5×IQRQ_{3} + 1.5 \times \mathrm{IQR}. The two limits are called fences. A value exactly on a fence is not an outlier.

Keeping an outlier is a judgement about context:

  • A school bag logged at 65 kg among bags of 4 to 9 kg is a typing slip for 6.5. It is corrected or removed.
  • A commuter whose trip really takes 95 minutes, because she lives in the next town, is genuine. She stays, since deleting her would change what the data say.

Example (invented): nineteen apples from one orchard, masses in grams, in order:

142, 148, 151, 153, 155, 156, 158, 160, 161, 163, 164, 166, 168, 170, 171, 174, 177, 181, 212

n=19, so the median is the 10th value: 163n = 19, \ \text{so the median is the 10th value: } 163Q1=median of the lower 9 values=1555th valueQ_{1} = \text{median of the lower 9 values} = 155 \qquad \textcolor{#838c91}{\text{5th value}}Q3=median of the upper 9 values=17115th valueQ_{3} = \text{median of the upper 9 values} = 171 \qquad \textcolor{#838c91}{\text{15th value}}IQR=171−155=16, and 1.5×16=24\mathrm{IQR} = 171 - 155 = 16, \ \text{and}\ 1.5 \times 16 = 24fences: 155−24=131 and 171+24=195\text{fences: } 155 - 24 = 131 \ \text{and}\ 171 + 24 = 195212>195, so 212 is an outlier; nothing is below 131212 > 195, \ \text{so 212 is an outlier; nothing is below 131}
  • So the left whisker runs to the minimum, 142. The right one stops at 181, the largest value inside the fences. 212 gets a cross (Figure 5).
Figure 5 · Box-and-whisker diagram of 19 apple masses 140 150 160 170 180 190 200 210 220 Mass (grams) minimum 142 Q₁ = 155 median 163 Q₃ = 171 whisker end 181 212: outlier IQR = 16 Fences: 155 − 24 = 131 and 171 + 24 = 195. The whisker stops at 181, the largest value inside them.
Figure 5 · Box-and-whisker diagram of 19 apple masses
  • To draw one, add a labelled scale with units, then the box and median line, the whiskers, the crosses. Without a scale it shows nothing.
  • The four parts hold equal counts. About 25% of the data lies from the minimum to Q1Q_{1}, 25% in each half of the box, and 25% from Q3Q_{3} to the maximum (outliers included).
  • Length shows spread, not number. A long whisker holds no more values than a short one, only more widely spaced.
    • Example: for a box plot of 360 values, about 90 lie between Q3Q_{3} and the maximum and about 180 inside the box.
  • Example: working backwards. A box plot has IQR=12\mathrm{IQR} = 12, its right whisker ends at 90, and there are no outliers.
    • Nothing lies above Q3+18Q_{3} + 18, so Q3+18≥90Q_{3} + 18 \ge 90. Then Q3≥72Q_{3} \ge 72, and Q1≥60Q_{1} \ge 60.
    • The other way: if Q3=72Q_{3} = 72 and IQR=12\mathrm{IQR} = 12, the largest non-outlier is exactly 90 (the fence), not 89.

7Comparing two distributions

  • To compare, draw box plots on the same scale, one above the other.
    • Example: Orchard B's apples have minimum 138, Q1Q_{1} 150, median 157, Q3Q_{3} 162 and maximum 175, with no outliers. Figure 6 draws both orchards.
Figure 6 · Apple masses from two orchards 140 150 160 170 180 190 200 210 220 Mass (grams) Orchard A Orchard B A's median is higher, so its apples are typically heavier; B's smaller IQR means more consistent masses.
Figure 6 · Apple masses from two orchards

A full comparison makes two points, each with numbers and in context:

  • Centre. Orchard A's median (163 g163\ \mathrm{g}) is higher than Orchard B's (157 g157\ \mathrm{g}), so A's apples are typically heavier.
  • Spread. Orchard B's IQR (162−150=12 g162 - 150 = 12\ \mathrm{g}) is smaller than A's (171−155=16 g171 - 155 = 16\ \mathrm{g}). The middle half of B's apples are more consistent. The ranges (37 g37\ \mathrm{g} against 70 g70\ \mathrm{g}) agree, but one outlier inflates A's. Quote the IQR.

Comparing only the medians is not enough.

A third point can be symmetry. Both medians sit near the centre of their boxes, so neither middle half is strongly skewed.

Proportions from the quarters also work. About 75% of B's apples weigh less than 162 g (B's Q3Q_{3}), but fewer than half of A's do, since A's median is 163 g.

Keep the claims modest. A box plot of a small sample is evidence, not proof, and cannot show cause. Never write that one orchard "is" better or that a difference "proves" anything.

"A is bigger than B" is not a comparison.

"A has a higher median, 163 g163\ \mathrm{g} against 157 g157\ \mathrm{g}, so A's apples are typically heavier" is.

8Shape, and whether the data could be normal

Where the median sits in the box and how long the whiskers are give the shape (Figure 7).

Figure 7 · The shape of a distribution in both diagrams Symmetric: could be normal Positively skewed Negatively skewed A long tail on one side stretches that whisker and pushes the median away from it inside the box.
Figure 7 · The shape of a distribution in both diagrams
  • Symmetric. The median is near the middle of the box. The two whiskers are about equal in length.
  • Positively skewed. The right whisker is longer. The median sits nearer the left of the box, because the values above the median are spread over a wider range.
  • Negatively skewed. The mirror image.

Skew also places the mean. A few large values pull it above the median in a positively skewed set, and below it in a negatively skewed one.

A box plot shows no mean. If asked why the mean "appears" greater than the median, the reason is the shape. The median is nearer Q1Q_{1}, or the upper data are more spread out.

The normal distribution (4.9) is symmetric and bell-shaped. The guide asks you to judge from a box plot whether data may be normal. The test is symmetry: median near the centre of the box, whiskers roughly equal.

A clearly skewed plot counts against it. A symmetric one only makes it plausible, since many non-normal distributions are symmetric too. Say "may be", not "is".

Practice questions

65 questions on this note, from easy to hard. Each one you get right lights a star of this topic's constellation.