Analysing a binary vs. ordinal variable
1b: Visualisation (multiple compound bar-chart)
To visualise an ordinal variable, it often makes sense to stack the results. This was also done in the case of a single ordinal variable. Stacking the results creates a compound bar chart, or sometimes stacked bar chart (Wilkinson, 2005, p. 157) or component bar chart (Zedeck, 2014, p. 54). It can be defined as: “a bar chart showing multiple bars stacked at each x-axis category, each representing a value of the stacking variable” (Upton & Cook, 2014, p. 88).
Instead of one bar, we can now create two of them (one for each group in the binary variable). This could then be considered a multiple compound bar-chart. The multiple compound bar-chart of the example data is shown in Figure 1.
Figure 1. Multiple compound bar-chart of Gender vs. 5.3 The amount of online activities
Click here to see how you can create a stacked/compound bar-chart as above, with SPSS, R (Studio), Excel, or Python.
using Chart builder
using Legacy dialogs
converting a cross table
with R (Studio)
For both male and female at 50% we are in the green (enough), however for the females there is no yellow or orange, and we reach the same conclusion as with the cross table in the previous section. It appears females thought the amount was enough or too little, while for the males many still thought it was (far) too much.
To find out if this difference will also appear in the population, we need a statistical test. This will be discussed in the next section.