This chapter covers some of the more basic methods for graphically summarizing data, and it expands on the numerical methods for characterizing data that were described in Chapter 2. (Many additional methods for plotting data are available with the R package ggplot2. See, e.g., Chang, 2013; Field et al., 2012; Wickham, 2009.) Included in this chapter are some modern insights regarding when basic graphical methods perform well and when and why they might be unsatisfactory for certain purposes. Generally, plots can reveal important features of data that are easily missed or underappreciated when relying solely on numerical summaries of data. This is particularly true when comparing two groups of individuals, as we will see in Chapter 9, and when studying the association between two variables as will be illustrated in Chapter 8.
3.1 Plotting Relative Frequencies
We begin with the situation where the variable of interest can take on a relatively small number of values. For example, individuals might be asked to rate the amount of pain they have after surgery on a scale from 0 to 5, or they might be asked whether they agree, disagree, or have no opinion about some political issue.
The notation is used to denote the frequency or number of times the value occurs. To be concrete, imagine that 100 individuals are asked to rate a recently ...