Organizing and Graphing Qualitative Data
Qualitative (or categorical) data consist of labels such as job type, opinion categories, or
colors. To analyze such data, they are first organized in a frequency distribution,
then summarized by relative frequencies and percentages, and
finally displayed with bar graphs or pie charts.
Frequency, Relative Frequency, and Percentage
For a qualitative variable, each possible response is a category. The
frequency of a category is simply the number of observations that fall in that
category. A frequency distribution lists all categories together with their frequencies.
The relative frequency of a category is the fraction of the total data that lie
in that category. If \(f\) is the frequency of a category and \(N\) is the sum of all
frequencies, then
\[
\text{Relative frequency of a category}
= \frac{\text{Frequency of that category}}{\text{Sum of all frequencies}}
= \frac{f}{N}.
\]
The percentage for a category is obtained by multiplying the relative
frequency by \(100\). Written step by step,
\[
\begin{aligned}
\text{Percentage of a category}
&= \text{Relative frequency} \cdot 100 \\
&= \frac{f}{N} \cdot 100.
\end{aligned}
\]
In any complete table, the sum of all relative frequencies is \(1.00\) (up to rounding), and
the sum of all percentages is \(100\%\) (again, up to rounding).
Bar Graphs
A bar graph (or bar chart) is constructed by placing the categories of the
qualitative variable on the horizontal axis and the chosen measure (frequency, relative
frequency, or percentage) on the vertical axis. For each category:
- Draw a bar of equal width.
- The height of the bar is proportional to the category’s frequency (or relative frequency, or percentage).
- Leave a small gap between adjacent bars to emphasize that the categories are separate, not continuous.
Bar graphs make it easy to compare categories at a glance, especially when categories are
ordered from highest to lowest frequency.
Pie Charts
A pie chart represents each category as a slice of a circle. The whole circle
stands for the entire data set, and the size of each slice is proportional to the category’s
relative frequency or percentage.
Because a circle contains \(360^\circ\), the angle for the slice corresponding to a category is
calculated by multiplying its relative frequency by \(360\):
\[
\begin{aligned}
\text{Angle size for a category}
&= \text{Relative frequency} \cdot 360^\circ \\
&= \frac{f}{N} \cdot 360^\circ.
\end{aligned}
\]
For example, if \(f = 10\) out of \(N = 30\) observations, the relative frequency is
\(\tfrac{10}{30} \approx 0.333\), and the slice angle is
\[
\begin{aligned}
\text{Angle} &= 0.333 \cdot 360^\circ \\
&\approx 120^\circ.
\end{aligned}
\]
When angle sizes are rounded, the sum of all angles may be slightly more or less than
\(360^\circ\), which is acceptable in practical graphing.