Bar Graph

Statistics & Probability

A bar graph uses rectangular bars to compare the frequencies or values of different categories.

Visualization

Definition

A bar graph uses bars of different heights to compare amounts in different categories: the taller the bar, the larger the amount. It displays categorical data with rectangular bars whose lengths are proportional to the frequencies or values they represent, separated by spaces to emphasize the distinct nature of categories, and can be vertical or horizontal. Formally, a bar graph represents the empirical distribution of a categorical or ordinal variable; stacked bar graphs partition each bar by a secondary variable, enabling comparison of both absolute and relative frequencies, and mosaic plots generalize stacked bars using area-proportional rectangles for two categorical variables simultaneously.

Example

A bar graph showing the number of students who prefer each sport might read Soccer: $12$, Basketball: $9$, Swimming: $5$, Baseball: $7$, with soccer having the tallest bar. A double bar graph compares monthly sales for two products side by side for each month, letting the viewer compare both products and track trends simultaneously. A stacked $100\%$ bar graph normalizes each bar to $100\%$, showing the relative breakdown across a secondary categorical variable and highlighting compositional differences even when group sizes differ.

Key Insight

Bar graphs make it easy to compare categories at a glance, and the gaps between bars remind us that the categories are separate groups, not a continuous range, distinguishing bar graphs (categorical data) from histograms (continuous data). Visual perception research (Cleveland and McGill, 1984) ranks bar length as one of the most accurately perceived graphical encodings, making bar graphs superior to pie charts for precise comparisons.