Skip to main content

Chapter 17 More details about tables and graphs

described in detail following the image
A diagram showing the six steps of research, arranged in a cycle: Ask, Design, Collect, Classify and summarise, Analyse, Report. Step 4 (Summarise) is highlighted, captioned β€œSummarising data: graphs and tables”.

Section 17.1 Introduction

A summary of the data is important for understanding the data, and for planning the direction of the analysis. In this chapter, we make some general comments for constructing graphs and tables. Always remember:

Warning 17.1.

The purpose of a graph and a table is to display the information in the clearest, simplest possible way, to facilitate understanding the message(s) in the data.

Section 17.2 More details about preparing graphs

Helping readers to understand the data is the goal of producing a graph. You should be able to sketch graphs by hand, but usually software is used to produce graphs. Using a computer makes it easy to try different graphs, to change features of graphs, and to produce the best graph possible. When creating graphs, ensure you:
Some specific problems to be aware of are discussed in the subsections that follows.

Subsection 17.2.1 Avoid unnecessary third dimensions

Graphs should focus on clear communication. One barrier to clear communication is using an unnecessary third dimension. This is poor: such graphs can be misleading and hard to read [157].

Example 17.2. Two- and three-dimensional plots.

In the nhanes study [160], the age and sex of each participant were recorded. Using Fig. FigureΒ 17.3 (left panel), can you easily determine if more females or more males are present in each age group?
The artificial third dimension makes determining the heights of the bars hard. In contrast, a side-by-side bar graph (Fig. FigureΒ 17.3, right panel) makes it clear whether each age group has more females or more males.
Figure 17.3. Two plots of the nhanes participants, divided by age group and sex. Left: a three-dimensional bar chart. Right: a side-by-side bar chart.

Subsection 17.2.2 Avoid overplotting

Some plots, such as dot charts and scatterplots, may suffer from overplotting: when multiple observations have the same (or nearly the same) values, and these cannot be distinguished on the graph. Overplotting can especially be a problem when plotting discrete quantitative data. In many cases (such as dot charts), points can be jittered by adding a small amount of randomness to the observations, or stacked; see Example ExampleΒ 14.7. Jittering is the best option for scatterplots. Overplotted points can change readers’ impression of the data, since some observations are obscured and are effectively ’lost’ to the reader.

Subsection 17.2.3 Take care when truncating axes

One common optical illusion occurs when the frequency (or percentage) axis does not start at zero. This is a problem in graphs where the distance represented visually implies the frequency of those observations, as with the count (or percentage) axis in bar charts, dot charts, or histograms. This is not a problem in, for example, boxplots and scatterplots, where the distance of points from zero do not visually imply any quantity of interest.
Sometimes, the axes may be truncated intentionally so the differences are easier to see. In these cases, the reader should be alerted that the axes have been truncated for this reason.

Example 17.4. Truncating is not appropriate.

Consider data recording the number of lung cancer cases in Fredericia in various age groups [158].
The graph is visually misleading when the graph does not start at a count of zero, since the height of the bars from the axis visually implies the frequency of those observations.

Example 17.5. Truncating is appropriate.

Consider data recording the body temperature of \(n = 130\) people ([34], [91]). A histogram of the data (Fig. FigureΒ 17.9, left panel) clearly shows the distribution of body temperatures.
The vertical axis, displaying the counts, must start at zero since the bar heights visually imply a quantity of interest. However, the horizontal axis starts at \(35.5^{\circ}\text{C}\text{,}\) which does not create any problems as the distances from a temperature of \(0^{\circ}\text{C}\) do not visually imply any quantity of interest.
In contrast, starting the horizontal axis at a temperature of \(0^{\circ}\text{C}\) (Fig. FigureΒ 17.9, right panel) makes any details in the histogram difficult to see; the histogram is pointless.

Subsection 17.2.4 Take care when using pie charts

As noted in Sect. SubsectionΒ 12.3.3, pie charts may be hard to read: humans compare lengths (bar and dot charts) better than angles (pie charts) [159]. Pie charts are also difficult to use with levels having zero or small counts.

Example 17.6. Pie charts with small counts.

[161] studied the use of ginkgo for memory enhancement. Caregivers blinded to the treatment (ginkgo or placebo) reported the impact on subjects’ memory. The bar chart (Fig. FigureΒ 17.7, left panel), for subjects on the placebo, shows that four of the available categories had zero responses, and one had a very small number of responses (two). The pie chart (right) make the small category difficult to see, and the categories with zero counts impossible to see.
Figure 17.7. Data with zeros and small counts are easy to see in a bar chart (left panel) and dot chart, but difficult to see in a pie chart (right panel).

Section 17.3 More details about preparing tables

A computer is helpful for constructing tables. Using a computer also makes it easy to try different orientations or layouts. As with graphs, the purpose of tables is to help readers understand the data. When creating numerical summary tables, ensure you:
  • do make tables clear and well-labelled.
  • do use clear and informative row and column labels (as necessary).
  • do add units of measurement where necessary.
  • do add informative captions above the table.
  • do add units of measurement and value labels where appropriate.
  • do make sure text and details are easy to read.
  • do round numbers appropriately (don’t necessarily use all figures provided by software).
  • do align numbers in the table by decimal point if possible, for easier reading and comparing.
  • do construct the table to allow readers to easily make the important comparisons, as far as possible (space restriction may take precedence, for example).
  • do not use distracting colours and fonts; only use different colours and fonts if necessary, and explain that purpose if it is not clear.
  • do not use vertical lines (in general), and use very few horizontal lines. Horizontal lines can be used to group columns (for example, see Table TableΒ 17.8).

Section 17.4 Example: water access

[119] recorded data about access to water in three rural communities in Cameroon (see Sects. SectionΒ 12.8 and SectionΒ 11.10). The study could be used to determine associations to the incidence of diarrhoea in young children (\(85\) households had children under \(5\) years of age). Relationships between the incidence of diarrhoea and some other variables appear in Figs. FigureΒ 15.24 and FigureΒ 14.16. A summary table of information can also be constructed (Table TableΒ 17.8).
In this table, note that:
  • quantitative and qualitative variables are summarised differently, but appropriately.
  • units of measurements are given where appropriate (i.e., only for age).
  • numbers in columns are aligned for easier reading and comparing.
Table 17.8. Numerical summary of the water-access data in \(85\) households with children, according to whether children under \(5\) years of age had reported diarrhoea in the last two weeks.
All households Reported diarrhoea No reported diarrhoea
\(n\) Summary \(n\) Summary \(n\) Summary
Region\(^{b}\)
Water source\(^{b}\)
Education\(^{b}\)
Has livestock\(^{b}\)
Age (in years)\(^{a}\) 85 37.0 (28.5) 26 46.5 (31.0) 59 35.0 (24.0)
Household size\(^{a}\) 85 7.0 (6.0) 26 8.5 (8.0) 59 6.0 (5.0)
Under 5s in household\(^{a}\) 85 2.0 (2.0) 26 2.0 (2.0) 59 2.0 (1.0)
\(\quad\)Mbeng 26 30.6% 12 46.2% 14 23.7%
\(\quad\)Mbih 28 32.9% 9 34.6% 19 32.2%
\(\quad\)Ntsingbeu 31 36.5% 5 19.2% 26 44.1%
\(\quad\)Bore 56 65.9% 16 61.5% 40 67.8%
\(\quad\)River 13 15.3% 4 15.4% 9 15.3%
\(\quad\)Tap 6 7.1% 1 3.8% 5 8.5%
\(\quad\)Well 10 11.8% 5 19.2% 5 8.5%
\(\quad\)Primary or less 38 44.7% 11 42.3% 27 45.8%
\(\quad\)Secondary or higher 47 55.3% 15 57.7% 32 54.2%
\(\quad\)No 20 23.5% 3 11.5% 17 28.8%
\(\quad\)Yes 65 76.5% 23 88.5% 42 71.2%
The table summarises the sample, but RQs are about the population. For example, one relational RQ could be:
Is the percentage of households with children under \(5\) years of age having diarrhoea the same for households that do and do not keep livestock?
Since the observed sample is one of countless possible samples that may have been selected, answering RQs about the population is not straightforward. In the observed sample, \(85.0\)% of households that did not keep livestock reported diarrhoea in children under \(5\text{,}\) while \(64.6\)% of households that did keep livestock reported diarrhoea in children under \(5\text{.}\) That is, a difference is seen in the sample; but RQs ask about the population.
Broadly, two possible reasons could explain why the sample percentages of households reporting diarrhoea in children are different:
  1. The population percentages are the same.
    The sample percentages are different simply because of the households selected in this particular sample. Another sample, with different households, might produce different sample percentages. Sampling variation explains the difference in the sample percentages.
  2. The population percentages are different.
    The difference between the sample percentages reflects this difference between the population percentages.
The difficulty is knowing which of these reasons (’hypotheses’) is the most likely explanation for the difference between the sample percentages. This question is of prime importance as it answers the RQ. Tools for answering these questions are considered later in this book.

Reading Questions 17.5 Quick review questions

Are the following statements true or false?

2.

Graphs should use as many colours as possible.
Answer.
False. Use different colours only if they have a purpose (and explain that purpose if it is not clear).

4.

Tables should have plenty of horizontal and vertical lines.
Answer.
False: very few vertical lines (if any); minimum of horizontal lines.

Exercises 17.6 Exercises

Answers to odd-numbered exercises are given at the end of the book.

1.

What would be the best graph for displaying the data for these situations?
  1. Researchers record the pH of water and the temperature of the water, in various creeks in the north island of New Zealand, to explore the relationship between pH and temperature.
  2. Researchers measure the difference between each swimmers’ fastest \(100\) time and their fastest \(200\) time.
    The researchers were interested in the average time difference.
  3. A research study examined the way in which students usually came to university (bus; private car; carpooling; etc.) and their program of study.

2.

What would be the best graph for displaying the data for these situations?
  1. Researchers record the number of times a specific recycling bin is used each day at a shopping centre, over many days.
  2. Researchers measure the difference between heart rate before and two hours after drinking a cup of coffee.
    The researchers were interested in the average increase in heart rate.
  3. A research study recorded the diet of students (vegan; vegetarian; other) and the cost of groceries in the previous week, for many students.
    The researchers were exploring if there was any relationship between diet and cost of groceries.

3.

[151] recorded these variables for \(385\) lime trees in Russia: the foliage biomass (in kg; the response variable); the tree diameter (in cm; the explanatory variable); the age of the tree (in years); and the origin of the tree (one of Coppice, Natural, or Planted).
The purpose of the study is to estimate the foliage biomass from the tree diameter, in the presence of some extraneous variables. What graphs would be useful?

4.

[164] recorded the soil nitrogen after applying different fertiliser doses. The researchers recorded:
  • the fertiliser dose, in kilograms of nitrogen per hectare;
  • the soil nitrogen, in kilograms of nitrogen per hectare; and
  • the fertiliser source; one of ’inorganic’ or ’organic’.
What graphs would be useful for understanding the data?

5.

[162] counted the number of noisy miners (an Australian bird) and eucalyptus trees in random quadrats. Critique the graph (not given by [162]!) of the data (Fig. FigureΒ 17.10, left panel).

6.

[163] recorded, among other variables, the colour of the carapace (’Light medium’, ’Medium’, ’Dark medium’ or ’Dark’) and the condition of the carapace (’Both OK’, ’One OK’, ’None OK’) of \(n = 173\) female horseshoe crabs. Critique the scatterplot (Fig. FigureΒ 17.10, right panel) used to explore the data.

7.

[165] examined the change in madrs (a quantitative scale measuring level of depression) and treatment group (whether each person was treated using: exercise; body awareness; or advice).
  1. What is the response variable?
  2. What is the explanatory variable?
  3. What graphs would be useful for exploring the data and the relationships of interest?

8.

A study of high-performance athletes at the Australian Institute of Sport (AIS) [126] recorded numerous variables about athletes. A plot for the sports played by the athletes is shown in Fig. FigureΒ 17.11. How would you describe the data: left skewed, right skewed, approximately symmetrical? Or something else?

9.

[Dataset: Typing] The Typing dataset [69] contains four variables: typing speed (mTS), typing accuracy (mAcc), age (Age), and sex (Sex) for \(1\,301\) students. Produce graphs necessary for understanding the data, making sure to explain what they reveal.
Does the mean typing speed or mean accuracy appear to differ by the age or sex of the student? What other questions could be useful to ask about the data?

Section 17.7 Supplementary figures

Figure 17.9. Two histograms displaying the body temperature of \(130\) people. Left: a well-constructed histogram. Right: a poorly-constructed histogram.
Figure 17.10. Left: the number of noisy miners and the number of eucalyptus trees. Right: a scatterplot of the colour of female horseshoe crabs and the condition of their spines.
Figure 17.11. Sports played by athletes in the AIS study.
Table 17.12. A table of results.
Mean Std dev.
Current smoker 206.6 46
Current non-smoker 214.64 48.7945
Difference 8.03
Figure 17.13. A boxplot of systolic blood pressure by smoking status.