Tutorials › AP Statistics › Ordering Bars for Clarity

Graphs for categorical data · Tutorial 45 of 1000

Ordering Bars for Clarity

Choose bar order to make a categorical distribution easy to read without hiding meaningful category sequences or disrupting comparisons.

Beginner 9 min read

What You'll Learn

  • Distinguish frequency ordering from a meaningful natural order for categories.
  • Arrange nominal categories in descending frequency for a Pareto-style bar chart.
  • Explain why the tallest bar appears first in a frequency-ordered display.
  • Preserve ordinal or time-based category sequences when they support interpretation.
  • Keep category positions consistent when comparing multiple groups.
  • Recognize how relative frequency and count charts share an ordering for the same group.

Bar Order Is a Choice That Affects Clarity

In Relative Frequency Bar Charts, you learned to use bar heights to display the proportion or percentage in each category. A separate choice is where to place each category along the horizontal axis. The bar heights show the data; the order of the bars helps readers notice a pattern. A clear order can make the most common categories easy to find, or preserve a sequence that matters for understanding the variable.

There is no one ordering that is best for every categorical variable. For categories without a meaningful sequence, sorting from most frequent to least frequent is often useful. For categories with an established order—such as ratings from lowest to highest—preserving that sequence is usually more informative. The key is to choose and label an order that suits the variable and the question.

Definition: Frequency ordering arranges categories according to their counts or relative frequencies, usually from greatest to least. Natural ordering preserves a meaningful sequence among categories, such as an ordinal rating scale or the months of a year.

For one group, ordering by count or by relative frequency produces the same ranking. Each relative frequency is its category count divided by the same group total, so a larger count remains a larger relative frequency. You can therefore sort a count chart or a relative frequency chart using either measure, provided the bars describe the same group.

Frequency Ordering and Pareto-Style Displays

A frequency-ordered bar chart puts the category with the largest count first, then the next largest, continuing to the smallest. This can help a reader quickly identify the most common category and compare the leading categories without searching across an arbitrary arrangement. For a relative frequency chart of the same group, the category order is identical.

A bar chart arranged from greatest to least frequency is often called a Pareto-style chart. The name describes the descending order of the bars; it does not change what the bars represent. A Pareto-style display still needs a clear title, category labels, and a vertical axis labeled as count or relative frequency. Do not infer a cause or a solution just from the ordering: the chart describes how often categories occur in the displayed data.

1
List the categories and their frequencies.
Use the frequency table or the counts represented by the bars.
2
Rank categories from largest to smallest.
Compare the counts, or compare relative frequencies that share the same group total.
3
Place and label the bars in that order.
Keep the bar heights attached to their correct category labels. Equal counts can appear in either order, but identify any tie accurately.

The category with the tallest bar will be at the left in this convention. That position is a result of the chosen ordering, not a special property of the horizontal axis. If frequencies tie, the tied categories should have equal bar heights; their relative placement can be chosen for readability.

Worked Example: Sorting Categories by Frequency

Worked Example: Sorting Categories by Frequency

A fictional library asks 56 visitors which type of event they would be most interested in attending. The responses are a craft workshop, a book discussion, a game night, or a local-history talk. Arrange the categories for a Pareto-style count chart, then give their relative frequencies.

The categories have no necessary sequence in this question. Sort the counts from greatest to least:

CategoryCountRelative frequency
Craft workshop2424/56 = 0.4286, or 42.9%
Book discussion1616/56 = 0.2857, or 28.6%
Game night1010/56 = 0.1786, or 17.9%
Local-history talk66/56 = 0.1071, or 10.7%

The counts are already listed from largest to smallest: \(24, 16, 10, 6\). Each relative frequency uses the total of 56 visitors. For example, the craft-workshop proportion is \(24/56=0.4286\), which is about \(42.9\%\). The order is the same for a count chart and a relative frequency chart because each count is divided by 56.

The rounded percentages add to \(100.1\%\), a small discrepancy caused by rounding; the unrounded relative frequencies sum to 1. The chart should put craft workshop first, followed by book discussion, game night, and local-history talk. In context, the craft workshop is the most frequently selected event among these 56 visitors. The chart alone does not tell us why visitors made those choices or whether the same pattern would occur among other visitors.

When Categories Have a Meaningful Sequence

Frequency is not always the best guide to bar order. As introduced in Ordinal Categories and Rating Scales, ordinal categories have a meaningful order even though the gaps between adjacent categories are not established as equal numerical amounts. For an ordinal variable, arranging bars by frequency can interrupt that sequence and make the display harder to interpret.

Suppose a survey asks respondents to rate a service as poor, fair, good, or excellent. The order from poor to excellent tells the reader how the ratings progress. If “good” is most frequent, moving it to the far left just because it has the tallest bar separates it from the scale’s natural direction. Preserving the low-to-high order makes it easier to see how responses are distributed across the rating levels.

Other variables may have a conventional sequence, such as days of the week or stages in a process. If the order itself helps answer the question, keep it. A category sequence should come from the meaning of the variable, not from an assumption that every categorical variable has an order. For categories without a meaningful sequence, a frequency order or a consistent alphabetical order can be a sensible choice.

Worked Example: Preserving an Ordinal Scale

A fictional online workshop asks 50 participants to rate its pace as slow, about right, fast, or much too fast. The counts are 9, 21, 16, and 4, respectively. Choose a clear order for a relative frequency bar chart and explain why it is appropriate.

Because these rating categories form an ordered scale, keep them in the stated sequence: slow, about right, fast, much too fast. Calculate the relative frequencies by dividing each count by 50:

$$ \begin{aligned} \text{Slow: }&\frac{9}{50}=0.18=18\%\\ \text{About right: }&\frac{21}{50}=0.42=42\%\\ \text{Fast: }&\frac{16}{50}=0.32=32\%\\ \text{Much too fast: }&\frac{4}{50}=0.08=8\% \end{aligned} $$

The relative frequencies add to \(0.18+0.42+0.32+0.08=1.00\), or \(100\%\). “About right” has the tallest bar, but it should not be moved ahead of “slow” merely because its frequency is largest. Keeping the low-to-high sequence lets a reader follow the rating scale from one end to the other. In context, 42% of these participants selected “about right,” while 8% selected “much too fast.”

Keep the Order Consistent When Comparing Groups

When two or more groups appear in one chart, category order deserves extra care. Use the same horizontal-axis categories in the same positions for every group. If each group is sorted separately by its own frequencies, a category can move from one position to another. Then readers may compare bars that do not represent the same response.

A single descending order based on the combined counts can sometimes be useful for a comparison chart, as can a natural order when one exists. Whichever order you choose, keep it fixed across the groups. If the purpose is to emphasize which category leads in each group, you can describe that difference in words while retaining aligned category positions. The chart’s layout should help compare like with like.

Worked Example: Consistent Ordering Across Groups

A fictional transit survey records the usual commute method for 100 students at each of two campuses. At Campus A, 40 travel by car, 30 by bus, 18 by bike, and 12 walk. At Campus B, 15 travel by car, 25 by bus, 40 by bike, and 20 walk. Choose an order for a chart comparing the groups and interpret the percentages.

The categories have no meaningful sequence, so a shared frequency order based on the combined counts is one reasonable choice. Add the two groups’ counts for each method:

$$ \begin{aligned} \text{Car: }&40+15=55\\ \text{Bus: }&30+25=55\\ \text{Bike: }&18+40=58\\ \text{Walk: }&12+20=32 \end{aligned} $$

A descending combined-count order is bike, car, bus, walk. Car and bus tie at 55, so either may appear first among those two. Keep this same order for both campuses. Because each campus has 100 students, each count is also the percentage for that campus: Campus A’s percentages are 18% bike, 40% car, 30% bus, and 12% walk; Campus B’s are 40% bike, 15% car, 25% bus, and 20% walk.

The chart should place the same category at the same horizontal position for both campuses, with the two bars for each category adjacent or otherwise clearly distinguished. Campus A has a higher car percentage than Campus B, 40% compared with 15%. Campus B has a higher bike percentage, 40% compared with 18%. These are comparisons of the observed campus groups. If each campus had been sorted separately, the first bar might represent car for Campus A but bike for Campus B, making the positions misleading.

Common Mistakes and What a Strong Answer Includes

  • Sorting every chart by frequency automatically. If categories have a meaningful order, such as rating levels, preserve it unless the question specifically calls for a frequency ranking.
  • Changing category order between groups. In a comparison chart, align the same categories in the same positions. Separate rankings can make side-by-side bars difficult to compare correctly.
  • Confusing the tallest bar with an effect or explanation. The tallest bar identifies the most frequent category in the displayed data. It does not explain why the category is common or show that anything caused the pattern.
  • Leaving labels unclear after sorting. A frequency-ordered graph still needs category names, an informative title, and a vertical-axis label identifying counts or relative frequencies.
  • Treating ties as different frequencies. Categories with equal counts should have equal bar heights. Their left-to-right order can vary, but do not claim one has a larger frequency.
  • Assuming a category order that the variable does not have. Use the variable’s meaning to decide whether an order is natural. For unordered categories, choose a clear convention such as descending frequency or alphabetical order.

A full-credit explanation names the ordering rule and connects it to the categories. For example: “The categories are ordered from most to least frequent to make the leading event choices easy to identify.” For an ordinal scale, a strong explanation might say: “The ratings remain in low-to-high order because the categories have a meaningful sequence.” For a comparison, also make clear that the category positions stay consistent across groups.

Key takeaway: Use descending frequency for a Pareto-style display when the categories have no meaningful sequence and ranking is useful. Preserve a meaningful category order when it aids interpretation, and keep category positions consistent across groups being compared.

Check Your Understanding

For each situation, decide how the bars should be ordered and give a brief reason.

  1. A survey records preferred snack types: fruit, crackers, yogurt, or popcorn. The counts are 14, 8, 11, and 7. Give a descending frequency order.
  2. A response scale is “never,” “sometimes,” “often,” and “always.” Why might the scale’s natural order be more useful than descending frequency?
  3. Two schools are compared on favorite season. Why should each school’s bars use the same category positions even if their most common seasons differ?
  4. A count chart has categories with frequencies 12, 12, and 5. What can you say about the first two bars if they are tied for the highest count?
  5. What does a tallest bar in a Pareto-style chart tell you, and what does it not tell you?