ABSTRACT

This chapter looks at bivariate data–data involving two data variables. Bivariate categorical data is often presented in the form of a contingency table. The table is found by counting the occurrences of each possible pair of levels and placing the frequencies in a rectangular grid. Such tables allow us to focus on the relationships by comparing the rows or columns. A two-way table involves two variables. The distribution of each variable separately is called the marginal distribution. The marginal distributions can be found from the table by summing down the rows or columns. As with univariate data, barplots can be used effectively to show the data in a two-way table. A mosaic plot is an extension of the ideas of a barplot that makes it suitable for viewing relationships between two or more categorical variables.