Categorical Data Graphs

Categorical data consists of observations that fall into distinct groups or categories — for example, favourite music genre, type of vehicle, or political party affiliation. Unlike numerical data, categorical values cannot be averaged or ordered in a meaningful mathematical sense. To communicate patterns in categorical data clearly, statisticians rely on several specialised graph types: bar charts, Pareto charts, and segmented (stacked) bar displays. Each graph type serves a different analytical purpose. A standard bar chart lets you compare frequencies or relative frequencies across categories side by side. A Pareto chart arranges those bars in descending order of frequency and overlays a cumulative percentage curve, making it easy to identify which categories account for the majority of observations — a technique central to quality control and business analysis. A segmented bar chart stacks sub-categories within each bar, revealing how a whole is divided among parts and enabling direct comparison of compositions across groups. Choosing the right display is as important as drawing it correctly. When you simply want to compare counts, a bar chart suffices. When you want to prioritise the 'biggest contributors', use a Pareto chart. When you want to compare the internal makeup of two or more groups, a segmented bar chart is the most informative option. Mastering all three gives you a powerful toolkit for exploratory data analysis.

Key takeaways
  • Organise data into a frequency table
  • Draw a standard bar chart
  • Convert to a Pareto chart
  • Construct a segmented bar chart
  • Avoid common mistakes

Organise data into a frequency table

Before drawing any graph, tally how many observations fall into each category. Record both the frequency f (raw count) and the relative frequency f/n, where n is the total number of observations. For example, if 200 students were surveyed about transport and 80 walk, 60 take a bus, 40 cycle, and 20 drive, your table has four categories with relative frequencies 0.40, 0.30, 0.20, and 0.10 respectively.

Draw a standard bar chart

Place categories on the horizontal axis and frequency (or relative frequency) on the vertical axis. Draw a rectangular bar of equal width for each category; the height equals that category's count or proportion. Leave a visible gap between bars to emphasise that the categories are discrete, not continuous. Label both axes clearly and include a title. The order of bars is arbitrary unless a natural ordering exists.

Convert to a Pareto chart

Rearrange the bars from tallest (highest frequency) to shortest, left to right. Then add a second vertical axis on the right side ranging from 0% to 100% and plot a cumulative percentage line: the first point sits at the top of the first bar, the second point at the combined height of the first two bars, and so on, finishing at 100%. This overlaid line chart is called the ogive overlay. The Pareto principle (80–20 rule) states that roughly 80% of effects come from 20% of causes, and this chart makes that pattern visible instantly.

Construct a segmented bar chart

A segmented (stacked) bar chart is used when each category is itself divided into sub-categories. Each bar is drawn to a total height of either the total frequency or 100% (for a relative-frequency segmented bar). Distinct colours or patterns represent each sub-category. For example, if you survey students in Year 10 and Year 11 about preferred study environment (home, library, café), you draw one bar per year group, divided into three coloured segments whose heights represent the proportion choosing each environment. This allows a direct visual comparison of compositions: 'Does Year 11 use the library more than Year 10?'

Avoid common mistakes

Three errors are especially common. First, using a pie chart when a bar chart would show differences more clearly — bar charts make it far easier to compare similar-sized categories. Second, starting the frequency axis at a value other than zero, which exaggerates differences between bars. Third, confusing a histogram (for continuous numerical data, bars touch) with a bar chart (for categorical data, bars have gaps). Always double-check which type of data you have before choosing a display.

The Key Equation

Relative frequency of category i=finCumulative percentage up to category k=(∑i=1kfin)×100%\text{Relative frequency of category } i = \frac{f_i}{n} \qquad \text{Cumulative percentage up to category } k = \left(\frac{\sum_{i=1}^{k} f_i}{n}\right) \times 100\%
  • f_i — Frequency of category i (count): The number of observations that fall into the i-th category.
  • n — Total sample size (count): The total number of observations across all categories.
  • k — Number of categories included (dimensionless): The rank up to which frequencies are summed in the Pareto cumulative line.

Worked Example

Problem. A quality inspector records 150 defects in a manufacturing plant across five defect types: Surface scratch (54), Wrong dimension (45), Colour mismatch (27), Missing component (15), Other (9). Construct a Pareto chart analysis: find the relative frequency and cumulative percentage for each defect type in descending order.

Cumulative%k=2=54+45150×100=99150×100=66.0%\text{Cumulative\%}_{k=2} = \frac{54+45}{150} \times 100 = \frac{99}{150} \times 100 = 66.0\%

Answer. The Pareto chart shows Surface scratch (36%) and Wrong dimension (30%) as the dominant defect types, jointly responsible for 66% of defects. The top three categories cover 84% of all defects.

Figure
Diagram
Pareto Chart – Manufacturing Defects (n=150)0%10%20%30%40%SurfaceScratchWrongDim.ColourMismatchMissingComp.Other36%30%18%10%6%36%66%84%94%100%Defect Type (sorted by frequency)Relative FrequencyCumulative %
Origins · 1 minVilfredo Pareto and how this was discovered
VP
Vilfredo Pareto
1848–1923 · Italian

Pareto was an Italian economist and sociologist who, in 1896, observed that approximately 80% of the land in Italy was owned by 20% of the population. This observation generalised into the Pareto principle (the 80–20 rule), which was later applied to quality management by Joseph Juran, who named the bar-chart-with-cumulative-line display the 'Pareto chart' in Pareto's honour. Pareto also made foundational contributions to utility theory and welfare economics. Pareto kept over 300 cats at his villa near Geneva, Switzerland, and reportedly found their company more agreeable than that of most humans.

  • Frequency Tables — Frequency tables are the essential first step before constructing any categorical graph; bar charts and Pareto charts are direct visual representations of a frequency table.
  • Relative Frequency and Proportions — Segmented bar charts and Pareto cumulative curves both require converting raw counts to relative frequencies or percentages.
  • Numerical Data Displays (Histograms and Dot Plots) — Contrasting categorical bar charts with histograms for numerical data reinforces when each graph type is appropriate.
  • Two-Way Tables — Segmented bar charts are the graphical companion to two-way (contingency) tables, which organise categorical data across two variables simultaneously.