Analysing an ordinal and a scale variable
Part 2: Visualisation
On the previous page we got a first impression from the sample data, but a visualisation might reveal even more. For visualising a relation between an ordinal and a scale variable, I'd recommend using a split-histogram. An alternative could be a side-by-side box plot. The side-by-side box plot is a visualisation of some descriptive measurements, and therefor a bit more technical. A downside of a split histogram is that it becomes perhaps too large if you have a lot of different categories in the nominal variable.
For the example I'll use a split histogram as shown in Figure 1.
Figure 1. Location vs Grade for course.
Click here to see how to create a split histogram with SPSS, R (Studio), Excel (somewhat), or Python.
with SPSS
with R (Studio)
with Excel (somewhat)
Unfortunately it is not possible (to my knowledge) to create a singele chart that shows a split histogram, however you could mimic the result by showing three different histograms and place them underneath each other.
with Python
The number of bars (bins) can change the look of this. There are various formal rules on how many bars there should be, and even more rule of thumbs. I recommend using between 5 and 12 bars. In this example I've used 8.
When looking at the histograms you can look at the general shape, where the peak is for each and if there might be some unusual scores. When an ordinal variable is used, I'd also look if there is a shift between the various histograms shown. From Figure 1 we see the same things as we already established from the descriptive statistics. In the report I recommend using a ‘Introduce – Show – Tell’ approach. So when reporting this graph, it could be for example like this:
A question of interest was if the ability of the teacher to motivate the students had an influence on the overall grade students gave the course. Students could give the course a grade from 0 (low) to 100 (high). The results are shown in Figure 1.
As can be seen Figure 1 there seems to be an increase in grade if the teacher was able to motivate the students, while the variation in grade seems to decrease. |
Now that we have a good impression of the data, it is time to find out if there might be a relationship also in the population, which will be discussed on the next page.
As mentioned earlier an alternative visualisation is to use a box-plot
Click here to see how to create a boxplot with SPSS, with R, or with Excel
with SPSS
with R
with Excel
The video below shows how to create a boxplot with Excel 2016, for earlier versions of Excel read the instructions on this site (opens in new tab).
Google adds