4.2 · SLPaper 1Paper 2

Data presentation

In a minute

Raw data is just a list until you organise it. This lesson turns lists into and , reads medians, quartiles and off a graph, and uses to compare data sets.

You'll be able to

  • Put discrete and continuous data into a frequency table, with written as inequalities with no gaps.
  • Draw and read a frequency histogram with equal class widths, and describe its shape.
  • Use a cumulative frequency graph to estimate the median, quartiles, percentiles, range and IQR.
  • Draw and read a box and whisker diagram, with outliers as crosses.
  • Compare two distributions from their box plots, and judge from symmetry whether data may be normal.
Before you start3 quick questions on what this builds on
Check yourself
Which of these is discrete data?
Check yourself
A data set has Q1=12Q_{1} = 12 and Q3=20Q_{3} = 20. Find the upper fence, Q3+1.5×IQRQ_{3} + 1.5 \times \mathrm{IQR}.
Check yourself
The lower fence of a data set is 1818. Is a value of exactly 1818 an outlier?

Revise first: 4.1 Sampling, data quality and outliers

Frequency tables

A list of 2525 numbers is hard to take in. Count how often each value appears, and the pattern shows at once.

For with only a few different values, give each value its own column. Tally the list once, then count the marks.

Worked exampleA café records how many cakes are left unsold at closing time on 2525 days: 2,1,0,3,1,2,4,1,0,2,3,1,5,2,0,1,3,2,1,4,3,0,2,1,32, 1, 0, 3, 1, 2, 4, 1, 0, 2, 3, 1, 5, 2, 0, 1, 3, 2, 1, 4, 3, 0, 2, 1, 3. Present the data in a frequency table.

Try it first, then reveal one step at a time.

  1. The values run from 00 to 55, so the table needs a column for each of 0,1,2,3,4,50, 1, 2, 3, 4, 5.

is different. Measured values are rarely equal, so you group them into classes instead.

Classes must leave no gaps. With classes 2020–2424 and 2525–2929, a time of 24.624.6 has nowhere to go. With 20≤t<2520 \le t < 25 and 25≤t<3025 \le t < 30, every time lands in exactly one class.

A value on a boundary goes in the class whose inequality it satisfies. Here 2525 goes in 25≤t<3025 \le t < 30. Some tables use the form 10<t≤1510 < t \le 15 instead, so read the signs each time.

Worked exampleThe times, in minutes, of 2424 runners in a 55 km fun run are 27.3,31.4,22.6,25.0,35.0,28.8,30.0,24.9,26.1,33.8,37.2,21.8,29.5,32.2,26.7,23.4,34.6,27.9,30.9,38.5,25.6,24.1,31.7,28.227.3, 31.4, 22.6, 25.0, 35.0, 28.8, 30.0, 24.9, 26.1, 33.8, 37.2, 21.8, 29.5, 32.2, 26.7, 23.4, 34.6, 27.9, 30.9, 38.5, 25.6, 24.1, 31.7, 28.2. Present the data in a frequency table with classes 20≤t<2520 \le t < 25, 25≤t<3025 \le t < 30, 30≤t<3530 \le t < 35 and 35≤t<4035 \le t < 40.

Try it first, then reveal one step at a time.

  1. Sort out the boundary values first. 25.025.0 goes in 25≤t<3025 \le t < 30, 30.030.0 in 30≤t<3530 \le t < 35 and 35.035.0 in 35≤t<4035 \le t < 40.
Check yourself
A runner finishes in exactly 35.035.0 minutes. Using the classes in the fun run table, which class does the time belong to?
Check yourself
The masses of 3232 parcels are grouped into the classes 0<m≤20 < m \le 2, 2<m≤42 < m \le 4, 4<m≤64 < m \le 6 and 6<m≤86 < m \le 8 kg. The frequencies are 99, pp, 77 and 44. Find pp.

Histograms

A table gives you numbers. A picture shows where the data bunches up, and whether it trails off to one side.

In this course every class in a histogram has the same width. So a taller bar always means more values.

Worked exampleDraw a frequency histogram for the fun run times. time, t minutesfrequency20≤t<25525≤t<30930≤t<35735≤t<403\begin{array}{c|c} \text{time, } t \text{ minutes} & \text{frequency} \\ \hline 20 \le t < 25 & 5 \\ 25 \le t < 30 & 9 \\ 30 \le t < 35 & 7 \\ 35 \le t < 40 & 3 \end{array}

Try it first, then reveal one step at a time.

  1. Horizontal axis: time, tt minutes, from 2020 to 4040, with a mark at each class boundary.
Frequency histogram of 24 fun run times: bars of height 5, 9, 7 and 3 over the classes 20 to 25, 25 to 30, 30 to 35 and 35 to 40 minutes, touching with no gaps 20 25 30 35 40 0 2 4 6 8 10 Time, t minutes Frequency
The bars touch: 25≤t<3025 \le t < 30 starts exactly where 20≤t<2520 \le t < 25 ends.

Now look at the shape. If the two sides roughly mirror each other, the data is symmetric. If one side trails off in a long tail, the data is .

A long tail to the right is positive skew, and a long tail to the left is negative skew. Symmetric, bell-shaped data may follow the normal distribution of 4.9.

Frequency histogram of 50 waiting times: bars of height 5, 12, 15, 9, 6 and 3 over the classes 0 to 10, 10 to 20, 20 to 30, 30 to 40, 40 to 50 and 50 to 60 minutes 0 10 20 30 40 50 60 0 2 4 6 8 10 12 14 16 Waiting time, w minutes Frequency
Waiting times at a clinic. The tail on the right is longer.
Worked exampleThe histogram shows the waiting times, ww minutes, of 5050 patients at a clinic. The classes are 0≤w<100 \le w < 10, 10≤w<2010 \le w < 20, …\ldots, 50≤w<6050 \le w < 60. (a) Find the number of patients who waited at least 3030 minutes. (b) Describe the shape of the distribution.

Try it first, then reveal one step at a time.

  1. (a) “At least 3030” means the three bars from 3030 to 6060. Read their heights: 99, 66 and 33.
Check yourself
Use the waiting-time histogram. How many patients waited less than 2020 minutes?
Check yourself
A histogram of 3434 quiz scores, out of 5050, has five bars of equal width. From left to right, their heights are 22, 44, 77, 1212 and 99. Which describes the shape?

Cumulative frequency graphs

A takeaway records the delivery times of 200200 orders. How many arrived within 2020 minutes? Add the frequencies of every class up to 2020.

1. Add a cumulative frequency column to the table.

2. Plot each cumulative frequency above the upper boundary of its class. Only there has every value in the class been counted.

3. Plot a first point at the lower boundary of the first class, with cumulative frequency 00.

4. Join the points with a smooth curve or with straight lines. This lesson uses straight lines. A curve gives slightly different readings.

Worked exampleThe delivery times of 200200 orders are shown in the table. time, t minutesfrequency10<t≤152015<t≤204020<t≤258025<t≤304030<t≤3520\begin{array}{c|c} \text{time, } t \text{ minutes} & \text{frequency} \\ \hline 10 < t \le 15 & 20 \\ 15 < t \le 20 & 40 \\ 20 < t \le 25 & 80 \\ 25 < t \le 30 & 40 \\ 30 < t \le 35 & 20 \end{array} Find the cumulative frequencies, and give the points to plot.

Try it first, then reveal one step at a time.

  1. Keep a running total, adding the next class each time.
Cumulative frequency graph of 200 delivery times, with dashed reading lines at 50, 100 and 150 orders meeting the time axis at 18.75, 22.5 and 26.25 minutes 10 15 20 25 30 35 0 40 80 120 160 200 Delivery time, t minutes Cumulative frequency Q1 median Q3
Read across from the cumulative frequency, then down to the time axis.

Now read the graph the other way. Half the data lies below the median. A quarter lies below the lower quartile Q1Q_{1}, and three quarters below the upper quartile Q3Q_{3}. So, with nn values, read across from these heights:

Learn this
median at n2,Q1 at n4,Q3 at 3n4\text{median at } \tfrac{n}{2}, \qquad Q_{1} \text{ at } \tfrac{n}{4}, \qquad Q_{3} \text{ at } \tfrac{3n}{4}

The is the spread of the middle half of the data. It is in the formula booklet.

In the formula booklet
IQR=Q3−Q1\mathrm{IQR} = Q_{3} - Q_{1}

The range is the largest value minus the smallest. Grouped data hides the exact values, so estimate it from where the graph starts and ends: here 35−10=2535 - 10 = 25 minutes.

Worked exampleUse the cumulative frequency graph of the 200200 delivery times. (a) Estimate the median and the interquartile range. (b) The slowest 10%10\% of orders get a refund. Estimate TT, the shortest delivery time that gets one. (c) Estimate NN, the number of orders that took more than 2828 minutes.

Try it first, then reveal one step at a time.

  1. (a) The median is at 2002=100\frac{200}{2} = 100. Read across and down: 22.522.5 minutes. As a check, 100100 is halfway from 6060 to 140140, so the time is halfway from 2020 to 2525.
Check yourself
Use the delivery-times graph to find the 3030th percentile.
Check yourself
Use the delivery-times graph. How many orders took more than 2525 minutes?

Box and whisker diagrams

A box and whisker diagram, or box plot, draws five numbers to scale. It shows where the data starts and ends, and where its middle half sits.

1. Draw a scale, then the box from Q1Q_{1} to Q3Q_{3} with a line at the median.

2. Find the fences Q1−1.5×IQRQ_{1} - 1.5 \times \mathrm{IQR} and Q3+1.5×IQRQ_{3} + 1.5 \times \mathrm{IQR} from 4.1. Any value beyond them is an .

3. Draw each whisker to the most extreme value that is not an outlier, and mark each outlier with a cross.

Box and whisker diagram of fish lengths: whiskers from 14 to 42, box from 22 to 30 with the median at 26, and a cross at 47 for the outlier smallest Q1 median Q3 largest non- outlier outlier 10 15 20 25 30 35 40 45 50 Length, cm
Lengths of fish, in cm. The whisker stops at 4242, the longest fish that is not an outlier.

In the fish diagram, Q1=22Q_{1} = 22 and Q3=30Q_{3} = 30, so IQR=8\mathrm{IQR} = 8 and 1.5×IQR=121.5 \times \mathrm{IQR} = 12. The fences are 22−12=1022 - 12 = 10 and 30+12=4230 + 12 = 42.

No fish is shorter than 1010 cm, so the left whisker reaches the shortest fish, 1414 cm. A 4242 cm fish is not beyond the upper fence, so the right whisker ends there. The 4747 cm fish is beyond it, so it is a cross.

Worked exampleThe number of items in each of 4545 online orders is shown in the table. items1234567812frequency4911863211\begin{array}{c|ccccccccc} \text{items} & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 12 \\ \hline \text{frequency} & 4 & 9 & 11 & 8 & 6 & 3 & 2 & 1 & 1 \end{array} (a) Use your calculator to find Q1Q_1, the median and Q3Q_3. (b) Determine whether any value is an outlier. (c) Draw the box and whisker diagram.

Try it first, then reveal one step at a time.

  1. (a) Enter the items in one list and the frequencies in a second. Run one-variable statistics with the second list as the frequency list.
Box and whisker diagram of items per order: whiskers from 1 to 8, box from 2 to 5 with the median at 3, and a cross at 12 for the outlier 0 1 2 3 4 5 6 7 8 9 10 11 12 13 Number of items in an order
Items per order. The cross at 1212 is an outlier.

Box plots are best for comparing two data sets on one scale. Make two comparisons, each in context: the medians for centre, and the IQRs or ranges for spread. A box plot doesn't show the mean, so don't compare means.

Shape matters too. If the median sits in the middle of the box and the whiskers are about the same length, the data is symmetric, so it may be normally distributed (4.9). A lopsided box or one long whisker means skewed data, which is unlikely to be normal.

Two box and whisker diagrams of test marks on one scale. Class A: 30, 48, 57, 66, 84, symmetric. Class B: 35, 55, 65, 69, 78, with a long left whisker. Neither class has an outlier Class A Class B 30 40 50 60 70 80 90 Test mark
Class A is symmetric. Class B has a long tail of low marks.
Worked exampleTwo classes sat the same test. Class A's five-number summary is 30,48,57,66,8430, 48, 57, 66, 84, and class B's is 35,55,65,69,7835, 55, 65, 69, 78. (a) Find the IQR of each class. (b) Compare the two distributions. (c) State which class's marks may be normally distributed, with a reason.

Try it first, then reveal one step at a time.

  1. (a) IQRA=66−48=18\mathrm{IQR}_{A} = 66 - 48 = 18 and IQRB=69−55=14\mathrm{IQR}_{B} = 69 - 55 = 14.
Check yourself
Scores in a quiz have Q1=40Q_{1} = 40 and Q3=52Q_{3} = 52. The three highest scores are 6666, 7070 and 7171. Where does the upper whisker end?
Check yourself
Each option is a five-number summary: smallest, Q1Q_{1}, median, Q3Q_{3}, largest. Which data set may be normally distributed?

Common mistakes

  • Plotting cumulative frequency at class midpoints. Plot it at each upper class boundary.
  • Reading “more than” straight off a cumulative frequency graph. The graph counts values at or below, so subtract the reading from nn. For the top 10%10\%, read across from 90%90\% of nn.
  • Drawing a whisker out to an outlier, or calling a value equal to a fence an outlier. Whiskers stop at the most extreme value that is not an outlier.
  • Leaving out the frequency list when entering a frequency table on the GDC. Each value then counts once, and the quartiles are wrong.
  • Comparing means from box plots. A box plot shows medians and quartiles, so compare those, in context.

Exam tips

  • Use the graph to estimate: write down the height you read across from, such as n2\frac{n}{2} for the median, and draw the reading lines. That earns the method mark.
  • Draw a histogram or box plot: label the axes, use an even scale and plot accurately. Mark outliers with crosses.
  • Compare two distributions: one sentence on the medians and one on the IQRs, each with numbers and in context.

Key takeaways

Learn thismedian at n2,Q1 at n4,Q3 at 3n4\text{median at } \tfrac{n}{2}, \qquad Q_{1} \text{ at } \tfrac{n}{4}, \qquad Q_{3} \text{ at } \tfrac{3n}{4}
In bookletIQR=Q3−Q1\mathrm{IQR} = Q_{3} - Q_{1}
Learn thisClass intervals are inequalities with no gaps, such as 20≤t<2520 \le t < 25 and 25≤t<3025 \le t < 30. A boundary value goes in the class whose inequality it satisfies.
Learn thisIn a histogram with equal class widths, bar height is frequency and the bars touch.
Learn thisPlot cumulative frequency at each upper class boundary, starting from 00 at the first lower boundary. It counts values at or below, so for “more than” subtract from nn.
Learn thismedian at n2,Q1 at n4,Q3 at 3n4,kth percentile at k100×n\text{median at } \tfrac{n}{2}, \qquad Q_{1} \text{ at } \tfrac{n}{4}, \qquad Q_{3} \text{ at } \tfrac{3n}{4}, \qquad k\text{th percentile at } \tfrac{k}{100} \times n
Learn thisBox plot: box from Q1Q_{1} to Q3Q_{3}, line at the median, whiskers to the most extreme values that are not outliers, a cross for each outlier.
Learn thisCompare medians for centre and IQRs for spread, in context. A symmetric box and whiskers means the data may be normal.

Practise this

3 past-paper questions on 4.2 in the AA HL bank, each with a mark scheme and a worked explanation.

Practise 4.2 →