Graphical representations of data
A well-chosen graph shows at a glance how the data are spread out: where they cluster, whether they are symmetric and whether there are unusual values. Each type of data calls for its own graph, and in the IB exam you have to draw them, read them and get the median and quartiles from the cumulative frequency curve.
Choosing the graph according to the type of data
The general rule: the type of variable decides the representation.
| Data | Usual graph |
|---|---|
| Qualitative or discrete with few values | Bar chart, pie chart |
| Continuous or grouped into intervals | Histogram |
| You want to read the median and quartiles | Cumulative frequencies, box-and-whisker diagram |
Bar charts and pie charts
The pie chart is convenient for comparing parts with the whole, but it is no use if there are many categories or if what matters is the order of the values.
Histogram
If all the classes have the same width, the area is proportional to the height and it is enough to draw the frequency as the height. But if the widths are different, you have to correct, or the graph misleads: a very wide class would look enormous just because it covers more values.
In the figure, the classes have widths 10, 10, 20 and 20 years. The class from 20 to 40 years brings together 40 people, and its bar has height and area .
Cumulative frequencies
The cumulative frequency of a value is the number of data less than or equal to it. For grouped data it is calculated at the upper boundary of each class: it is the number of data that lie below that boundary.
It is the graph that answers questions such as "how many data are there below a given value?", and also the reverse: "below which value does a given amount of data lie?".
Median and quartiles on the cumulative curve
The quartiles divide the ordered data into four groups with the same number of values: leaves a quarter below it, (the median) half, and three quarters.
Interpolation is equivalent to assuming that within each class the data are spread uniformly. That is why the result is an estimate: with grouped data the real values are not known.
The interquartile range is and measures how far the central half of the data extends.
Box-and-whisker diagram
The box contains the central 50% of the data and each whisker roughly the outer 25%. A box with an off-centre median or a whisker much longer than the other indicates skewness.
Outliers
In the figure there is an example with twelve values: 2, 4, 5, 6, 6, 7, 8, 9, 10, 11, 13 and 24. With , and we get , so the upper fence is . The 24 exceeds it and is drawn separately; the right whisker reaches 13. The lower fence, , is not exceeded by any datum.
Worked examples
Angles of a pie chart
At a school, 60 students are asked how they get to school. The answers are: 24 by bus, 9 by bicycle, 15 on foot and 12 by car.
a) Calculate the angle of the sector for each mode of transport, in the order given.
b) Find the percentage of students who walk to school.
Solution
a) The angle is degrees:
- Bus: .
- Bicycle: .
- On foot: .
- Car: .
Check: .
b) , that is, (it is also seen in the graph: is a quarter of a turn).
Histogram with classes of different widths
The waiting time, in minutes, of 80 patients at a health centre is recorded:
| Waiting time (min) | ||||
|---|---|---|---|---|
| Number of patients | 12 | 18 | 30 | 20 |
a) Find the height of each rectangle of a histogram in which the area is proportional to the frequency (height = patients per minute), in the order of the table.
b) Find the proportion of patients who waited less than 20 minutes.
c) Find the proportion of patients who waited 10 minutes or more.
Solution
a) The widths are , , and minutes. Height :
That is, ; ; and . If the frequency were drawn directly as the height, the class from 10 to 20 minutes (30 patients) would look much larger than the class from 5 to 10 (18 patients), although each minute of that class contains fewer patients.
b) Less than 20 minutes are the first three classes: patients, and .
c) Ten minutes or more are the last two classes: patients, and .
Median, quartiles and outliers with grouped data
The loading time of a web page, in seconds, is measured for 100 connections:
| Time (s) | ||||||
|---|---|---|---|---|---|---|
| Number of connections | 10 | 20 | 40 | 20 | 6 | 4 |
a) Build the row of cumulative frequencies, in the order of the table.
b) Estimate the median.
c) Estimate and and calculate the interquartile range. Give the result as the tuple .
d) Find the upper fence for outliers and decide whether a connection of 12 seconds would be an outlier. Give the value of the fence.
Solution
a) The frequencies are added up: , , , , , .
b) Half of the data is . The cumulative frequency goes from (at ) to (at ), so the median lies in the class . Interpolating:
c) For we look for the height , which falls between (at ) and (at ):
For we look for , which falls between (at ) and (at ):
The interquartile range is .
d) The upper fence is . A loading time of s exceeds , so it is an outlier. (The lower fence, , cannot be reached with positive times.)
In the exam: when interpolating, write down the height you are looking for (, , ) and the class where it falls; that is what earns the method marks. To say that a value is an outlier, it is not enough for it to "look large": you have to calculate the fence and compare.
Common mistakes
Summary
- Bar charts and pie charts for qualitative or discrete data; histogram for grouped data. In the histogram there are no gaps and the area is the frequency.
- With classes of different widths, height .
- Angle of a sector .
- The cumulative frequency is associated with the upper boundary of each class; the polygon or curve starts at and ends at .
- To read , and , look for the heights , and and go down to the horizontal axis; with a table, interpolate. .
- Box-and-whisker diagram: minimum, , median, , maximum. Outliers are the data outside and .
- In Paper 2 the GDC draws these graphs and gives the quartiles, but always write down how you obtained the result.
Want to work on it together?
Free first consultation: we look at your level and your exam, and build a plan. Álvaro replies on WhatsApp.
Message us on WhatsApp