Title: Analysing associations
Course: UGQuants (SSPS) > Section: Associations Between 2 Variables

Analysing associations

In this module we focus mainly on different ways of investigating and presenting the association between variables. Fundamental here is that the approaches we use will depend on the type of variables we are dealing with. Here we look at association between two categorical variables (any combination of nominal and ordinal) and association between one categorical and one ratio or interval variable.

Contingency tables – also very commonly called cross-tabulations or cross-tabs – allow us to compare the distribution of one variable across different categories of a second variable. This in turn allows us to make some initial judgements as to whether and to what extent one variable might influence the other.

The simplest kind of contingency table is a two-way table, containing only two variables. But even a two-way table can vary greatly in terms of its size and complexity: this depends on the number of values taken by each variable. The simplest cross-tabulation, where each variable only has two possible values, is known as a 2 by 2 (or 2 x 2) table. Strictly speaking, there is no limit to how large a contingency table might be, and it is possible to present quite large tables clearly. However, in practice very large tables can be quite difficult to read, and when this occurs it is best to consider how the table might be simplified (e.g. by recoding to reduce the number of values or by presenting data for only some of the values and noting which data have been excluded), or whether a different approach to analysis might be taken.

Like a frequency table a contingency table is composed of (vertical) columns, (horizontal) rows, and cells (boxes), but there are a number of options – explored below – for how we might choose to present the data in relation to each of these elements. A common convention is that the columns of the table represent the values of the independent variable and the rows represent the values of the dependent variable. However, this is only a convention, not a strict rule. We may choose to reverse this order and, as we have seen, it is not always clear which might be the independent and dependent variables.

 | A contingency table also shares a number of other features with a frequency table
 | The table should always have a title indicating which variables are being cross-tabulated.
 | The cells of the table may show the frequencies (counts) of cases and/or percentages.
 | It is generally good practice to state the source of the data below the table.

It is also often good practice to note any missing cases: in a cross-tabulation any cases that take a value defined as missing for any of the variables will be excluded from the analysis. However, the number of missing cases is not always noted, e.g. when the number is very small in relation to the overall number of cases, or when a particular variable is not relevant for a large number of cases.

To demonstrate the additional features of a contingency table we will initially use a simple 2 x 2 table showing only the raw counts of cases, and then explore the various other options for presenting data within the table. Using data from the 2010 Health Survey for England, Table 1 cross-tabulates the variable that records whether or not an individual currently smokes cigarettes with the variable that records whether or not an individual has a university degree.

Table 1: Cigarette smoking in England by whether has university degree

Currently smokes cigarettes? | Has a university degree? | All
Degree | No Degree
Smoker | 171 | 1010 | 1181
Non-Smoker | 633 | 1717 | 2350
Total | 804 | 2727 | 3531

 Source: Health Survey for England, 2010

In fact we rarely if ever want to present data from a cross-tabulation in the same way as the data are shown in table 1. Why not? The reason is that, just as we saw with frequency tables, presenting only the counts of cases does not give us an immediately intuitive way of assessing the distribution across categories. This problem is even more evident in contingency tables when we want to compare across categories, because the counts do not give us a way of adjusting for the different number of cases in each category. So, in table 1 we can immediately see that many fewer people with degrees smoke than do people without degrees, but we can also clearly see that many more cases overall do not have degrees. So are people with degrees more or less likely to smoke, and how much more/less likely?

The best way to resolve this problem is to present the counts as percentages. We could choose to present the counts and the percentages, but this is often unnecessary if we provide enough information for the percentages to be converted back into counts should the reader of the table wish to do so. There are different kinds of percentage we are able to present in a contingency table: column, row, or cell (or total) percentages. Table 2 shows the same data from table 1 as column percentages. What this means is explained after the table when we outline its various features.

Table 2: Cigarette smoking in England by whether has university degree (column percentage to the nearest 1%)

Source: Health Survey for England, 2010

Here it is quite straightforward to identify whether or not someone has a degree as the most likely independent variable. This is because proposing that someone’s level of education might influence their smoking behaviour seems logical, but proposing that whether or not someone smokes now might have influenced their ability to get a degree in the past does not seem logical.

The final (bottom) row of the table does not show percentages. Why not? We could have chosen to show the percentage of all cases with and without degrees, but instead we show the total number of cases in each category. We do this because it allows us to present the table with the best combination of detail and economy. Had we shown only percentages in the final row, then the table would tell us nothing about the number of cases represented, either overall or in each category. We would therefore need to include the counts as well as the percentages in each data cell. Showing only the counts in the final row and only the percentages in the other cells allows the percentages to be converted back into counts if necessary.