Title: Categorical variable
Course: UGQuants (SSPS) > Section: Data Visualisation

Categorical variable

When considering the “distribution” of a single categorical variable, a decision needs to be made as to whether you are interested in the absolute frequency of each category or the relative prevalence of each outcome.  Although bar graphs can be used to look at relative prevalence of values as well as absolute frequencies, the former can also be represented as a pie chart.

If variables are ordinal in nature, ordering the categories in a visualisation to match the ordering of the variable will allow some basic statements about the shape of the distribution to be made (as with a histogram).  However, where the underlying variable is nominal in nature, it makes no sense to talk about the shape of the distribution, and interpretation is best restricted to commenting on the relative frequency with which each category appears in the data.