Bar chart
A bar chart compares categories using separated rectangular bars whose lengths are proportional to the values shown, distinct from a histogram, which shows one numeric variable's distribution with touching bars.
See it move
A shop surveys 80 customers about payment method: 20 chose cash, 45 chose card, and 15 chose mobile. A bar chart draws three separated bars sized 20, 45 and 15, with gaps between them because payment method is a category, not a continuous scale. Converted to percentages, the three bars are 25%, 56.25% and 18.75% of the total.
The formula
Variables
- Frequency (count) of category i
- Total number of observations
- Relative frequency of category i
Gives the height of each bar on a relative-frequency bar chart from a category's raw count and the total number of observations.
Check yourself
A shop surveys 60 shoppers about how they placed their most recent order: 18 online, 30 in-store, and 12 by phone. On a relative-frequency bar chart, what height (as a percentage) would the 'in-store' bar have?